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

Move storage types to a different module #2010

Merged
merged 3 commits into from
Jun 13, 2024
Merged

Conversation

ogayot
Copy link
Member

@ogayot ogayot commented Jun 11, 2024

The types.py module is getting difficult to navigate and I would like to split it into multiple units. This PR moves all the storage related types to a different module.

I have already opened a PR in udi to support multiple files in the generator: canonical/ubuntu-desktop-provision#765

which should allow to apply the following in https://github.com/canonical/ubuntu-desktop-provision/blob/main/packages/subiquity_client/Makefile:

-types_py = ../subiquity/subiquity/common/types.py
+types_py = ../subiquity/subiquity/common/types/__init__.py \
+           ../subiquity/subiquity/common/types/storage.py

ogayot added 2 commits June 11, 2024 07:51
We have many types defined in commont/types.py and it is getting
difficult to navigate. By moving their definition to a module, we will
be able to move some of those to a different file.

Signed-off-by: Olivier Gayot <[email protected]>
The documentation (i.e., a comment) of the common/types module was
written before the split between client/server processes split. Refresh
it with up-to-date info and also make it a doctstring to be more useful.

Signed-off-by: Olivier Gayot <[email protected]>
Copy link
Collaborator

@Chris-Peterson444 Chris-Peterson444 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! I agree it was getting unwieldy. LGTM.

@ogayot ogayot merged commit 1804e16 into canonical:main Jun 13, 2024
10 checks passed
@ogayot ogayot deleted the types-storage branch June 13, 2024 07: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.

3 participants