-
Notifications
You must be signed in to change notification settings - Fork 2
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
Documentation PR #151
Documentation PR #151
Conversation
This solution looks great, however in its current form it's difficult for me to test its output, because it is not actually published anywhere, and I cannot easilly locally generate it. Also, how do you picture this to be run in the future? |
Indeed. My plan to add this branch to the readthedocs options so we can check the output. Likely my script is not working right now, since first the files that are produced need to be committed to the branch and then the documentation produced. So still have to figure it out.
Yes think moving to another file is the best. I am not sure if using a bash script is just a better option, as that wouldn't require any specific environment.
And also good idea, I will combine the two (also that one is not yet committing to branch). |
278c60e
to
0a13521
Compare
Pull Request Test Coverage Report for Build 6510731696
💛 - Coveralls |
Updating the workflows to use cache. Much faster access. I need to set coveralls with the testing still. Pylint has yet to be done. But anyways, all branch outputs can be checked on https://sed.readthedocs.io/en/documentation/ (so far no changes would be visible) |
As far as I understand this uses poetry and the lock file then, no? I would find it important to always use the most recent package versions during testing, that our package limits allow, to see potential problems with updated packages when they come. That's why I don't like having the lock file in the repo, because it will essentially be always outdated. Right now, its not being used by the workflows, so I don't care. If you intend to use it, we at least have to include a poetry update and poetry lock, and then I doubt it's faster... |
cache doesn't have to use it and can use any package management tool. |
Let's test it. I would not say the package is built on poetry. pyproject.yaml != Poetry. I dont' use poetry by default at all, onyl if I have to regenerate a poetry.lock file for whatever reason. This takes for me typically more than a minute to resolve dependencies, the installation of the environment takes <2 minutes. So I am not so sure about the speedup. |
I initialized sed using poetry. Of course, poetry and setuptools are compatible with each other but the purpose of poetry is to manage dependencies and also aid in packaging. If you have any experience with building with setuptools, you'd know how much of a hassle it can be but poetry makes it easier. I'd encourage you to also adopt it. Regarding speedup, you can check here: |
That does not matter. What we want is a package that we can |
Then wouldn't it make sense to update poetry and run those tests only when we publish a new version to pypi?
In this case, we can use the python setup action cache funtionality they added: https://github.com/actions/setup-python#caching-packages-dependencies |
This probabaly makes a lot of sense. I am not at all against using caches, and even less against speedup, the only thing I wanted to point out is this potential caveat in using a static environment for testing. And no, it does not depend on us pushing a new version of the package, but others publishing new versions of packages we depend on. So even an old version of our package might break, if dependencies update. That we need to regularly test for, and react if we detect such a problem. That's the burdon of maintaining a complex python project... |
Getting this error with parallel testing. Only sometimes because 3.9 passed but not 3.8. Any ideas? |
Classical race condition. These tests actually are written to be run sequenctually, because they all write to the same folder config sed_config.yaml file, and delete it afterwards. if one test does this before the other, the deletion does not work, and the tests will also for other reasons randomly fail. |
I'll provide a fix for it |
That should fix the issue you had, however while doing local testing I encountered a similar problem with the flash loader, where the test files are also deleted. Here, I cannot change the file names, so I don't know how to resolve it. |
The io-tests are also predestined for race conditions, as here also multiple tests access the same files. |
In essence, they don't need to be deleted, at least in a workflow, because the runner deletes everything after it finishes running. For local case, I can understand your point.
That's true. Do we have many other such tests? Also question, I noticed that our linting workflow also has testing. Is it there for a purpose? |
https://pytest-xdist.readthedocs.io/en/latest/how-to.html#making-session-scoped-fixtures-execute-only-once maybe locking can help with the data race |
They are deleted, because otherwise the conversion from h5 to parquet is not tested for the different cases, but the parquets are read afer the first test has run. But this again depends on the order of tests, which is undefined in a parallel setup, so again -> race condition. It comes from the somewhat different behavior of the flash loader compared to the others.
I don't think so. The i/o tests can also be made safe by changing the file names depending on test fixture.
The idea was to have this as the single workflow to run at every push, that verifies the integrity of the pushed code, which includes linting and tests. Maybe the name is not the best. The other test workflow was added to verify compatibility with different python versions. |
This should remove all remaining file conflicts/race conditions. I tested with up to 60 workers several times and did not get any failures. ~10 workers seems to be an optimum with ~50 sec. testing time. Off course, they won't be available at the free nodes, I suppose. |
The usual is 2 cores for linux systems, it seems. Though github has a feature to host your own runners: |
Honestly its of not so much importance how long the online runs take if you do the tests locally before, so I would not bother. Speaking of which, looks like I forgot to check linting... |
…nerated buffer files
8196329
to
ef76eff
Compare
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
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.
pylint found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
PR deviated too much from intention. Hence I will close it and open up two new branches: one for CI/workflows and another for documentation |
Let's all commit to this branch to create a comprehensive documentation for SED