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

Uprev to 3.10, namespace clarification #173

Merged
merged 2 commits into from
Feb 5, 2024
Merged

Uprev to 3.10, namespace clarification #173

merged 2 commits into from
Feb 5, 2024

Conversation

dogversioning
Copy link
Contributor

@dogversioning dogversioning commented Feb 5, 2024

This PR makes the following changes:

Checklist

  • Consider if documentation (like in docs/) needs to be updated
  • Consider if tests should be added
  • Run pylint if you're making changes beyond adding studies
  • Update template repo if there are changes to study configuration

Comment on lines -35 to +40
# TODO: upgrade to 3.10+, use kw_only flag to subclass a dataclass for generating source/target
code_sources = [
CCC(column_name="category", is_array=True, filter_priority=False),
CCC(column_name="code", is_array=False, filter_priority=False),
CCC(column_name="interpretation", is_array=True, filter_priority=False),
CCC(column_name="valuecodeableconcept", is_array=False, filter_priority=False),
]
for source in code_sources:
source.source_table = "observation"
source.target_table = f"core__observation_dn_{source.column_name}"
@dataclass(kw_only=True)
class ObsConfig(sql_utils.CodeableConceptConfig):
source_table: str = "observation"

def __post_init__(self):
self.target_table = f"core__observation_dn_{self.column_name}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This (and the kw_only addition to the parent class) is the only true functional change in this PR.

I found this article helpful in understanding the why behind this

@dogversioning dogversioning force-pushed the mg/3.11 branch 6 times, most recently from 80d50b9 to 8a1447e Compare February 5, 2024 19:13
pyproject.toml Outdated Show resolved Hide resolved
@dogversioning dogversioning changed the title Uprev to 3.11, namespace clarification Uprev to 3.10, namespace clarification Feb 5, 2024
python-version: 3.9
python-version: '3.10'
Copy link
Contributor

Choose a reason for hiding this comment

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

small point here: we're only testing on 3.10, but as a command line CLI that doesn't ship with its own python in a docker image (i.e. unlike the ETL) - we should probably test on all supported pythons

Doesn't need to happen on this PR - I filed #174 for it.

@dogversioning dogversioning merged commit 9bb7d2b into main Feb 5, 2024
3 checks passed
@dogversioning dogversioning deleted the mg/3.11 branch February 5, 2024 20:43
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