Refactoring and project organization #5

Open
opened 2020-10-09 18:23:08 +02:00 by rra · 2 comments
Owner

Now that we have a few loc and templates etc it might be a good idea to do a general refactor where we:

  • revisit all the function and variable names
  • think of the organization of the code (this seems to make sense: https://github.com/sharkwouter/minigalaxy)
  • how do we call classes, UI elements, etc
  • do we split into multiple files? e.g. Magic wormhole logic elsewhere than UI logic?

Thoughts, known best practices welcome!

Now that we have a few loc and templates etc it might be a good idea to do a general refactor where we: * revisit all the function and variable names * think of the organization of the code (this seems to make sense: https://github.com/sharkwouter/minigalaxy) * how do we call classes, UI elements, etc * do we split into multiple files? e.g. Magic wormhole logic elsewhere than UI logic? Thoughts, known best practices welcome!
Owner

Yeah nice!

I shuffled stuff into a typical package format that I've seen over in https://git.vvvvvvaria.org/rra/dropship/src/branch/its-a-package-ma. Maybe a base to start from? Don't know but in order to split things up into files and have them import each other, I think we need to turn the project into a python package. This new pyproject.toml seems to be a new way to just have a single file instead of 100000s like setup.py, setup.cfg, MANIFEST.in, etc.

If you wanna just go on a rampage of renaming to follow minigalaxy or whatever else, then go for it!

Yeah nice! I shuffled stuff into a typical package format that I've seen over in https://git.vvvvvvaria.org/rra/dropship/src/branch/its-a-package-ma. Maybe a base to start from? Don't know but in order to split things up into files and have them import each other, I think we need to turn the project into a python package. This new `pyproject.toml` seems to be a new way to just have a single file instead of 100000s like `setup.py`, `setup.cfg`, `MANIFEST.in`, etc. If you wanna just go on a rampage of renaming to follow minigalaxy or whatever else, then go for it!
Owner

OK, so I've merged tranmissions/package branches into a new setup which you can see on main now: https://git.vvvvvvaria.org/rra/dropship. That uses https://python-poetry.org/docs/ for managing the packaging thing which I propose but if it is troublesome, we can remove (I think pyproject.toml can also work with plain pip too). Anyway, any sort of moving/renaming/etc. can go on now from here since we have a "base" package structure now.

OK, so I've merged tranmissions/package branches into a new setup which you can see on main now: https://git.vvvvvvaria.org/rra/dropship. That uses https://python-poetry.org/docs/ for managing the packaging thing which I propose but if it is troublesome, we can remove (I think `pyproject.toml` can also work with plain `pip` too). Anyway, any sort of moving/renaming/etc. can go on now from here since we have a "base" package structure now.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: rra/dropship#5
No description provided.