-
Notifications
You must be signed in to change notification settings - Fork 36
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
Improve documentation for installation and pytest instructions #106
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't spend much time, but it looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, as well.
I am able to run the single file test only form idaes_example directory with the command mentioned in the documentation with -v flag. Whereas if I use -c flag, I can test the notebook from any level. I am not sure why that is the case. I would suggest either adding the directory level in the documentation from where the tests should be ran with the current command or change the flag to -c. The error I get with -v flag in other directory levels are:
|
|
For testing single notebook, I performed the following tests and got the following results. The following command is ran from different levels in the repository.
If I change the flag to
After installing markdown, this works and passes the tests
|
I'm still working on running the full set of tests, but I can already report that something strange is going on. Starting from a clean Conda env and local clone, after running Neither increasing the timeout in FIXME and/or running Running On Linux, This is with a fresh environment, but not in a fresh directory. After creating a fresh clone in a temp directory: Using the same "trick" of starting and cancelling a run of Only after waiting a bit longer before hitting Ctrl-C, so that the first test is run, does the "trick" work: Back on Windows, The same with Unix-style After creating another fresh clone + Conda env, this is the result of running The same on Linux results in the same error: |
OK, I think I have a better idea of what might be happening. I think these might actually due to a few different causes. Also, note that these are just hypotheses on my side, and therefore might be inaccurate or completely wrong.
I believe that this error and the following are caused by the environment where these commands were run; more specifically, the package
Same as above. Plus, there's another issue with the path: if the working directory is For the sake of simplicity and consistency, at this point my recommendation would just be to always run commands from the root of the repository (and I'll add a change to
The So, the fact that
Here something strange is happening: the test seem to be running (although it's hard to say without the complete pytest output), but note that the paths that pytest is reporting do not actually exist. It looks like pytest is somehow concatenating the parent directory of the file being passed as an argument (i.e.. I tried running this command, but couldn't reproduce the result above: in my case, it just crashes because of the
This matches my attempt mentioned above. I still don't know exactly what's causing this error (and why running the notebook tests seems to "fix" it), but my guess is that it's connected to the preprocessing step implemented in In any case, the name of the environment in the stack trace ( In summary: all of this is very complicated, most of which due to how the tests are set up and the documentation being ambiguous or misleading in certain passages, and I apologize for the confusion. I think the main takeaways from my point of view would be:
|
@lbianchi-lbl Is this ready to merge? |
Summary
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution:
📚 Documentation preview 📚: https://idaes-examples--106.org.readthedocs.build/en/106/