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 logic from __init_.py to schema submodules. Ref #3. #10

Merged
merged 2 commits into from
Jan 13, 2024

Conversation

tompollard
Copy link
Contributor

@tompollard tompollard commented Jan 12, 2024

Currently most of the logic in this repository is in https://github.com/Medical-Event-Data-Standard/meds/blob/main/src/meds/__init__.py (see #3).

This pull request addresses #3 by:

  1. renaming __init__.py to schema.py.
  2. creating a new __init__.py
  3. adding deprecation notices to __init__.py for the old import syntax.

Why make this change? The goal is to move the repository towards a more modular strucure, making it simpler to navigate and maintain and more flexible if we expand in future.

The old import syntax will continue to work, but it has been marked as deprecated:

  • Deprecated: from meds import patient_schema.
  • New: from meds.schema import patient_schema.

@tompollard tompollard changed the title [Draft] Move logic from __init_.py to schema submodules. Ref #3. Move logic from __init_.py to schema submodules. Ref #3. Jan 13, 2024
@EthanSteinberg
Copy link
Collaborator

This all looks good! I like the deprecation warning to make this easier to merge

@tompollard
Copy link
Contributor Author

thanks ethan!

@tompollard tompollard merged commit ae30adc into main Jan 13, 2024
1 check passed
@tompollard tompollard deleted the tp/init_to_module branch January 13, 2024 18:39
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.

2 participants