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

dateutil.parser import at top level, but python-dateutil not in requirements #496

Open
jmuhlich opened this issue Apr 3, 2020 · 0 comments

Comments

@jmuhlich
Copy link
Member

jmuhlich commented Apr 3, 2020

In simulator/base.py, dateutil.parser is used in the .load method for loading saved simulation results. That module is imported at the top level, but not listed in our requirements in setup.py. Under a "minimal" pysb install, importing pysb.simulator therefore fails. Our CI setups install pandas, which has python-dateutil as a dependency, so we never noticed the issue (this brings up a separate issue of how to fix CI to catch this in the future).

Since pysb generates this timestamp with isoformat(), we can parse it with datetime.fromisoformat() instead of the very general-purpose dateutil.parser.parse.

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

No branches or pull requests

1 participant