Skip to content

refactor: improve importability#44

Draft
FynnFreyer wants to merge 2 commits intoveg:masterfrom
FynnFreyer:feat/improve_importability
Draft

refactor: improve importability#44
FynnFreyer wants to merge 2 commits intoveg:masterfrom
FynnFreyer:feat/improve_importability

Conversation

@FynnFreyer
Copy link

This relates to #42, and includes two commits:

  • 993f52d exposes scripts as entry points instead
  • 51fb37d encapsulates the argument parsing, and allows argument injection in hivnetworkcsv
    For this one there are a few open questions

If only parts of this would be wanted, I can split these changes up into multiple commits, and you can cherry pick/whatever.

This doesn't include the commits in #41, but should be compatible without merge conflicts.

- moved the scripts package under the hivtrace namespace
- appended `.py` to the script names where necessary
- added a __main__.py file, defining the entrypoint functions
- removed the scripts in setup.py and make them available as entrypoints
- wrapped the code in hivnetworkannotate.py in functions
- changed to relative imports, because the ad-hoc layout otherwise confuses pycharm
- also did some very slight reformatting (add some indentation) in setup.py
TODO: some open questions

- why the random.seed(), and where does it need to happen? it's happening twice now
  - once before parsing arguments
  - and once before doing the annotations
- run_settings is global, and mutated by functions via side effects
  - this change does not immediately seem to break things
  - but there are no tests, so someone knowledgeable might want to check
@FynnFreyer FynnFreyer marked this pull request as draft August 23, 2023 15:35
@FynnFreyer FynnFreyer changed the title Feat/improve importability feat: improve importability Aug 23, 2023
@FynnFreyer FynnFreyer changed the title feat: improve importability refactor: improve importability Aug 23, 2023
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.

1 participant