Skip to content
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

Refactor systems #660

Merged
merged 12 commits into from
Oct 4, 2023
Merged

Refactor systems #660

merged 12 commits into from
Oct 4, 2023

Conversation

stefsmeets
Copy link
Collaborator

@stefsmeets stefsmeets commented Oct 3, 2023

The goal of this PR is to move the specific systems code to their own submodules. The motivation behind is that this will help organize the code, and make it more obvious where to put new systems in the future.

As a result of moving the code, this uncovered some accrued technical debt in our import systems and circular scheme dependencies. I have attempted to resolve this by 1. Moving type checking imports under TYPE_CHECKING where possible, 2. breaking circularity in systems by moving some imports into functions (reminder for future us, do not mix config, models, and application code), 3. using factories in the cli config (you cannot forward reference models needed to generate defaults otherwise), and 4. revising how the config is passed to the systems.

At this point, tests are passing and mypy is happy.

Closes #633

TODO

  • Move remaining jetto models to systems/jetto (follow-up PR)
  • Update docs / verify if working
  • Test on gateway / with imas container

@stefsmeets stefsmeets changed the title Systems2 Refactor systems Oct 3, 2023
@stefsmeets stefsmeets marked this pull request as ready for review October 4, 2023 11:31
@stefsmeets stefsmeets merged commit 6e714f0 into main Oct 4, 2023
@stefsmeets stefsmeets deleted the systems2 branch October 4, 2023 11:45
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.

Move jetto / ets pydantic models to their system's submodule
1 participant