Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove String dispatches for MTK constructors #2

Merged
merged 3 commits into from
Jun 17, 2021

Conversation

anandijain
Copy link
Contributor

@ChrisRackauckas and I talked and these would be considered type piracy, even though there are no methods currently taking String in the main MTK repo, other packages may want to define their own

@paulflang I am also thinking that we want to remove the direct ODEProblem constructor, per this comment LCSB-BioCore/SBML.jl#40 (comment)

I think it makes more sense to just require them to use sth like ODEProblem(ODESystem(readSBML(filename))).

I haven't implemented that last point yet though

src/reactionsystem.jl Outdated Show resolved Hide resolved
@ChrisRackauckas
Copy link
Member

@ChrisRackauckas and I talked and these would be considered type piracy, even though there are no methods currently taking String in the main MTK repo, other packages may want to define their own

Yeah it's just type piracy. If two packages ever do it, pigs fly and dogs wear hats. It's generally frowned upon and fragile to do that, so instead just define the dispatch on the type SBMLToolkit owns.

@anandijain
Copy link
Contributor Author

I think I fixed up the tests, but we wont know until the Symbolics stuff is merged in SBML.jl, it seems like this PR makes some of the tests redundant, though I didn't look closely

@paulflang paulflang merged commit a5a2324 into main Jun 17, 2021
@paulflang paulflang deleted the aj/extra_dispatches_piracy branch June 17, 2021 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants