From 466b61c982012cd9424e883c390949dd2af5a878 Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Mon, 11 Dec 2023 17:46:22 +0000 Subject: [PATCH 01/17] Update pytest-ci.yml --- .github/workflows/pytest-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-ci.yml b/.github/workflows/pytest-ci.yml index 828e6cf..4575653 100644 --- a/.github/workflows/pytest-ci.yml +++ b/.github/workflows/pytest-ci.yml @@ -29,4 +29,4 @@ jobs: pip install -r requirements.txt - name: Pytest -> ${{ matrix.module-name }}$ run: | - pytest -v --disable-warnings -l ./tests/test_${{ matrix.module-name }}.py + pytest -v --disable-warnings -l **/tests/test_${{ matrix.module-name }}.py From 5328e2eebb19b0eeb02cdb88e9189b81bc4acbed Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Mon, 11 Dec 2023 17:57:14 +0000 Subject: [PATCH 02/17] Update pytest-ci.yml --- .github/workflows/pytest-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pytest-ci.yml b/.github/workflows/pytest-ci.yml index 4575653..f0cfafc 100644 --- a/.github/workflows/pytest-ci.yml +++ b/.github/workflows/pytest-ci.yml @@ -8,6 +8,7 @@ on: - '*.py' workflow_dispatch: jobs: + build: runs-on: ubuntu-latest strategy: From 0499702ebdc49b52245bb2f4a3edf5fe4fcf6756 Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Mon, 11 Dec 2023 17:58:38 +0000 Subject: [PATCH 03/17] Create labeler.yml --- .github/labeler.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1 @@ + From 0e474aba8fd1e0c647f87cf4331eb493ce0d8022 Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Mon, 11 Dec 2023 18:14:03 +0000 Subject: [PATCH 04/17] Update labeler.yml --- .github/labeler.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 8b13789..df7eac4 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1 +1,4 @@ - +core: ['**/core/*.py'] +documentation: ['**/doc*'] +tests: ['**/tests/*test*.py'] +tools: ['**/tools/*.py'] From 907df20528b3c7125963b875afdaf8df83ae7179 Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Mon, 11 Dec 2023 18:17:56 +0000 Subject: [PATCH 05/17] Create label.yml --- .github/workflows/label.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/label.yml diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml new file mode 100644 index 0000000..8c1a73b --- /dev/null +++ b/.github/workflows/label.yml @@ -0,0 +1,26 @@ +# This workflow will triage pull requests and apply a label based on the +# paths that are modified in the pull request. +# +# To use this workflow, you will need to set up a .github/labeler.yml +# file with configuration. For more information, see: +# https://github.com/actions/labeler + +name: Labeler +on: [pull_request_target] + +jobs: + label: + + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + + steps: + - uses: actions/labeler@v4 + with: + configuration-path: .github/labeler.yml + enable-versioned-regex: 0 + include-title: 1 + repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: 1 From 1791b9df34778f82aebb5b8ddea6031af0bf52ba Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Mon, 11 Dec 2023 19:04:21 +0000 Subject: [PATCH 06/17] Update pytest-ci.yml --- .github/workflows/pytest-ci.yml | 50 +++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pytest-ci.yml b/.github/workflows/pytest-ci.yml index f0cfafc..a53f30e 100644 --- a/.github/workflows/pytest-ci.yml +++ b/.github/workflows/pytest-ci.yml @@ -8,8 +8,8 @@ on: - '*.py' workflow_dispatch: jobs: - - build: + build-tests: + name: Pytest runs-on: ubuntu-latest strategy: fail-fast: false @@ -26,8 +26,48 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install flake8 pytest + python -m pip install pytest pytest-cov pip install -r requirements.txt - - name: Pytest -> ${{ matrix.module-name }}$ + - with: + test-file: ${{ matr.module-name }} + - name: Pytest -> ${{ test-file }} run: | - pytest -v --disable-warnings -l **/tests/test_${{ matrix.module-name }}.py + pytest -v --disable-warnings -l **/tests/test_${{ test-file }}.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html + - name: Upload pytest test results + uses: actions/upload-artifact@v3 + with: + name: pytest-results-${{ matrix.python-version }} + path: junit/test-results-${{ matrix.python-version }}.xml + # Use always() to always run this step to publish test results when there are test failures + if: ${{ always() }} + + + + + + build-linter: + name: Pylint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8","3.9", "3.12"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + cache: pip + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ruff + pip install -r requirements.txt + - name: Analysing the code with pylint + run: | + pip install ruff + ruff --output-format=github . + continue-on-error: true + + From 3dfab22bdd185c6ff3fa535c549c5cb190d33ca4 Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Mon, 11 Dec 2023 19:21:45 +0000 Subject: [PATCH 07/17] Update pytest-ci.yml --- .github/workflows/pytest-ci.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pytest-ci.yml b/.github/workflows/pytest-ci.yml index a53f30e..839d60a 100644 --- a/.github/workflows/pytest-ci.yml +++ b/.github/workflows/pytest-ci.yml @@ -14,8 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.12"] - module-name: ['base', 'core', 'tools'] + python-version: ["3.8","3.9","3.12"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -30,23 +29,18 @@ jobs: pip install -r requirements.txt - with: test-file: ${{ matr.module-name }} - - name: Pytest -> ${{ test-file }} + - name: Pytest run run: | - pytest -v --disable-warnings -l **/tests/test_${{ test-file }}.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html + pytest -v --disable-warnings -l **/tests/test_*.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html - name: Upload pytest test results uses: actions/upload-artifact@v3 with: name: pytest-results-${{ matrix.python-version }} path: junit/test-results-${{ matrix.python-version }}.xml - # Use always() to always run this step to publish test results when there are test failures if: ${{ always() }} - - - - build-linter: - name: Pylint + name: Ruff runs-on: ubuntu-latest strategy: fail-fast: false @@ -69,5 +63,6 @@ jobs: pip install ruff ruff --output-format=github . continue-on-error: true + From cf0f54955556a02ae5b22bfafc68ee52628e629f Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Mon, 11 Dec 2023 19:23:49 +0000 Subject: [PATCH 08/17] Update pytest-ci.yml --- .github/workflows/pytest-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pytest-ci.yml b/.github/workflows/pytest-ci.yml index 839d60a..dd7981e 100644 --- a/.github/workflows/pytest-ci.yml +++ b/.github/workflows/pytest-ci.yml @@ -27,8 +27,6 @@ jobs: python -m pip install --upgrade pip python -m pip install pytest pytest-cov pip install -r requirements.txt - - with: - test-file: ${{ matr.module-name }} - name: Pytest run run: | pytest -v --disable-warnings -l **/tests/test_*.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html From 5a5cebb33a0c61c3122ed7564f44a9a26210298e Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Mon, 11 Dec 2023 19:28:28 +0000 Subject: [PATCH 09/17] Create ruff-ci-ingest.yml --- .github/workflows/ruff-ci-ingest.yml | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/ruff-ci-ingest.yml diff --git a/.github/workflows/ruff-ci-ingest.yml b/.github/workflows/ruff-ci-ingest.yml new file mode 100644 index 0000000..41b70ca --- /dev/null +++ b/.github/workflows/ruff-ci-ingest.yml @@ -0,0 +1,36 @@ + +name: CI (Ingest) - Ruff +on: + push: + branches: [ "main" ] + paths: + - 'nbody/**.py' + - '*.py' + workflow_dispatch: +jobs: + build-linter: + name: Ruff + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8","3.9", "3.12"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + cache: pip + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ruff + pip install -r requirements.txt + - name: Analysing the code with pylint + run: | + pip install ruff + ruff --output-format=github . + continue-on-error: true + + From 07aee4139f024469e45ab9484105e8e3bb713d04 Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Tue, 12 Dec 2023 12:10:52 +0000 Subject: [PATCH 10/17] Update pytest-ci.yml --- .github/workflows/pytest-ci.yml | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/.github/workflows/pytest-ci.yml b/.github/workflows/pytest-ci.yml index dd7981e..f00055a 100644 --- a/.github/workflows/pytest-ci.yml +++ b/.github/workflows/pytest-ci.yml @@ -30,37 +30,14 @@ jobs: - name: Pytest run run: | pytest -v --disable-warnings -l **/tests/test_*.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html - - name: Upload pytest test results + - name: Upload pytest results uses: actions/upload-artifact@v3 with: name: pytest-results-${{ matrix.python-version }} path: junit/test-results-${{ matrix.python-version }}.xml if: ${{ always() }} - build-linter: - name: Ruff - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.8","3.9", "3.12"] - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - cache: pip - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install ruff - pip install -r requirements.txt - - name: Analysing the code with pylint - run: | - pip install ruff - ruff --output-format=github . - continue-on-error: true + From 70ada5a51ae2e9a1bac9a8360d78487709437eb9 Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Tue, 12 Dec 2023 12:29:00 +0000 Subject: [PATCH 11/17] Update pytest-ci.yml --- .github/workflows/pytest-ci.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pytest-ci.yml b/.github/workflows/pytest-ci.yml index f00055a..330987e 100644 --- a/.github/workflows/pytest-ci.yml +++ b/.github/workflows/pytest-ci.yml @@ -1,12 +1,10 @@ -name: Python CI - pytest +name: 'pytest: base' on: - push: - branches: [ "main" ] - paths: - - 'nbody/**.py' - - '*.py' - workflow_dispatch: + workflow_run: + workflows: CI (Ingest) - Ruff + workflow_dispatch: + jobs: build-tests: name: Pytest @@ -29,12 +27,12 @@ jobs: pip install -r requirements.txt - name: Pytest run run: | - pytest -v --disable-warnings -l **/tests/test_*.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html + pytest -v --disable-warnings -l **/tests/test_base.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html - name: Upload pytest results uses: actions/upload-artifact@v3 with: - name: pytest-results-${{ matrix.python-version }} - path: junit/test-results-${{ matrix.python-version }}.xml + name: pytest-results-${{ matrix.python-version }}-base + path: junit/test-results-${{ matrix.python-version }}-base.xml if: ${{ always() }} From ee05f08d573634d69221eaa367902c3c847a3e1b Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Tue, 12 Dec 2023 12:29:27 +0000 Subject: [PATCH 12/17] Rename pytest-ci.yml to pytest-base.yml --- .github/workflows/{pytest-ci.yml => pytest-base.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{pytest-ci.yml => pytest-base.yml} (100%) diff --git a/.github/workflows/pytest-ci.yml b/.github/workflows/pytest-base.yml similarity index 100% rename from .github/workflows/pytest-ci.yml rename to .github/workflows/pytest-base.yml From c1e6d900215b5e443701aca8d17e56a2cdb59f60 Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Tue, 12 Dec 2023 12:30:28 +0000 Subject: [PATCH 13/17] Create pytest-core.yml --- .github/workflows/pytest-core.yml | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/pytest-core.yml diff --git a/.github/workflows/pytest-core.yml b/.github/workflows/pytest-core.yml new file mode 100644 index 0000000..5ee1417 --- /dev/null +++ b/.github/workflows/pytest-core.yml @@ -0,0 +1,41 @@ + +name: 'pytest: core' +on: + workflow_run: + workflows: CI (Ingest) - Ruff + workflow_dispatch: + +jobs: + build-tests: + name: Pytest + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8","3.9","3.12"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + cache: pip + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install pytest pytest-cov + pip install -r requirements.txt + - name: Pytest run + run: | + pytest -v --disable-warnings -l **/tests/test_core.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html + - name: Upload pytest results + uses: actions/upload-artifact@v3 + with: + name: pytest-results-${{ matrix.python-version }}-core + path: junit/test-results-${{ matrix.python-version }}-core.xml + if: ${{ always() }} + + + + + From c43258d844db98bd6ab3256932953bcc43578be5 Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Tue, 12 Dec 2023 12:32:32 +0000 Subject: [PATCH 14/17] Create pytest-tools --- .github/workflows/pytest-tools | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/pytest-tools diff --git a/.github/workflows/pytest-tools b/.github/workflows/pytest-tools new file mode 100644 index 0000000..4c8b429 --- /dev/null +++ b/.github/workflows/pytest-tools @@ -0,0 +1,41 @@ + +name: 'pytest: tools' +on: + workflow_run: + workflows: CI (Ingest) - Ruff + workflow_dispatch: + +jobs: + build-tests: + name: Pytest + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8","3.9","3.12"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + cache: pip + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install pytest pytest-cov + pip install -r requirements.txt + - name: Pytest run + run: | + pytest -v --disable-warnings -l **/tests/test_tools.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html + - name: Upload pytest results + uses: actions/upload-artifact@v3 + with: + name: pytest-results-${{ matrix.python-version tools + path: junit/test-results-${{ matrix.python-version }}-tools.xml + if: ${{ always() }} + + + + + From c0beefc37f05dbd0c8bce9afb2d39da3ae32e81c Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Tue, 12 Dec 2023 12:33:52 +0000 Subject: [PATCH 15/17] Rename pytest-tools to pytest-tools.yml --- .github/workflows/{pytest-tools => pytest-tools.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{pytest-tools => pytest-tools.yml} (100%) diff --git a/.github/workflows/pytest-tools b/.github/workflows/pytest-tools.yml similarity index 100% rename from .github/workflows/pytest-tools rename to .github/workflows/pytest-tools.yml From e750894d904f07699829f250cece4afe1d266240 Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Tue, 12 Dec 2023 12:43:46 +0000 Subject: [PATCH 16/17] Delete .github/workflows/pytest-tools.yml --- .github/workflows/pytest-tools.yml | 41 ------------------------------ 1 file changed, 41 deletions(-) delete mode 100644 .github/workflows/pytest-tools.yml diff --git a/.github/workflows/pytest-tools.yml b/.github/workflows/pytest-tools.yml deleted file mode 100644 index 4c8b429..0000000 --- a/.github/workflows/pytest-tools.yml +++ /dev/null @@ -1,41 +0,0 @@ - -name: 'pytest: tools' -on: - workflow_run: - workflows: CI (Ingest) - Ruff - workflow_dispatch: - -jobs: - build-tests: - name: Pytest - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.8","3.9","3.12"] - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - cache: pip - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install pytest pytest-cov - pip install -r requirements.txt - - name: Pytest run - run: | - pytest -v --disable-warnings -l **/tests/test_tools.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html - - name: Upload pytest results - uses: actions/upload-artifact@v3 - with: - name: pytest-results-${{ matrix.python-version tools - path: junit/test-results-${{ matrix.python-version }}-tools.xml - if: ${{ always() }} - - - - - From e43f269ee907d12f36b3f617303d0d7e5ee8c3c2 Mon Sep 17 00:00:00 2001 From: Will Roscoe Date: Tue, 12 Dec 2023 12:43:58 +0000 Subject: [PATCH 17/17] Delete .github/workflows/pytest-core.yml --- .github/workflows/pytest-core.yml | 41 ------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 .github/workflows/pytest-core.yml diff --git a/.github/workflows/pytest-core.yml b/.github/workflows/pytest-core.yml deleted file mode 100644 index 5ee1417..0000000 --- a/.github/workflows/pytest-core.yml +++ /dev/null @@ -1,41 +0,0 @@ - -name: 'pytest: core' -on: - workflow_run: - workflows: CI (Ingest) - Ruff - workflow_dispatch: - -jobs: - build-tests: - name: Pytest - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.8","3.9","3.12"] - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - cache: pip - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install pytest pytest-cov - pip install -r requirements.txt - - name: Pytest run - run: | - pytest -v --disable-warnings -l **/tests/test_core.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html - - name: Upload pytest results - uses: actions/upload-artifact@v3 - with: - name: pytest-results-${{ matrix.python-version }}-core - path: junit/test-results-${{ matrix.python-version }}-core.xml - if: ${{ always() }} - - - - -