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

PySD 2.0.0 #299

Merged
merged 27 commits into from
Nov 8, 2021
Merged

PySD 2.0.0 #299

merged 27 commits into from
Nov 8, 2021

Conversation

enekomartinmartinez
Copy link
Collaborator

Dependencies dictionary added:

  1. Improving caching strategy
  2. Improving initialization of Stateful objects
  3. Other possible future applications (graph generation...)

Manage model components:

  1. Components class to load model and manage them, allowing inline changes
  2. Control variables managing through Time class, allowing dynamic final_time, time_step and saveper.

Several bug fixes (modulo, exponentials)

General cleanup

Improvement of the documentation

@pep8speaks
Copy link

pep8speaks commented Nov 8, 2021

Hello @enekomartinmartinez! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 153:80: E501 line too long (93 > 79 characters)

Line 46:80: E501 line too long (83 > 79 characters)
Line 209:80: E501 line too long (93 > 79 characters)

Comment last updated at 2021-11-08 15:39:32 UTC

@enekomartinmartinez
Copy link
Collaborator Author

enekomartinmartinez commented Nov 8, 2021

My bad that docs didn't work in the building, I need to update an import.
I will also add some unit test for new components class.

@coveralls
Copy link

coveralls commented Nov 8, 2021

Coverage Status

Coverage increased (+1.1%) to 99.826% when pulling 86160d5 on new_components into 5885d62 on master.

@enekomartinmartinez
Copy link
Collaborator Author

HI @JamesPHoughton,
seems that the problem with the documentation is a recent bug about the version of sphinx that uses ReadTheDocs https://githubmemory.com/repo/ivadomed/ivadomed/issues/973

I have updated setup.py as in the example provided in the previous issue. However, we need to change the RTD configuration to use the "docs" extra_packages.

I have no access to modify this configuration in RTD could you manage that or give me access? Thanks :)

@enekomartinmartinez enekomartinmartinez force-pushed the new_components branch 2 times, most recently from 12dd9d6 to 316881a Compare November 8, 2021 14:18
@enekomartinmartinez
Copy link
Collaborator Author

@JamesPHoughton I was able to solve the RTD issue by adding the readthedocs.yaml file. Now it works fine.
By my side this PR is ready to be merged.

Copy link
Collaborator

@JamesPHoughton JamesPHoughton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are great, a few documentation things I noticed. Good to merge when you're ready.

Congratulations!

docs/advanced_usage.rst Show resolved Hide resolved
docs/basic_usage.rst Outdated Show resolved Hide resolved
docs/development/contributing.rst Outdated Show resolved Hide resolved
pysd/py_backend/utils.py Show resolved Hide resolved
pysd/py_backend/vensim/vensim2py.py Outdated Show resolved Hide resolved
@@ -361,13 +360,16 @@ def visit_data_definition(self, n, vc):
self.kind = "data"

def visit_test_definition(self, n, vc):
# TODO: add test for test
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these todo's still open? (and ln 371/2, 399?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this are two features that I didn't add and we have no test that cover this lines.
I tried to add tests for those lines but I don't know how the original files should look like.
Line 371 is quite more complicated as it is related about how the subscripts are defined.

@@ -0,0 +1,132 @@
{UTF-8}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this model be useful to include in the test-models repo? Not sure if its something other people would find useful?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This model is related to the dependencies dict and multiples dependencies. In fact, it is not run by integration test but used unit_test_pysd.py for testing these multiple dependencies management. I don't think that this will be useful for other projects, as it is just a simple copy of test_subscript_individually_defined_stocks.mdl with some small changes to test the dependencies.

@enekomartinmartinez enekomartinmartinez merged commit e3f445e into master Nov 8, 2021
@enekomartinmartinez enekomartinmartinez deleted the new_components branch November 8, 2021 15:49
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.

4 participants