From 33ca86270fd7f0430385bb9d0d22cf53bd4a9515 Mon Sep 17 00:00:00 2001 From: Jirka Date: Wed, 22 Feb 2023 09:47:42 +0100 Subject: [PATCH 1/4] pkg: add missing requirements in manifest --- MANIFEST.in | 3 +++ setup.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index ce2bd087..32389ce2 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,6 +4,9 @@ include LICENSE include versioneer.py include rising/_version.py +# Include the Requirements +recursive-include requirements *.txt + # Exclude build configs exclude *.yml exclude *.yaml diff --git a/setup.py b/setup.py index 9ec0afa2..f34ba9c9 100644 --- a/setup.py +++ b/setup.py @@ -13,12 +13,14 @@ def resolve_requirements(file): + path_dir = os.path.dirname(file) requirements = [] with open(file) as f: req = f.read().splitlines() for r in req: + r_path = os.path.join(path_dir, r.split(" ")[1]) if r.startswith("-r"): - requirements += resolve_requirements(os.path.join(os.path.dirname(file), r.split(" ")[1])) + requirements += resolve_requirements(r_path) else: requirements.append(r) return requirements From 6ade95c856b43a73c581381e2e57b2f91a4e3233 Mon Sep 17 00:00:00 2001 From: Jirka Date: Wed, 22 Feb 2023 09:49:55 +0100 Subject: [PATCH 2/4] fix docs --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index fcfe9ff8..2910cf73 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -26,7 +26,7 @@ import rising # noqa: E402 for md in ["CONTRIBUTING.md", "README.md"]: - shutil.copy(os.path.join(PATH_ROOT, md), os.path.join(PATH_HERE, md.lower())) + shutil.copy(os.path.join(PATH_ROOT, ".github", md), os.path.join(PATH_HERE, md.lower())) converted_readme = pypandoc.convert_file("readme.md", "rst").split("\n") os.remove("readme.md") From 4865fed58accc1fa3c6c06e2d7f00eceb7187440 Mon Sep 17 00:00:00 2001 From: Jirka Date: Wed, 22 Feb 2023 10:08:27 +0100 Subject: [PATCH 3/4] revert --- .github/workflows/unittests.yml | 11 ++++------- setup.py | 3 +-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index b4fd6920..0b212d8b 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -30,22 +30,19 @@ jobs: with: path: ${{ steps.pip-cache.outputs.dir }} key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') }} - restore-keys: | - ${{ runner.os }}-pip-py${{ matrix.python-version }}- + restore-keys: ${{ runner.os }}-pip-py${{ matrix.python-version }}- - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -U pip wheel; - pip install -r requirements/install.txt -r requirements/install_async.txt -r requirements/unittests.txt --extra-index-url https://download.pytorch.org/whl/cpu; + pip install -U pip wheel + pip install -r requirements/install.txt -r requirements/install_async.txt -r requirements/unittests.txt --extra-index-url https://download.pytorch.org/whl/cpu pip install --no-deps . - name: Run Tests - run: | - coverage run -m unittest + run: coverage run -m unittest - name: Statistics - if: success() run: | coverage report coverage xml diff --git a/setup.py b/setup.py index f34ba9c9..c14e3161 100644 --- a/setup.py +++ b/setup.py @@ -13,13 +13,12 @@ def resolve_requirements(file): - path_dir = os.path.dirname(file) requirements = [] with open(file) as f: req = f.read().splitlines() for r in req: - r_path = os.path.join(path_dir, r.split(" ")[1]) if r.startswith("-r"): + r_path = os.path.join(os.path.dirname(file), r.split(" ")[1]) requirements += resolve_requirements(r_path) else: requirements.append(r) From e1101231fa2466cf3015bbec7ce9b821f36edafb Mon Sep 17 00:00:00 2001 From: Jirka Date: Wed, 22 Feb 2023 10:50:05 +0100 Subject: [PATCH 4/4] docs copy --- docs/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 2910cf73..13368637 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -25,8 +25,8 @@ import rising # noqa: E402 -for md in ["CONTRIBUTING.md", "README.md"]: - shutil.copy(os.path.join(PATH_ROOT, ".github", md), os.path.join(PATH_HERE, md.lower())) +shutil.copy(os.path.join(PATH_ROOT, "README.md"), os.path.join(PATH_HERE, "readme.md")) +shutil.copy(os.path.join(PATH_ROOT, ".github", "CONTRIBUTING.md"), os.path.join(PATH_HERE, "contributing.md")) converted_readme = pypandoc.convert_file("readme.md", "rst").split("\n") os.remove("readme.md")