From 060155cf24e7044d028c2dba26a701c2aa3821fb Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Wed, 17 May 2023 21:36:31 -0500 Subject: [PATCH 1/6] ensure requirements.txt is included in the sdist --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index f794f78f..72449366 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,3 @@ include versioneer.py include jupyterhub_traefik_proxy/_version.py +include requirements.txt From 63851f29efa416a69f6961bad05b6b9d5ecce9f4 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Thu, 18 May 2023 08:21:27 -0500 Subject: [PATCH 2/6] exclude the performance package --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 08434d1a..5132eeaa 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ "Programming Language :: Python", "Programming Language :: Python :: 3", ], - packages=find_packages(), + packages=find_packages(exclude=["performance"]), include_package_data=True, entry_points={ "jupyterhub.proxies": [ From 987aab13d742dbd9e574de7f9afd12681a6b7a6d Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Thu, 18 May 2023 08:25:55 -0500 Subject: [PATCH 3/6] also exclude tests --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5132eeaa..ec622e22 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ "Programming Language :: Python", "Programming Language :: Python :: 3", ], - packages=find_packages(exclude=["performance"]), + packages=find_packages(exclude=["performance", "tests"]), include_package_data=True, entry_points={ "jupyterhub.proxies": [ From 7e82fc5687b9f4f8d358e5134c9ac1608115f930 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Thu, 18 May 2023 08:29:53 -0500 Subject: [PATCH 4/6] make tests an importable (but not installed) module, use relative imports --- tests/__init__.py | 0 tests/conftest.py | 3 ++- tests/test_proxy.py | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 tests/__init__.py diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/conftest.py b/tests/conftest.py index 9d62cb0f..e35c0daf 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -13,7 +13,6 @@ from urllib.parse import urlparse import pytest -import utils from certipy import Certipy from consul.aio import Consul from jupyterhub.utils import exponential_backoff @@ -24,6 +23,8 @@ from jupyterhub_traefik_proxy.fileprovider import TraefikFileProviderProxy from jupyterhub_traefik_proxy.traefik_utils import deep_merge +from . import utils + HERE = Path(__file__).parent.resolve() config_files = HERE / "config_files" diff --git a/tests/test_proxy.py b/tests/test_proxy.py index 3cb6ea46..0ce9864e 100644 --- a/tests/test_proxy.py +++ b/tests/test_proxy.py @@ -14,7 +14,6 @@ from urllib.parse import quote, urlparse import pytest -import utils import websockets from jupyterhub.objects import Hub, Server from jupyterhub.user import User @@ -23,6 +22,9 @@ from jupyterhub_traefik_proxy.proxy import TraefikProxy +from . import utils + + # Mark all tests in this file as slow pytestmark = [pytest.mark.slow] From 19da4bdc6ec06fcd15ba36293d5240c36605f85a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 18 May 2023 13:30:29 +0000 Subject: [PATCH 5/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_proxy.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_proxy.py b/tests/test_proxy.py index 0ce9864e..d7099679 100644 --- a/tests/test_proxy.py +++ b/tests/test_proxy.py @@ -24,7 +24,6 @@ from . import utils - # Mark all tests in this file as slow pytestmark = [pytest.mark.slow] From 27e4455a6cd52340816e2ed56d424463c55892ed Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Thu, 18 May 2023 10:05:31 -0500 Subject: [PATCH 6/6] include all tests in sdist --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index 72449366..a6286815 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ include versioneer.py include jupyterhub_traefik_proxy/_version.py include requirements.txt +recursive-include tests *.*