Skip to content

Commit

Permalink
Merge branch 'main' into mmg/rename-to-github-owner
Browse files Browse the repository at this point in the history
  • Loading branch information
paddyroddy authored Nov 1, 2024
2 parents dd1b2c5 + 30efb51 commit 6b44623
Show file tree
Hide file tree
Showing 33 changed files with 3,346 additions and 70 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Link Checker
id: lychee
Expand All @@ -29,9 +29,14 @@ jobs:
# Ignore the whole of the project slug README since the links are
# necessarily not real links - i.e. demos and to be filled by
# cookiecutter values.
args:
"--verbose --exclude https://forum.image.sc/ --exclude http://www.gnu.org --exclude http://fsf.org --exclude docs/pages
--exclude-path '{{cookiecutter.project_slug}}/README.md' -- ."
args: "--verbose
--exclude https://forum.image.sc/
--exclude http://www.gnu.org
--exclude http://fsf.org
--exclude docs/pages
--exclude-path '{{cookiecutter.project_slug}}/README.md'
--exclude-path 'tests/data'
-- ."
fail: true
jobSummary: true
env:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Cache pre-commit
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Set up python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
python-version: "3.x"

Expand All @@ -35,16 +35,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Cache pre-commit
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Set up python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
python-version: "3.x"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
BUNDLE_GEMFILE: ${{ github.workspace }}/docs/Gemfile
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
contents: write
steps:
- name: Checkout source
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Cache tox
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
with:
path: .tox
key: test-${{ hashFiles('pyproject.toml') }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude: ^{{cookiecutter.project_slug}}/
exclude: ^{{cookiecutter.project_slug}}/|^tests/data/test_package_generation/
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
name: Bug Report
description: Create a Report to Help us Improve
labels:
- bug
body:
- id: describe
type: textarea
attributes:
label: Describe the Bug
description: A clear and concise description of what the bug is.
validations:
required: true
- id: reproduce
type: textarea
attributes:
label: To Reproduce
description: >-
A minimal working example of code to reproduce the unexpected behaviour,
this will render as `Python` code so no need for backticks.
value: |-
import cookiecutter_test
...
render: Python
validations:
required: true
- id: expected
type: textarea
attributes:
label: Expected Behaviour
description: >-
A clear and concise description of what you expected to happen.
validations:
required: true
- id: actual
type: textarea
attributes:
label: Actual Behaviour
description: >-
Be a specific and detailed as you can. Paste any output or stack traces
of errors you receive.
validations:
required: true
- id: version
type: input
attributes:
label: Version In Use
description: |-
Can be found by
```sh
python -c "import cookiecutter_test; print(cookiecutter_test.__version__)"
```
validations:
required: true
- id: additional
type: textarea
attributes:
label: Additional Context
value: |-
- Python version:
- Operating system:
render: Markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
blank_issues_enabled: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Documentation
description: How Can We Improve the Documentation
labels:
- documentation
body:
- id: section
type: textarea
attributes:
label: Which Section of the Documentation Needs Improving?
description: Please provide a link (if it is a specific page).
validations:
required: true
- id: problem
type: textarea
attributes:
label: What Can be Improved About This Section
description: Is it incomplete, incorrect or difficult to understand?
validations:
required: true
- id: suggestions
type: textarea
attributes:
label: How to Improve This Section
description: >-
Do you have any specific suggestions we could take to improve the
documentation?
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Feature Request
description: Suggest a Way to Improve This Project
labels:
- enhancement
body:
- id: problem
type: textarea
attributes:
label: Is Your Feature Request Related to a Problem? Please Describe
description: A clear and concise description of what the problem is.
placeholder: I'm always frustrated when [...]
validations:
required: true
- id: solution
type: textarea
attributes:
label: Describe the Solution You'd Like
description: A clear and concise description of what you want to happen.
validations:
required: true
- id: alternatives
type: textarea
attributes:
label: Describe Alternatives You've Considered
description: >-
A clear and concise description of any alternative solutions or features
you've considered.
- id: additional
type: textarea
attributes:
label: Additional Context
description: >-
Add any other context or screenshots about the feature request here.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Question
description: General Questions About Using Cookiecutter Test
labels:
- question
body:
- id: topic
type: dropdown
attributes:
label: What is the Topic of Your Question
description: Please indicate the topic in the title of your question.
options:
- Documentation
- Installation
- Usage
- Other
validations:
required: true
- id: question
type: textarea
attributes:
label: Add Your Question Below
validations:
required: true
46 changes: 46 additions & 0 deletions tests/data/test_package_generation/.github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Documentation

on:
push:
branches:
- main
pull_request:

jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Cache tox
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
with:
path: .tox
key: tox-${{ hashFiles('pyproject.toml') }}

- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
python-version: "3.x"
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install tox
run: python -m pip install tox
- name: Build HTML documentation with tox
run: tox -e docs

# Automatically deploy documentation to a GitHub Pages website on pushing to main.
# Requires configuring the repository to deploy GitHub pages from a branch
# gh-pages (https://tinyurl.com/gh-pages-from-branch), which will be created the
# first time this workflow step is run.
- name: Publish documentation on GitHub pages
if: success() && github.event_name != 'pull_request'
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: site
publish_branch: gh-pages
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
33 changes: 33 additions & 0 deletions tests/data/test_package_generation/.github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Linting

on:
push:
branches:
- main
pull_request:

jobs:
linting:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Cache pre-commit
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Set up python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
python-version: "3.x"
cache: pip
cache-dependency-path: pyproject.toml

- name: Install dependencies
run: python -m pip install pre-commit

- name: Run pre-commit
run: pre-commit run --all-files --color always --verbose
42 changes: 42 additions & 0 deletions tests/data/test_package_generation/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Tests

on:
push:
branches:
- main
pull_request:
paths-ignore:
- "**.md"

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.11"
- "3.12"
- "3.13"

steps:
- name: Checkout source
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Cache tox
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
with:
path: .tox
key: tox-${{hashFiles('pyproject.toml') }}

- name: Set up python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml

- name: Install dependencies
run: python -m pip install tox tox-gh

- name: Test with tox
run: tox run
Loading

0 comments on commit 6b44623

Please sign in to comment.