signac-flow
signac-flow copied to clipboard
Add type hints
The source of signac-flow would likely be more readable and more bug-resilient with type hints.
I would suggest using the approach from the PR linked below to automatically generate some type hints, and then manually refine them. https://github.com/glotzerlab/signac/pull/313
I'll work on implementing this!
@kidrahahjo while this feature would be nice, I would recommend working on something else for the moment if you have the time. There are higher priority items to be worked on at the moment, in particular I would focus on things related to getting actual aggregation working. Working through #362 and updating that checklist with remaining items would be very helpful.
If you want to wait on that for a bit while issues with the current code base get ironed out after the 0.12 release, then I would suggest trying to work through some of the more self-contained issues in our backlog. Considering the amount of code in flow and the fact that this kind of change would require eventually modifying every file (although of course you can stage it to avoid introducing lots of merge conflicts), I would like to get our issue list shorter before working on something bigger like this.
For starters, I'd suggest the following issues:
- #258: I think this might already be handled by directives.py and you'll just need to do a thorough review of existing environments/templates to make sure there's no legacy code that's not using this path.
- #370: Also hopefully mostly addressed by @bdice but there's probably some holdovers.
- #341: This might be a bigger project, but worth revisiting to see if #417 makes this easier. It's at least worth scoping out and documenting next steps.
- #270: This feature is a blocker for real applications, and should be handled.
@vyasr I agree on what you suggested. I had a chat with @bdice on slack, I will start working on introducing actual aggregation as soon as we release flow 0.12.0
. With respect to the point that this should be handled after we're done with some of the already existing issues, I think you're definitely right. I will have a look at the mentioned issues and see what I can do.