From a4ef90eaa2d2cc26764beaa142ce326b508721b0 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 12 Apr 2025 22:49:11 +0200 Subject: [PATCH 1/2] Added templates --- .github/ISSUE_TEMPLATE/bug_report.md | 28 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 21 +++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..abcbd32 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,28 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** + +... + +**To Reproduce** + +... + +**Expected behavior** + +... + +**Proposed solution** + +... + +**Additional context** + +... diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..3d60319 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,21 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Describe the feature** + +... + + +**Proposed implementation** + +... + +**Additional context** + +... From 2f3d221ab6b4e397b13ba8a1c89cdba9516c414f Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 12 Apr 2025 22:49:34 +0200 Subject: [PATCH 2/2] Added ci pipeline --- .github/workflows/ci_pipeline.yml | 24 +++++++---- .github/workflows/static_analysis.yml | 60 +++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/static_analysis.yml diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 03216d6..4cde8d6 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -1,31 +1,39 @@ -name: Python CI +name: Testing on: push: branches: - main + - devel pull_request: branches: - main + - devel jobs: test: runs-on: ubuntu-latest - + # strategy: + # matrix: + # python-version: ['3.12'] steps: - name: Check out the code uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' # Specify the Python version, e.g., '3.8' + # - name: Set up Python + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ matrix.python-version }} - - name: Install dependencies + - name: Install python dependencies run: | python -m pip install --upgrade pip pip install . + - name: Inspect maxplotlib arguments + run: | + maxplotlib -h + - name: Run tests run: | - pytest # or replace with your testing command + pytest . diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml new file mode 100644 index 0000000..22b392d --- /dev/null +++ b/.github/workflows/static_analysis.yml @@ -0,0 +1,60 @@ +name: Static analysis + +on: + push: + branches: + - main + - devel + pull_request: + branches: + - main + - devel + +jobs: + static-analysis: + runs-on: ubuntu-latest + steps: + - name: Checkout the code + uses: actions/checkout@v4 + + - name: Download and run cloc + run: | + curl -s https://raw.githubusercontent.com/AlDanial/cloc/master/cloc > cloc + chmod +x cloc + ./cloc --version + ./cloc $(git ls-files) + + - name: Code formatting with black + run: | + pip install black + pip install "black[jupyter]" + black --check src/ + + - name: Code formatting with isort + run: | + pip install isort + isort --check src/ + + - name: Code formatting with prospector + continue-on-error: true + run: | + pip install mypy + mypy src/ + + - name: Code formatting with prospector + continue-on-error: true + run: | + pip install prospector + prospector src/ + + - name: Code formatting with ruff + continue-on-error: true + run: | + pip install ruff + ruff check src/ + + - name: Code formatting with pylint + continue-on-error: true + run: | + pip install pylint + pylint src/