From 96ca493343f79b12cede382cba6ba27e92c9fd31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jan=C3=9Fen?= Date: Fri, 14 Feb 2025 08:42:42 +0100 Subject: [PATCH] fix pip check for optional dependencies --- .ci_support/check.py | 16 ++++++++++++++++ .github/workflows/pipeline.yml | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .ci_support/check.py diff --git a/.ci_support/check.py b/.ci_support/check.py new file mode 100644 index 00000000..b4a36c54 --- /dev/null +++ b/.ci_support/check.py @@ -0,0 +1,16 @@ +import tomlkit + + +if __name__ == "__main__": + with open("pyproject.toml", "r") as f: + data = tomlkit.load(f) + + lst = [] + for sub_lst in data["project"]["optional-dependencies"].values(): + for el in sub_lst: + lst.append(el) + + data["project"]["dependencies"] += list(set(lst)) + + with open("pyproject.toml", "w") as f: + f.writelines(tomlkit.dumps(data)) \ No newline at end of file diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 16cfdbb0..8aa291e1 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -95,7 +95,9 @@ jobs: - name: Setup shell: bash -l {0} run: | - pip install versioneer[toml]==0.29 + pip install versioneer[toml]==0.29 tomlkit + python .ci_support/check.py + cat pyproject.toml pip install . --no-deps --no-build-isolation pip check