Skip to content

Commit

Permalink
Update template
Browse files Browse the repository at this point in the history
  • Loading branch information
1100eki committed Jan 14, 2025
1 parent 8bb04d6 commit 3fbfc57
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
73 changes: 73 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -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.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand All @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3fbfc57

Please sign in to comment.