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

Use relative paths for access to modules (avoid sys.path fiddling) #151

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

mikix
Copy link
Contributor

@mikix mikix commented Jul 15, 2024

This is a cherry-pick from #134 (which has other unrelated patches in it, which is why I'm making a separate, focused PR) and a commit of my own invention to drop an old python2-workaround from the templates (which gets us back in sync with how fhir-parser does it in the sample templates).

This drops python2 support without bumping the major version. I think though, that fhirclient's versioning is a little unique. Maybe it's worth talking about. Here's how I was thinking about it:

  • Major version matches the version of FHIR we support.
  • Minor versions are new features like normal.
  • We try like heck to avoid breaking changes, and shout from the rooftops if they are absolutely needed.
  • But Python versions going out of support maybe we don't bother flagging as breaking changes (I know that it's a common Python library practice to bump major versions when you drop support for an EOL Python runtime, but imho that's not a super critical practice, as long as you flag which pythons you support in your package metadata -- A pip install run that is stuck on old runtimes won't download your new package)

If we don't like the above approach, I could buy disconnecting the major version from the FHIR version and just making it clear what the support matrix is (like our README kind of already does).

Fixes #110

Copy link

github-actions bot commented Jul 15, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
529 243 46% 45% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
fhirclient/_init_.py 100% 🟢
fhirclient/auth.py 44% 🟢
fhirclient/client.py 46% 🟢
fhirclient/server.py 49% 🟢
TOTAL 60% 🟢

updated for commit: 54e6313 by action🐍

@mikix mikix force-pushed the mikix/drop-path-edits branch 4 times, most recently from b72c65e to c680f40 Compare July 15, 2024 17:12
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 test just written to bump up our code coverage from 35% to 45%

@mikix mikix marked this pull request as ready for review July 15, 2024 17:15
These are unnecessary nowadays and dropping them will reduce
complexity and improve coverage reporting.
Comment on lines -45 to +47
if: github.ref != 'refs/heads/main'
# Disable coverage checking from forks until there is a secure fix for:
# https://github.com/orgoro/coverage/issues/259
if: github.ref != 'refs/heads/main' && ${{ ! github.event.pull_request.head.repo.fork }}
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 is unrelated, but I noticed this problem when trying to to land #109 -- coverage fails on fork branches 😦

Copy link
Contributor

Choose a reason for hiding this comment

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

oh fascinating - i guess that should probably be something we do elsewhere.

Comment on lines -45 to +47
if: github.ref != 'refs/heads/main'
# Disable coverage checking from forks until there is a secure fix for:
# https://github.com/orgoro/coverage/issues/259
if: github.ref != 'refs/heads/main' && ${{ ! github.event.pull_request.head.repo.fork }}
Copy link
Contributor

Choose a reason for hiding this comment

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

oh fascinating - i guess that should probably be something we do elsewhere.

@mikix mikix merged commit 067997e into main Jul 15, 2024
5 checks passed
@mikix mikix deleted the mikix/drop-path-edits branch July 15, 2024 20:34
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.

Cannot have a package named 'models' in project
3 participants