From 3fbfc57d1664f22ae54d940175fb018bb731fd7e Mon Sep 17 00:00:00 2001 From: Erdal Kilicdogan Date: Tue, 14 Jan 2025 14:08:01 +0100 Subject: [PATCH] Update template --- .cruft.json | 4 +- .github/ISSUE_TEMPLATE/bug_report.yml | 73 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 17 +++++ .github/workflows/constraints.txt | 4 +- .github/workflows/docs.yml | 1 + .github/workflows/labeler.yml | 2 +- .github/workflows/release.yml | 7 ++- .github/workflows/tests.yml | 4 +- .pre-commit-config.yaml | 4 -- pyproject.toml | 2 - 10 files changed, 103 insertions(+), 15 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml diff --git a/.cruft.json b/.cruft.json index da7062e..362307e 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,7 +1,7 @@ { "template": "https://github.com/statisticsnorway/ssb-pypitemplate.git", - "commit": "e6f0ca2794354d16838cf36d97bee2f9f70d3142", - "checkout": "2024.9.10", + "commit": "66884cffa5aa67ed505bb121009501b51cc4d847", + "checkout": "2025.1.14", "context": { "cookiecutter": { "project_name": "ssb-datafangst-person-fagfunksjoner", diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..becf1d9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,73 @@ +name: "\U0001F41E Bug Report" +description: Report a bug +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Please fill out the sections below to help everyone identify and fix the bug + - type: textarea + id: description + attributes: + label: Describe the bug + placeholder: A clear and concise description of what the bug is. + validations: + required: true + - type: textarea + id: reproduce + attributes: + label: To Reproduce + description: Steps to reproduce the behavior. + placeholder: | + 1. Step 1... + 2. Step 2... + 3. Step 3... + 4. Step 4... + validations: + required: false + - type: textarea + id: expected + attributes: + label: Expected behaviour + placeholder: A clear and concise description of what you expected to happen. + validations: + required: false + - type: dropdown + id: platform + attributes: + label: Platforms and Environments + multiple: true + description: > + On which platforms does the bug occur? + The first four items are platforms in Statistics Norway. + You can select multiple platforms. + options: + - DaplaLab with vscode + - DaplaLab with Jupyter + - Jupyter on-prem + - Old Dapla with Jupyter + - Windows + - Linux + - macOS + validations: + required: true + - type: input + id: version + attributes: + label: Version + description: What version of our software are you running? + placeholder: 1.0.0 + validations: + required: false + - type: textarea + id: logs + attributes: + label: Error messages or logs + description: Please copy and paste any relevant log output or error messages. + render: shell + validations: + required: false + - type: markdown + attributes: + value: | + Thanks for reporting this issue! We will get back to you as soon as possible. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..af9e9c0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,17 @@ +name: "\U0001F381 Feature Request" +description: Suggest a new feature or enhancment. +labels: ["enhancement"] +body: + - type: textarea + id: description + attributes: + label: Description + description: > + Describe the feature or enhancement and explain why it should be implemented. + Include a code example if applicable. + validations: + required: true + - type: markdown + attributes: + value: | + Thanks for reporting this issue! We will get back to you as soon as possible. diff --git a/.github/workflows/constraints.txt b/.github/workflows/constraints.txt index 83b1a1d..66b3604 100644 --- a/.github/workflows/constraints.txt +++ b/.github/workflows/constraints.txt @@ -1,5 +1,5 @@ pip==24.3.1 nox==2024.10.9 nox-poetry==1.0.3 -poetry==1.8.4 -virtualenv==20.27.1 +poetry==2.0.1 +virtualenv==20.28.1 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9d82d42..4f7e150 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -31,6 +31,7 @@ jobs: - name: Install Poetry run: | pipx install --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" poetry + pipx inject poetry poetry-plugin-export poetry --version - name: Set up Python diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 1e31b19..dc82891 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -20,6 +20,6 @@ jobs: uses: actions/checkout@v4 - name: Run Labeler - uses: crazy-max/ghaction-github-labeler@v5.1.0 + uses: crazy-max/ghaction-github-labeler@v5.0.0 # Use this version until https://github.com/crazy-max/ghaction-github-labeler/issues/221 is fixed with: skip-delete: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ce66d5..a520388 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,8 @@ jobs: - name: Install Poetry run: | - pip install -c ${{ github.workspace }}/.github/workflows/constraints.txt poetry + pipx install --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" poetry + pipx inject poetry poetry-plugin-export poetry --version - name: Check if there is a parent commit @@ -61,11 +62,11 @@ jobs: - name: Publish package on PyPI if: steps.check-version.outputs.tag - uses: pypa/gh-action-pypi-publish@v1.11.0 + uses: pypa/gh-action-pypi-publish@v1.12.3 - name: Publish package on TestPyPI if: (!steps.check-version.outputs.tag) - uses: pypa/gh-action-pypi-publish@v1.11.0 + uses: pypa/gh-action-pypi-publish@v1.12.3 with: repository-url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7ff6891..b72b473 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -59,6 +59,7 @@ jobs: - name: Install Poetry run: | pipx install --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" poetry + pipx inject poetry poetry-plugin-export poetry --version - name: Install Nox @@ -123,7 +124,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5.3.0 with: - python-version: "3.12" + python-version: "3.10" - name: Upgrade pip run: | @@ -133,6 +134,7 @@ jobs: - name: Install Poetry run: | pipx install --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" poetry + pipx inject poetry poetry-plugin-export poetry --version - name: Install Nox diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 926462b..2f90953 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,19 +23,16 @@ repos: entry: end-of-file-fixer language: system types: [text] - stages: [commit, push, manual] - id: trailing-whitespace name: Trim Trailing Whitespace entry: trailing-whitespace-fixer language: system types: [text] - stages: [commit, push, manual] - id: mixed-line-ending name: Mixed Line Ending entry: mixed-line-ending language: system types: [text] - stages: [commit, push, manual] # Serialization format checkers - id: check-yaml @@ -65,7 +62,6 @@ repos: entry: darglint language: system types: [python] - stages: [manual] - id: ruff name: ruff entry: ruff check --fix --exit-non-zero-on-fix diff --git a/pyproject.toml b/pyproject.toml index 9a142f9..5501cc9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,8 +99,6 @@ select = [ "F", # pyflakes ] ignore = [ - "ANN101", # Supress missing-type-self. - "ANN102", # Supress missing-type-cls. "ANN202", # Don't requiere return type annotation for private functions. "ANN401", # Allow type annotation with type Any. "D100", # Supress undocumented-public-module. Only doc of public api required.