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

ensure requirements.txt is included in the sdist, exclude performance and importable tests #207

Merged
merged 6 commits into from
May 25, 2023

Conversation

bollwyvl
Copy link
Contributor

@bollwyvl bollwyvl commented May 18, 2023

Congrats on 1.0.0!

Noted on the conda-forge WIP PR, this PR:

  • ensures the requirements.txt is included in the PyPI .tar.gz
    • setup.py needs it to install

  • excludes the performance package from find_packages, which gets deployed to site-packages
    • there is no performance package on PyPI (crazy!) but, still

  • make tests a module (also excluded from find_packages)
    • otherwise downstreams have to monkey with PYTHONPATH

of course, any of the following would be welcome over there:

  • review
  • insights on how we might test this beast
  • co-maintainers (or a nod to add @conda-forge/jupyterhub) :P
  • bounding the traefik dependency?
    • maybe a CLI check?
  • thoughts about improving the formal metadata for optional runtime (hard test time) deps of python-consul2, etcdpy, ruamel.yaml...
    • extras? (bleah)
    • more subpackages/monorepo?
    • maybe making some of the options behind ImportError guards in conftest.py, so we could at least -k down to something reasonable?

@welcome
Copy link

welcome bot commented May 18, 2023

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@bollwyvl bollwyvl changed the title ensure requirements.txt is included in the sdist ensure requirements.txt is included in the sdist, exclude performance May 18, 2023
@bollwyvl bollwyvl changed the title ensure requirements.txt is included in the sdist, exclude performance ensure requirements.txt is included in the sdist, exclude performance and importable tests May 18, 2023
@bollwyvl
Copy link
Contributor Author

Over on the conda-forge PR, i've actually got most things up and testing, and things look fine locally. It's skipping the etcd and consul tests, uses the GitHub tarball, for now. Still waiting for traefik to go live, though...

@minrk
Copy link
Member

minrk commented May 22, 2023

For optional features (multiple implementations), extras are definitely the way to go. For conda, that can be a -suffix.

If this is working for you, I can merge and make a 1.0.1 to fix the performance inclusion, at least.

@bollwyvl
Copy link
Contributor Author

These patches aren't quite yet working under test... need to try the ol' localhost -> 127.0.0.1 patch over on conda-forge/staged-recipes#22870 (comment) , where docker(in-docker? k8s?) has some issues.

@bollwyvl
Copy link
Contributor Author

extras are definitely the way to go.

Shall i add those on this PR?

@bollwyvl
Copy link
Contributor Author

Yeah, so replacing every instance of localhost with 127.0.0.1 is finally showing some results.

This seems to be fairly common on some CI platforms... perhaps there's a place to provide a test-time override of this in one place (ideally an environment variable, or a file).

@minrk
Copy link
Member

minrk commented May 23, 2023

Shall i add those on this PR?

If you like. etcd is actually tricky because there are several forks due to maintenance issues, all of which are valid and produce the same import. So we really need an OR dependency. I'm just as content content with leaving it out for now, or adding the extra for convenience. It's not clear what's going to be the etcd Python API package going forward, but I am confident it will change and wouldn't consider this a user-facing change in traefik proxy. More info in #155

need to try the ol' localhost -> 127.0.0.1

localhost was actually required to get the tests going on CI because of some SSL issues with 127, but I don't know if that situation still applies. Moving it to a variable at least makes sense, so it's easier to override in one place (with an environment variable is fine, if it works both ways).

@bollwyvl bollwyvl mentioned this pull request May 23, 2023
2 tasks
@bollwyvl
Copy link
Contributor Author

#208 is being a bit difficult, I guess getting this PR in and iterating would make it easier to move forward... seems fine if 1.0.0 hits conda-forge with patches, so no release would be needed.

@minrk
Copy link
Member

minrk commented May 25, 2023

Sounds good. I'll make 1.0.1 with this and we can keep working separately on making the tests run in more places than our CI and local machines.

@minrk minrk merged commit 76f7a1b into jupyterhub:main May 25, 2023
@welcome
Copy link

welcome bot commented May 25, 2023

Congrats on your first merged pull request in this project! 🎉
congrats
Thank you for contributing, we are very proud of you! ❤️

@minrk
Copy link
Member

minrk commented May 25, 2023

1.0.1 is up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants