Conversation
| - name: Publish to PyPI | ||
| env: | ||
| TWINE_USERNAME: "__token__" | ||
| TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} |
There was a problem hiding this comment.
I've deleted the PYPI_TOKEN secret from GH Actions. I assume that's set from your own PyPI account, so feel free to delete it there.
| - name: Publish the Python distributions to PyPI | ||
| run: | | ||
| tox -e release | ||
| uv publish --trusted-publishing=always |
There was a problem hiding this comment.
I've setup the appropriate trusted publishing setup on PyPI just now, so this will be ready to publish. I've also setup the release GH Actions environment.
| @@ -0,0 +1,6 @@ | |||
| { | |||
| $schema: 'https://docs.renovatebot.com/renovate-schema.json', | |||
There was a problem hiding this comment.
I've configured Renovate to run on this repo, once this is merged.
| with contextlib.suppress(PackageNotFoundError): | ||
| __version__ = version("isic-metadata") |
There was a problem hiding this comment.
I've removed __version__ outright. Many sources indicate that it's obsolete, given that importlib.metadata.version is available. Let me know if you think this is a problem.
| from isic_metadata.anatom_site_hierarchical import AnatomSiteEnum | ||
| from isic_metadata.diagnosis_hierarchical import DiagnosisEnum |
There was a problem hiding this comment.
Rather than trying to re-export these classes via isic_metadata.fields, everything is now available via isic_metadata.
However, things that import AnatomSiteEnum or DiagnosisEnum will need to be adjusted to import directly from isic_metadata. This is a breaking change.
| name = "isic-metadata" | ||
| description = "" | ||
| readme = "README.md" | ||
| requires-python = ">=3.12" |
There was a problem hiding this comment.
We really need 3.12 for a lot of modern features.
| dependency_groups = | ||
| lint | ||
| commands = | ||
| pytest --cov-report=html --cov-branch --cov=isic_metadata {posargs} tests |
There was a problem hiding this comment.
Note, this no longer opts into branch coverage. I think it's nice in theory, but in practice, it has a lot of false positives. I skimmed through some of the actual HTML coverage reports with branch coverage enabled and I wasn't impressed.
However, I don't strongly object to turning it back on. Just add to pyproject.toml:
[tool.coverage.run]
branch = true| branches: | ||
| - master | ||
| schedule: | ||
| - cron: "0 0 * * *" |
There was a problem hiding this comment.
I don't think these nightly runs are helpful anymore, now that we have a lockfile. Plus, Renovate will be making PRs weekly.
| @cache | ||
| def reverse_ordered_hierarchy(cls) -> list[str]: | ||
| return sorted(cls, key=lambda x: x.value.count(":"), reverse=True) | ||
| def reverse_ordered_hierarchy(cls) -> list[Self]: |
There was a problem hiding this comment.
Technically this is returning a list of AnatomSiteEnum instances.
No description provided.