-
Notifications
You must be signed in to change notification settings - Fork 0
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
build: use pyproject.toml to declare configs #112
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor comments. Checks on the PR and commit look good to me.
One question: could you do a random pypi release now to ensure that the setuptools-scm or whatnot works as expected? Or do we have to do this after this PR gets merged
run: | | ||
python3 -m pip install ".[tests]" | ||
|
||
# TODO -- build CI-ready unit tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preempted my thoughts here: would it be an easy win to add the current unit tests (pytest tests/unit
) to the CI in this PR? Or were you considering it out of scope for the current PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't think too hard about how nontrivial it would be to get these working, but I think there's still some configuration that would have to happen for the CI instance to be able to run them. Here's an example run trying every test: https://github.com/gks-anvil/vrs_anvil_toolkit/actions/runs/13637983594/job/38121227703
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay fair enough, we can make it out of scope then. I think the main problem is the supposed "unit tests" we created are pointing to an already downloaded seqrepo dir when testing occurs. Not sure how you do it in vrs-python but would be inclined to do it that same way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah. For SeqRepo, we use the REST dataproxy in tests and then use something like pytest vcr to capture + stash the HTTP requests so that they can be used during CI/CD. It's a little painful but it works. I can make another issue to work that out.
Yeah good question @quinnwai . We've been using this exact workflow in all of our libs for a few years and it's held pretty steady, I took it straight from our template repo https://github.com/GenomicMedLab/software-templates/blob/main/python/%7B%7Bcookiecutter.project_slug%7D%7D/.github/workflows/release.yaml. See eg https://github.com/GenomicMedLab/cool-seq-tool/actions/workflows/release.yml We can do a partial test right now. Just for kicks, I made a new release from the front of this branch. You can see progress here: https://github.com/gks-anvil/vrs_anvil_toolkit/actions/runs/13639823319. Basically, it builds successfully, but hits an error why submitting to PyPI because GitHub hasn't been added as a trusted publisher on the PyPI side yet. Before it can completely run, someone with management access to the project on PyPI needs to do a few configurations: https://docs.pypi.org/trusted-publishers/adding-a-publisher/. We could briefly talk about this at the meeting tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, created a trusted publisher and tested that the PyPi release works as expected. Ping me your username I can add you to the admin to the pypi as well
🚀
pyproject.toml
. This is the PyPA's recommended declaration model and lets you consolidate a couple of files and settings into one place.