-
Notifications
You must be signed in to change notification settings - Fork 34
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
Testing as-installed package downstream #40
Comments
Sure! PR welcome :) I would like to change the packaging to use pants and add some additional build automation to the pipeline - just not seeming to find enough time this month to sit down and make it happen! |
Looks like we lost |
Are the rest of the requested features now archived? Or is there something else? |
The tests are also still not included in the |
Also the PyPI index page contains no long description. |
I know about the long description - was willing for that to be parked for now, plan was to symlink it. Might need to do the same with the license - is that required?? For the tests, pants will never package these as they are not a dependency of the target. I thought conda-forge could have its own way for build and test though - so can it not clone this repo itself and run make test, make build |
Yeah, willing to work around the stuff mentioned (e.g. already fetching the
GitHub-generated tarballs are not stable over time, and VCS tags can be moved: having a canonical source distribution on PyPI allows for more thorough provenance. PyPI tarballs can be yanked, of course, but that's usually a strong indicator that something is really broken... but folk don't usually delete their broken VCS tags. |
LICENSE, long description added in - #52 Will make a separate PR for tests, need to think it through more... |
See #53 for testable sdist |
If this is as expected, then I'm happy to merge and include in the next release. |
Thanks for the update. Downstream, still seeing one missing test file in the sdist, but it's easy to skip a single test for now:
|
Actually, looks like the file is in the sdist, it's just not found during test. |
Interesting... I have added a test in the pipeline to check that the sdist tests work by unzipping, cd into new directory and then running pytest. All works fine in the pipes |
yes, that would work as the paths are all relative. The approach we generally use is: pip install .
# get a clean env with the package installed, and a clean working folder
pytest -m jsf copying only that file to Again, the answer can just be "testing the as-installed packages is not supported," if this is becoming a hassle. |
make build && tar -xvf dist/jsf-0.5.4.tar.gz
cd jsf-0.5.4
pip install .
pytest -m jsf ========================================= test session starts =========================================
platform darwin -- Python 3.9.13, pytest-7.2.0, pluggy-1.0.0
rootdir: /Users/andrewchallis/Documents/jsf/jsf/jsf-0.5.4
plugins: Faker-15.3.4
collected 71 items / 71 deselected / 0 selected
======================================= 71 deselected in 0.26s ======================================== I'm a little confused as to the expectation... is it to cd into the |
eg cd /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jsf
pytest Then I get 1 failure |
Updated pipe to test as such, and changed the remote test to use a remote file through HTTP back to this same repo. #57 |
Only thing to be consious of, is the testing requirements - currently just pytest and pyjwt, not sure how conda suggests you manage that? |
that's fine, i suppose. When dealing with remote resources in schema, it's also possible to use a It's also possible to use e.g.
The top-level structure of the build description has a |
Awesome, good to close this issue? Can reopen if theres other things found :) |
Sorry for the delay: just shipped conda-forge/jsf-feedstock#6 with tests and licenses sourced from the sdist, and no patches 🎉 ! Thanks again. |
Awesome! Is it a process that's automated for future releases? Or will someone need to raise PR's on feedstock? |
Thanks for this package!
It would be lovely for downstream packagers if the
tests
:sdist
on PyPIimport jsf
rather thanimport ..jsf
so that they could test the as-installed packageI'd be happy to work up a PR that did these things, if that was desirable.
Motivation: I'm looking to package this for conda-forge:
The lack of tests aren't a hold-up, but do help us catch metadata creep which is only semi-automated.
Thanks again!
The text was updated successfully, but these errors were encountered: