You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The one thing that would be useful for downstreams is including the test files in the sdist uploaded to pypy: at present, these are downloaded separately, but sometimes git tags move, github-generated source tarballs change their SHA, etc. Having a single distribution, with a published SHA256, would simplify things a bit, but it's not a huge lift, and worth it to have tests.
sdist releases are - as the name says - source releases, in contrast to egg/wheel/bin releases, so it should be no issue to put the tests next to the sources.
Acceptance criteria:
tests are part of the sdist bundle
tests are not installed, when the sdist bundle is actually installed via pip or something
Releases should include the tests in the sdist build, from now on.
I am not certain if the pure tests folder is enough. Please test the latest sdist release and tell me if it was sufficient.
I would expect that you still need to install the test/dev dependencies somehow.
Could you check and confirm everything is as you need it?
One last missing piece of testing the package as-installed is the expectation of the relative path to the schema content:
==================================== ERRORS ====================================
_____________________ ERROR collecting tests/test_spdx.py ______________________
tests/test_spdx.py:29: in <module>
with open(path_join(dirname(__file__), '..', 'cyclonedx', 'schema', 'spdx.schema.json')) as spdx_schema:
E FileNotFoundError: [Errno 2] No such file or directory: '$SRC_DIR/tests/../cyclonedx/schema/spdx.schema.json'
=========================== short test summary info ============================
ERROR tests/test_spdx.py - FileNotFoundError: [Errno 2] No such file or direc...
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.47s ===============================
I've added this patch which seems to do the trick, and can do a proper PR if there isn't a whole ceremony around it with CLAs, etc.
Also note (and I believe this is poetry-related, but have forgotten, frankly), but somehow the LICENSE ends up in the root of site-packages/ when installed. We hack around it, and will seldom create a problem for your users: pip will happily, non-deterministically clobber files all day. However, conda (and especially some downstream tooling like constructor) gets real huffy, though.
Also note (and I believe this is poetry-related, but have forgotten, frankly), but somehow the LICENSE ends up in the root of site-packages/ when installed. We hack around it, and will seldom create a problem for your users: pip will happily, non-deterministically clobber files all day. However, conda (and especially some downstream tooling like constructor) gets real huffy, though.
SOrry to hear.
Yes, this is an issue with poetry that I noticed, too.
It was fixed a year ago, now it is back for a while and I gave up on the poor test quality of poetry dev team.
I'll see what I can do.
Activity
[-]feat: include tests in sdist releases[/-][+]feat: include tests in `sdist` releases[/+]jkowalleck commentedon Jan 11, 2023
@bollwyvl does the current ticket description suite your needs?
If not, please help me shape it properly.
feat: include `tests` in `sdist` builds
bollwyvl commentedon Jan 11, 2023
Yep, that's great. Likely it's a one-liner in e.g.
pyproject.tomlor (at worst),setup.{cfg,py}andMANIFEST.in.fix(tests): include tests in `sdist` builds (#337)
jkowalleck commentedon Jan 12, 2023
@bollwyvl
Releases should include the tests in the
sdistbuild, from now on.I am not certain if the pure
testsfolder is enough. Please test the latestsdistrelease and tell me if it was sufficient.I would expect that you still need to install the test/dev dependencies somehow.
Could you check and confirm everything is as you need it?
bollwyvl commentedon Jan 12, 2023
One last missing piece of testing the package as-installed is the expectation of the relative path to the
schemacontent:I've added this patch which seems to do the trick, and can do a proper PR if there isn't a whole ceremony around it with CLAs, etc.
Also note (and I believe this is
poetry-related, but have forgotten, frankly), but somehow theLICENSEends up in the root ofsite-packages/when installed. We hack around it, and will seldom create a problem for your users:pipwill happily, non-deterministically clobber files all day. However,conda(and especially some downstream tooling likeconstructor) gets real huffy, though.jkowalleck commentedon Jan 12, 2023
Sounds reasonable. Will incorporate this patch in our tests.
jkowalleck commentedon Jan 12, 2023
SOrry to hear.
Yes, this is an issue with poetry that I noticed, too.
It was fixed a year ago, now it is back for a while and I gave up on the poor test quality of poetry dev team.
I'll see what I can do.
jkowalleck commentedon Jan 12, 2023
@bollwyvl ,
Once again, I thank you for helping improve this lib.
The extra
LICENSEfile and the mentioned path issue should be fixed with the next bug fix release.