From 33ffc31fbc57dd9b70c42a435c5bd190f6bac0e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peider=20K=C3=B6nz?= Date: Thu, 9 Oct 2025 14:45:01 +0200 Subject: [PATCH 1/5] remove pre-commit and run pytest instead --- .github/workflows/pre-commit.yml | 42 -------------------------------- .github/workflows/pytest.yml | 31 +++++++++++++++++++++++ 2 files changed, 31 insertions(+), 42 deletions(-) delete mode 100644 .github/workflows/pre-commit.yml create mode 100644 .github/workflows/pytest.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index 6be1eee..0000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Run pre-commit in pytrajplot - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - blueprint-pre-commit: - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.11.0 - - uses: conda-incubator/setup-miniconda@v2 - with: - miniconda-version: "latest" - channels: conda-forge - channel-priority: flexible - show-channel-urls: true - - name: Create env from unpinned reqs - run: | - conda create --name dev_env python=3.10 mamba - conda activate dev_env - mamba install --file requirements/requirements.txt - - name: Install project into env - run: | - conda run --name dev_env pip install --no-deps . - - name: Install pre-commit hooks - run: | - conda run --name dev_env pre-commit install-hooks - - name: Run pre-commit hooks - run: | - conda run --name dev_env pre-commit run --all-files diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml new file mode 100644 index 0000000..b27323d --- /dev/null +++ b/.github/workflows/pytest.yml @@ -0,0 +1,31 @@ +name: Run pytest in pytrajplot + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + blueprint-pytest: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.11.0 + - uses: conda-incubator/setup-miniconda@v2 + with: + miniconda-version: "latest" + channels: conda-forge + channel-priority: flexible + show-channel-urls: true + - name: Run pytest + run: | + pytest From c9931df56d92d794a84505ae155b9831974bfe79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peider=20K=C3=B6nz?= Date: Thu, 9 Oct 2025 14:53:44 +0200 Subject: [PATCH 2/5] remove pre-commit and run pytest instead --- .github/workflows/pytest.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index b27323d..f3c0838 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -28,4 +28,6 @@ jobs: show-channel-urls: true - name: Run pytest run: | + conda activate + conda activate pytrajplot pytest From 60ed9baa6d38ba9fe05b5d28245dbb932ca30fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peider=20K=C3=B6nz?= Date: Thu, 9 Oct 2025 15:22:05 +0200 Subject: [PATCH 3/5] remove pre-commit and run pytest instead --- .github/workflows/pytest.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index f3c0838..f6430e1 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -26,8 +26,11 @@ jobs: channels: conda-forge channel-priority: flexible show-channel-urls: true + - name: Create env + run: | + pip install --no-deps --editable . - name: Run pytest run: | conda activate conda activate pytrajplot - pytest + pytest \ No newline at end of file From 5cbbe638b396ec6a895c629ec4904f0167875e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peider=20K=C3=B6nz?= Date: Thu, 9 Oct 2025 16:26:03 +0200 Subject: [PATCH 4/5] remove pre-commit and run pytest instead --- .github/workflows/pytest.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index f6430e1..44e0d73 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -26,11 +26,13 @@ jobs: channels: conda-forge channel-priority: flexible show-channel-urls: true - - name: Create env + - name: Create env from pinned reqs run: | - pip install --no-deps --editable . + conda activate + conda env create --name pytrajplot --file requirements/environment.yml + - name: Install project into env + run: | + conda run --name pytrajplot pip install --no-deps . - name: Run pytest run: | - conda activate - conda activate pytrajplot - pytest \ No newline at end of file + conda run --name pytrajplot pytest run --all-files From ca6a07bccd5d4a81791fcfbc0662914bc956a69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peider=20K=C3=B6nz?= Date: Thu, 9 Oct 2025 16:34:03 +0200 Subject: [PATCH 5/5] remove pre-commit and run pytest instead --- .github/workflows/pytest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 44e0d73..314a5ae 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -35,4 +35,4 @@ jobs: conda run --name pytrajplot pip install --no-deps . - name: Run pytest run: | - conda run --name pytrajplot pytest run --all-files + conda run --name pytrajplot pytest tests