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

Updated tests, add CI hook #21

Merged
merged 2 commits into from
Jul 30, 2024
Merged

Updated tests, add CI hook #21

merged 2 commits into from
Jul 30, 2024

Conversation

dogversioning
Copy link
Contributor

@dogversioning dogversioning commented Jul 30, 2024

This PR makes the following changes:

  • Fixes a bug that was introduced during PR cleanup
  • Fixes a bug related to defining table configs at the class level in rxnorm_vsac builder
  • Adds CI for unit testing (though this will not be enforced on this repo for PRs to avoid conflicting with research work)

@dogversioning dogversioning changed the base branch from v2_cutover to main July 30, 2024 15:04
@dogversioning dogversioning changed the base branch from main to v2_cutover July 30, 2024 15:05
@dogversioning dogversioning force-pushed the mg/test_updates branch 6 times, most recently from 6c7bc13 to c2a5666 Compare July 30, 2024 16:32
@dogversioning dogversioning marked this pull request as ready for review July 30, 2024 16:37
jobs:
unittest:
name: unit tests
runs-on: ubuntu-22.04
Copy link

Choose a reason for hiding this comment

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

nit: maybe use latest here, since you're not doing anything specific like "apt install"ing.

Comment on lines 25 to 30
- name: Get library from main
run: |
git clone https://github.com/smart-on-fhir/cumulus-library.git
cd cumulus-library
pip install -e .
cd ..
Copy link

Choose a reason for hiding this comment

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

nit: since you don't actually end up using the checkout, you could get away with this:

      - name: Get library from main
        run: pip install git+https://github.com/smart-on-fhir/cumulus-library.git

Do you maybe want this after the "install dependencies" stanza? 1) you get the latest pip first that way and 2) what if your pyproject has a dependency pin like "cumulus-library >=2, <3" -- it could silently undo the install-from-main here. (I know this PR also unpins the library a bit, but still - it's the silent nature of it here that could hide issues with the ordering)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oooh fancy, i like it.

I don't want this in the dependencies stanza, since this is currently pinned to 3.0, which is not yet released.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

when it :is: released i'm going to remove this stanza entirely.

Comment on lines -37 to +38
b_join_col = b_join_col or 'b.rxcui'
b_table = b_table or f'opioid__{steward}_vsac',
b_join_col = b_join_col or 'b.code'
b_table = b_table or f'opioid__{steward}_vsac'
Copy link

Choose a reason for hiding this comment

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

Python is wrong here 😄 - it should really require parens or something to make the theoretical "I want a tuple" clearer

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 has bitten me in both directions more times than i'd care to count

tests/test_additional_rules_builder.py Outdated Show resolved Hide resolved
@dogversioning dogversioning merged commit b2e5d49 into v2_cutover Jul 30, 2024
1 check passed
@dogversioning dogversioning deleted the mg/test_updates branch July 30, 2024 19:20
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