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

Better CI for checking the files. #62

Open
xiki-tempula opened this issue Oct 26, 2021 · 7 comments
Open

Better CI for checking the files. #62

xiki-tempula opened this issue Oct 26, 2021 · 7 comments
Labels
testing tests and testing framework

Comments

@xiki-tempula
Copy link
Collaborator

I don't know what is the solution to this but it can be the case that people forget to change the MANIFEST.in to include the corresponding files.

This would not raise any problem if one were to check out the branch and install it, which is what the current CI is doing.

However, it would be a problem if one were to install it with https://github.com/alchemistry/alchemtest/archive/master.zip, where the files not in the MANIFEST.in would not be included in the master.zip, which I don't know how to make the CI check this.

@orbeckst
Copy link
Member

Missing entries in MANIFEST.in break the distribution files, namely the packages on pypi!

For a start we can add an entry that builds the package

python setup.py sdist

then checks with twine check; we do something like that in MDAnalysis and a few other repos — the MDA example is https://github.com/MDAnalysis/mdanalysis/blob/9b37cd676f22bea14e715ade32b0714f1057a553/.github/workflows/gh-ci.yaml#L343-L348

This check would likely not notice missing entries in MANIFEST.in, though. But one could then install the dist file in a virtualenv and run a test there.

@richardjgowers
Copy link

The latter half of @orbeckst 's comment is what we do for MDA and it often catches mistakes in MANIFEST around new files

@orbeckst orbeckst added the testing tests and testing framework label Jul 28, 2022
orbeckst added a commit that referenced this issue Sep 27, 2022
partially addresses #62
@orbeckst
Copy link
Member

@richardjgowers @IAlibay where in the MDA CI do we install the source package (or wheel) in a virtual env and then run tests to check that we can install it?

@IAlibay
Copy link
Contributor

IAlibay commented Sep 27, 2022

@richardjgowers @IAlibay where in the MDA CI do we install the source package (or wheel) in a virtual env and then run tests to check that we can install it?

Sorry I'm coming in here blind, do you mean on deployment or during CI?

@orbeckst
Copy link
Member

During CI — at least how I read @richardjgowers ' comment #62 (comment). But maybe it was part of the deployment workflow.

@richardjgowers
Copy link

Ah right I (used to) do it manually as part of the release process. As a CI step it would be to do a sdist then install from the resulting tarball and do some tests

@IAlibay
Copy link
Contributor

IAlibay commented Sep 27, 2022

tbh it's in our CD pipeline, you could just run that bit as part of CI (indeed we sorta would if we hadn't turned it off because it's a lot to run).

I'm assuming here what you need is just "use pipx to create wheels and tarball" "install from tarball / wheel and run CI"?

It's not major amounts of work to implement.

orbeckst added a commit that referenced this issue Sep 27, 2022
* partially addresses #62
* CI: add pypi package check
* CI test matrix: expanded exclusions
  - run all supported on ubuntu-latest
  - only run macOS-latest on 2.7 and lowest/highest supported 3.x
  - only run windows-latest on 2.7 and lowest/highest supported 3.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing tests and testing framework
Projects
None yet
Development

No branches or pull requests

4 participants