hatchling-autoextras-hook 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hatchling_autoextras_hook-0.0.1/.github/actions/setup-env/action.yaml +84 -0
- hatchling_autoextras_hook-0.0.1/.github/dependabot.yml +16 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/build.yaml +43 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/ci.yaml +32 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/coverage.yaml +34 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/cyclic-imports.yaml +23 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/dependency-review.yml +39 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/doctest.yaml +23 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/format.yaml +26 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/generate-package-versions.yaml +36 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/get-versions.yaml +30 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/nightly-package.yaml +54 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/nightly-tests.yaml +25 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/pre-commit-autoupdate.yaml +39 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/pre-commit.yaml +23 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/pypi.yaml +32 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/test-code-dep.yaml +40 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/test-deps.yaml +18 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/test-package-dep.yaml +55 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/test-package.yaml +56 -0
- hatchling_autoextras_hook-0.0.1/.github/workflows/test.yaml +82 -0
- hatchling_autoextras_hook-0.0.1/.gitignore +207 -0
- hatchling_autoextras_hook-0.0.1/.pre-commit-config.yaml +62 -0
- hatchling_autoextras_hook-0.0.1/LICENSE +28 -0
- hatchling_autoextras_hook-0.0.1/Makefile +69 -0
- hatchling_autoextras_hook-0.0.1/PKG-INFO +188 -0
- hatchling_autoextras_hook-0.0.1/README.md +174 -0
- hatchling_autoextras_hook-0.0.1/dev/config/package_versions.json +1 -0
- hatchling_autoextras_hook-0.0.1/dev/generate_versions.py +35 -0
- hatchling_autoextras_hook-0.0.1/pyproject.toml +250 -0
- hatchling_autoextras_hook-0.0.1/src/hatchling_autoextras_hook/__init__.py +7 -0
- hatchling_autoextras_hook-0.0.1/src/hatchling_autoextras_hook/hooks.py +64 -0
- hatchling_autoextras_hook-0.0.1/tasks.py +167 -0
- hatchling_autoextras_hook-0.0.1/tests/__init__.py +1 -0
- hatchling_autoextras_hook-0.0.1/tests/unit/__init__.py +0 -0
- hatchling_autoextras_hook-0.0.1/tests/unit/test_hooks.py +110 -0
- hatchling_autoextras_hook-0.0.1/uv.lock +1199 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
name: "Setup Python environment"
|
|
2
|
+
description: "Checkout code and install dependencies"
|
|
3
|
+
|
|
4
|
+
inputs:
|
|
5
|
+
python-version:
|
|
6
|
+
default: "3.13"
|
|
7
|
+
description: "Python version to use"
|
|
8
|
+
required: false
|
|
9
|
+
type: string
|
|
10
|
+
package-name:
|
|
11
|
+
default: ""
|
|
12
|
+
description: "Optional package name to install"
|
|
13
|
+
required: false
|
|
14
|
+
type: string
|
|
15
|
+
package-version:
|
|
16
|
+
default: ""
|
|
17
|
+
description: "Optional package version to install"
|
|
18
|
+
required: false
|
|
19
|
+
type: string
|
|
20
|
+
install-optional-deps:
|
|
21
|
+
default: true
|
|
22
|
+
description: "Whether to install the optional dependencies"
|
|
23
|
+
required: false
|
|
24
|
+
type: boolean
|
|
25
|
+
install-docs-deps:
|
|
26
|
+
default: false
|
|
27
|
+
description: "Whether to install the dependencies to generate docs"
|
|
28
|
+
required: false
|
|
29
|
+
type: boolean
|
|
30
|
+
|
|
31
|
+
runs:
|
|
32
|
+
using: "composite"
|
|
33
|
+
steps:
|
|
34
|
+
- name: Install uv and set the python version
|
|
35
|
+
uses: astral-sh/setup-uv@v7
|
|
36
|
+
with:
|
|
37
|
+
python-version: ${{ inputs.python-version }}
|
|
38
|
+
activate-environment: true
|
|
39
|
+
|
|
40
|
+
- name: Install invoke
|
|
41
|
+
shell: bash
|
|
42
|
+
run: |
|
|
43
|
+
make install-invoke
|
|
44
|
+
|
|
45
|
+
- name: Install minimal dependencies
|
|
46
|
+
if: ${{ !inputs.install-optional-deps }}
|
|
47
|
+
shell: bash
|
|
48
|
+
run: |
|
|
49
|
+
inv install
|
|
50
|
+
|
|
51
|
+
- name: Install all dependencies
|
|
52
|
+
if: ${{ inputs.install-optional-deps }}
|
|
53
|
+
shell: bash
|
|
54
|
+
run: |
|
|
55
|
+
inv install --all-deps --docs
|
|
56
|
+
|
|
57
|
+
- name: Install all dependencies
|
|
58
|
+
if: ${{ inputs.install-docs-deps }}
|
|
59
|
+
shell: bash
|
|
60
|
+
run: |
|
|
61
|
+
inv install --docs
|
|
62
|
+
|
|
63
|
+
- name: Install valid package version
|
|
64
|
+
if: ${{ inputs.package-name != '' }}
|
|
65
|
+
uses: durandtibo/uv-install-package-action@v0.1.1
|
|
66
|
+
with:
|
|
67
|
+
package-name: ${{ inputs.package-name }}
|
|
68
|
+
package-version: ${{ matrix.package-version }}
|
|
69
|
+
python-version: ${{ matrix.python-version }}
|
|
70
|
+
|
|
71
|
+
- name: Show python config
|
|
72
|
+
shell: bash
|
|
73
|
+
run: |
|
|
74
|
+
inv show-python-config
|
|
75
|
+
|
|
76
|
+
- name: Show installed packages
|
|
77
|
+
shell: bash
|
|
78
|
+
run: |
|
|
79
|
+
inv show-installed-packages
|
|
80
|
+
|
|
81
|
+
- name: Show dependency tree
|
|
82
|
+
shell: bash
|
|
83
|
+
run: |
|
|
84
|
+
uv pip tree --show-version-specifiers
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "uv" # See documentation for possible values
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "weekly"
|
|
12
|
+
|
|
13
|
+
- package-ecosystem: "github-actions"
|
|
14
|
+
directory: "/"
|
|
15
|
+
schedule:
|
|
16
|
+
interval: "weekly"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Build Tests
|
|
2
|
+
on:
|
|
3
|
+
workflow_call:
|
|
4
|
+
workflow_dispatch: # to trigger manually
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
timeout-minutes: 10
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout
|
|
16
|
+
uses: actions/checkout@v5
|
|
17
|
+
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v7
|
|
20
|
+
with:
|
|
21
|
+
python-version: '3.13'
|
|
22
|
+
activate-environment: true
|
|
23
|
+
|
|
24
|
+
- name: Build package
|
|
25
|
+
run: |
|
|
26
|
+
uv build
|
|
27
|
+
|
|
28
|
+
- name: Install package
|
|
29
|
+
run: |
|
|
30
|
+
uv pip install dist/*.whl
|
|
31
|
+
|
|
32
|
+
- name: Inspect package
|
|
33
|
+
run: |
|
|
34
|
+
uv pip show hatchling_autoextras_hook
|
|
35
|
+
|
|
36
|
+
- name: Show dependency tree
|
|
37
|
+
shell: bash
|
|
38
|
+
run: |
|
|
39
|
+
uv pip tree --package hatchling_autoextras_hook --show-version-specifiers
|
|
40
|
+
|
|
41
|
+
- name: Import package
|
|
42
|
+
run: |
|
|
43
|
+
python -c "import hatchling_autoextras_hook; print('OK')"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
branches:
|
|
5
|
+
- main
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
workflow_dispatch: # to trigger manually
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build:
|
|
16
|
+
uses: ./.github/workflows/build.yaml
|
|
17
|
+
coverage:
|
|
18
|
+
uses: ./.github/workflows/coverage.yaml
|
|
19
|
+
secrets: inherit
|
|
20
|
+
cyclic-imports:
|
|
21
|
+
uses: ./.github/workflows/cyclic-imports.yaml
|
|
22
|
+
doctest:
|
|
23
|
+
uses: ./.github/workflows/doctest.yaml
|
|
24
|
+
secrets: inherit
|
|
25
|
+
format:
|
|
26
|
+
uses: ./.github/workflows/format.yaml
|
|
27
|
+
pre-commit:
|
|
28
|
+
uses: ./.github/workflows/pre-commit.yaml
|
|
29
|
+
test:
|
|
30
|
+
uses: ./.github/workflows/test.yaml
|
|
31
|
+
test-deps:
|
|
32
|
+
uses: ./.github/workflows/test-deps.yaml
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Code Coverage
|
|
2
|
+
on:
|
|
3
|
+
workflow_call:
|
|
4
|
+
workflow_dispatch: # to trigger manually
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
coverage:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
timeout-minutes: 10
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v5
|
|
16
|
+
|
|
17
|
+
- name: Setup python environment
|
|
18
|
+
uses: ./.github/actions/setup-env
|
|
19
|
+
|
|
20
|
+
- name: Run unit tests
|
|
21
|
+
run: |
|
|
22
|
+
inv unit-test --cov
|
|
23
|
+
|
|
24
|
+
- name: Upload coverage to Codecov
|
|
25
|
+
if: github.repository == 'durandtibo/hatchling_autoextras_hook' && (github.event_name == 'push' || github.event_name == 'pull_request')
|
|
26
|
+
uses: codecov/codecov-action@v5
|
|
27
|
+
with:
|
|
28
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
29
|
+
files: ./coverage.xml
|
|
30
|
+
# Ignore codecov failures as the codecov server is not
|
|
31
|
+
# very reliable but we don't want to report a failure
|
|
32
|
+
# in the github UI just because the coverage report failed to
|
|
33
|
+
# be published.
|
|
34
|
+
fail_ci_if_error: false
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Cyclic Imports
|
|
2
|
+
on:
|
|
3
|
+
workflow_call:
|
|
4
|
+
workflow_dispatch: # to trigger manually
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
cyclic-import:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
timeout-minutes: 10
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout
|
|
16
|
+
uses: actions/checkout@v5
|
|
17
|
+
|
|
18
|
+
- name: Setup python environment
|
|
19
|
+
uses: ./.github/actions/setup-env
|
|
20
|
+
|
|
21
|
+
- name: check hatchling_autoextras_hook
|
|
22
|
+
run: |
|
|
23
|
+
python -c "import hatchling_autoextras_hook"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Dependency Review Action
|
|
2
|
+
#
|
|
3
|
+
# This Action will scan dependency manifest files that change as part of a Pull Request,
|
|
4
|
+
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
|
|
5
|
+
# Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable
|
|
6
|
+
# packages will be blocked from merging.
|
|
7
|
+
#
|
|
8
|
+
# Source repository: https://github.com/actions/dependency-review-action
|
|
9
|
+
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
|
|
10
|
+
name: 'Dependency review'
|
|
11
|
+
on:
|
|
12
|
+
pull_request:
|
|
13
|
+
branches: [ "main" ]
|
|
14
|
+
|
|
15
|
+
# If using a dependency submission action in this workflow this permission will need to be set to:
|
|
16
|
+
#
|
|
17
|
+
# permissions:
|
|
18
|
+
# contents: write
|
|
19
|
+
#
|
|
20
|
+
# https://docs.github.com/en/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
# Write permissions for pull-requests are required for using the `comment-summary-in-pr` option, comment out if you aren't using this option
|
|
24
|
+
pull-requests: write
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
dependency-review:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- name: 'Checkout repository'
|
|
31
|
+
uses: actions/checkout@v5
|
|
32
|
+
- name: 'Dependency Review'
|
|
33
|
+
uses: actions/dependency-review-action@v4
|
|
34
|
+
# Commonly enabled options, see https://github.com/actions/dependency-review-action#configuration-options for all available options.
|
|
35
|
+
with:
|
|
36
|
+
comment-summary-in-pr: always
|
|
37
|
+
# fail-on-severity: moderate
|
|
38
|
+
# deny-licenses: GPL-1.0-or-later, LGPL-2.0-or-later
|
|
39
|
+
# retry-on-snapshot-warnings: true
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Documentation Tests
|
|
2
|
+
on:
|
|
3
|
+
workflow_call:
|
|
4
|
+
workflow_dispatch: # to trigger manually
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
doctest:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
timeout-minutes: 10
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout
|
|
16
|
+
uses: actions/checkout@v5
|
|
17
|
+
|
|
18
|
+
- name: Setup python environment
|
|
19
|
+
uses: ./.github/actions/setup-env
|
|
20
|
+
|
|
21
|
+
- name: Run doctest on source code
|
|
22
|
+
run: |
|
|
23
|
+
inv doctest-src
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Format
|
|
2
|
+
on:
|
|
3
|
+
workflow_call:
|
|
4
|
+
workflow_dispatch: # to trigger manually
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
format:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
timeout-minutes: 10
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v5
|
|
16
|
+
|
|
17
|
+
- name: Setup python environment
|
|
18
|
+
uses: ./.github/actions/setup-env
|
|
19
|
+
|
|
20
|
+
- name: Format
|
|
21
|
+
run: |
|
|
22
|
+
make format
|
|
23
|
+
|
|
24
|
+
- name: Lint
|
|
25
|
+
run: |
|
|
26
|
+
make lint
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Generate package versions
|
|
2
|
+
on:
|
|
3
|
+
schedule:
|
|
4
|
+
- cron: "0 6 * * 0" # run every Sunday at 6:00 AM UTC
|
|
5
|
+
workflow_call:
|
|
6
|
+
workflow_dispatch: # to trigger manually
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
generate-package-versions:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
timeout-minutes: 10
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout
|
|
19
|
+
uses: actions/checkout@v5
|
|
20
|
+
|
|
21
|
+
- name: Setup python environment
|
|
22
|
+
uses: ./.github/actions/setup-env
|
|
23
|
+
|
|
24
|
+
- name: Generate package versions
|
|
25
|
+
run: |
|
|
26
|
+
python dev/generate_versions.py
|
|
27
|
+
|
|
28
|
+
- uses: peter-evans/create-pull-request@v7
|
|
29
|
+
if: always()
|
|
30
|
+
with:
|
|
31
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
32
|
+
branch: update/versions
|
|
33
|
+
title: Generate package versions
|
|
34
|
+
commit-message: "Generate package versions"
|
|
35
|
+
body: Generate package versions.
|
|
36
|
+
author: ci-bot <${{secrets.CI_BOT_EMAIL}}>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Get Versions
|
|
2
|
+
on:
|
|
3
|
+
workflow_call:
|
|
4
|
+
outputs:
|
|
5
|
+
package_versions:
|
|
6
|
+
description: "JSON string containing all package versions"
|
|
7
|
+
value: ${{ jobs.get-versions.outputs.package_versions }}
|
|
8
|
+
workflow_dispatch: # to trigger manually
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
get-versions:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
timeout-minutes: 2
|
|
17
|
+
outputs:
|
|
18
|
+
package_versions: ${{ steps.extract.outputs.versions }}
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout
|
|
21
|
+
uses: actions/checkout@v5
|
|
22
|
+
|
|
23
|
+
- name: Read versions
|
|
24
|
+
id: extract
|
|
25
|
+
run: |
|
|
26
|
+
echo "versions=$(cat dev/config/package_versions.json)" >> $GITHUB_OUTPUT
|
|
27
|
+
|
|
28
|
+
- name: Show versions
|
|
29
|
+
run: |
|
|
30
|
+
echo "versions: ${{ toJson(fromJson(steps.extract.outputs.versions)) }}"
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Nightly Package Tests
|
|
2
|
+
on:
|
|
3
|
+
schedule:
|
|
4
|
+
- cron: '0 12 * * *' # run at 12 AM UTC
|
|
5
|
+
workflow_dispatch: # to trigger manually
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
get-versions:
|
|
12
|
+
uses: ./.github/workflows/get-versions.yaml
|
|
13
|
+
|
|
14
|
+
stable:
|
|
15
|
+
uses: ./.github/workflows/test-package.yaml
|
|
16
|
+
with:
|
|
17
|
+
install-cmd: 'uv pip install hatchling_autoextras_hook'
|
|
18
|
+
|
|
19
|
+
stable-all:
|
|
20
|
+
uses: ./.github/workflows/test-package.yaml
|
|
21
|
+
with:
|
|
22
|
+
install-cmd: 'uv pip install "hatchling_autoextras_hook[all]"'
|
|
23
|
+
|
|
24
|
+
stable-numpy:
|
|
25
|
+
uses: ./.github/workflows/test-package.yaml
|
|
26
|
+
with:
|
|
27
|
+
install-cmd: 'uv pip install "hatchling_autoextras_hook[numpy]"'
|
|
28
|
+
|
|
29
|
+
latest:
|
|
30
|
+
uses: ./.github/workflows/test-package.yaml
|
|
31
|
+
with:
|
|
32
|
+
install-cmd: 'uv pip install --pre hatchling_autoextras_hook'
|
|
33
|
+
|
|
34
|
+
latest-all:
|
|
35
|
+
uses: ./.github/workflows/test-package.yaml
|
|
36
|
+
with:
|
|
37
|
+
install-cmd: 'uv pip install --pre "hatchling_autoextras_hook[all]"'
|
|
38
|
+
|
|
39
|
+
latest-numpy:
|
|
40
|
+
uses: ./.github/workflows/test-package.yaml
|
|
41
|
+
with:
|
|
42
|
+
install-cmd: 'uv pip install --pre "hatchling_autoextras_hook[numpy]"'
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
########################
|
|
46
|
+
# Dependencies #
|
|
47
|
+
########################
|
|
48
|
+
|
|
49
|
+
hatchling:
|
|
50
|
+
needs: get-versions
|
|
51
|
+
uses: ./.github/workflows/test-package-dep.yaml
|
|
52
|
+
with:
|
|
53
|
+
package-name: hatchling
|
|
54
|
+
package-versions: ${{ toJson(fromJson(needs.get-versions.outputs.package_versions).hatchling) }}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Nightly Tests
|
|
2
|
+
on:
|
|
3
|
+
schedule:
|
|
4
|
+
- cron: '0 11 * * *' # run at 11 AM UTC
|
|
5
|
+
workflow_dispatch: # to trigger manually
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
uses: ./.github/workflows/build.yaml
|
|
13
|
+
cyclic-imports:
|
|
14
|
+
uses: ./.github/workflows/cyclic-imports.yaml
|
|
15
|
+
doctest:
|
|
16
|
+
uses: ./.github/workflows/doctest.yaml
|
|
17
|
+
secrets: inherit
|
|
18
|
+
format:
|
|
19
|
+
uses: ./.github/workflows/format.yaml
|
|
20
|
+
pre-commit:
|
|
21
|
+
uses: ./.github/workflows/pre-commit.yaml
|
|
22
|
+
test:
|
|
23
|
+
uses: ./.github/workflows/test.yaml
|
|
24
|
+
test-deps:
|
|
25
|
+
uses: ./.github/workflows/test-deps.yaml
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: pre-commit auto-update
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "0 7 * * 0" # run every Sunday at 7:00 AM UTC
|
|
6
|
+
workflow_call:
|
|
7
|
+
workflow_dispatch: # to trigger manually
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
pull-requests: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
auto-update:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout
|
|
18
|
+
uses: actions/checkout@v5
|
|
19
|
+
|
|
20
|
+
- name: Setup python environment
|
|
21
|
+
uses: ./.github/actions/setup-env
|
|
22
|
+
|
|
23
|
+
- name: Autoupdate pre-commit hooks
|
|
24
|
+
run: |
|
|
25
|
+
pre-commit autoupdate
|
|
26
|
+
|
|
27
|
+
- name: Run pre-commit hooks
|
|
28
|
+
run: |
|
|
29
|
+
pre-commit run --all-files
|
|
30
|
+
|
|
31
|
+
- uses: peter-evans/create-pull-request@v7
|
|
32
|
+
if: always()
|
|
33
|
+
with:
|
|
34
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
35
|
+
branch: update/pre-commit-hooks
|
|
36
|
+
title: Update pre-commit hooks
|
|
37
|
+
commit-message: "Update pre-commit hooks"
|
|
38
|
+
body: Update versions of pre-commit hooks to latest version.
|
|
39
|
+
author: ci-bot <${{secrets.CI_BOT_EMAIL}}>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: pre-commit
|
|
2
|
+
on:
|
|
3
|
+
workflow_call:
|
|
4
|
+
workflow_dispatch: # to trigger manually
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
format:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
timeout-minutes: 10
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v5
|
|
16
|
+
|
|
17
|
+
- name: Set up Python
|
|
18
|
+
uses: actions/setup-python@v6
|
|
19
|
+
with:
|
|
20
|
+
python-version: '3.13'
|
|
21
|
+
|
|
22
|
+
- name: Run pre-commit
|
|
23
|
+
uses: pre-commit/action@v3.0.1
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Publish PyPI package
|
|
2
|
+
on:
|
|
3
|
+
workflow_dispatch:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
timeout-minutes: 10
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout
|
|
17
|
+
uses: actions/checkout@v5
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@v7
|
|
21
|
+
with:
|
|
22
|
+
activate-environment: true
|
|
23
|
+
|
|
24
|
+
- name: Install invoke
|
|
25
|
+
run: |
|
|
26
|
+
make install-invoke
|
|
27
|
+
|
|
28
|
+
- name: Publish
|
|
29
|
+
env:
|
|
30
|
+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
|
31
|
+
run: |
|
|
32
|
+
inv publish-pypi
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: Test Code with Dependency Version
|
|
2
|
+
on:
|
|
3
|
+
workflow_call:
|
|
4
|
+
inputs:
|
|
5
|
+
package-name:
|
|
6
|
+
type: string
|
|
7
|
+
required: true
|
|
8
|
+
package-versions:
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
runs-on: ${{ matrix.os }}
|
|
18
|
+
timeout-minutes: 10
|
|
19
|
+
strategy:
|
|
20
|
+
max-parallel: 8
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix:
|
|
23
|
+
os: [ ubuntu-latest ]
|
|
24
|
+
python-version: [ '3.14', '3.13', '3.12', '3.11', '3.10' ]
|
|
25
|
+
package-version: ${{ fromJson(inputs.package-versions) }}
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout
|
|
29
|
+
uses: actions/checkout@v5
|
|
30
|
+
|
|
31
|
+
- name: Setup python environment
|
|
32
|
+
uses: ./.github/actions/setup-env
|
|
33
|
+
with:
|
|
34
|
+
package-name: ${{ inputs.package-name }}
|
|
35
|
+
package-version: ${{ matrix.package-version }}
|
|
36
|
+
python-version: ${{ matrix.python-version }}
|
|
37
|
+
|
|
38
|
+
- name: Run unit tests
|
|
39
|
+
run: |
|
|
40
|
+
inv unit-test
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Test - Dependencies
|
|
2
|
+
on:
|
|
3
|
+
workflow_call:
|
|
4
|
+
workflow_dispatch: # to trigger manually
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
get-versions:
|
|
11
|
+
uses: ./.github/workflows/get-versions.yaml
|
|
12
|
+
|
|
13
|
+
hatchling:
|
|
14
|
+
needs: get-versions
|
|
15
|
+
uses: ./.github/workflows/test-code-dep.yaml
|
|
16
|
+
with:
|
|
17
|
+
package-name: hatchling
|
|
18
|
+
package-versions: ${{ toJson(fromJson(needs.get-versions.outputs.package_versions).hatchling) }}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: Test Package with Dependency Version
|
|
2
|
+
on:
|
|
3
|
+
workflow_call:
|
|
4
|
+
inputs:
|
|
5
|
+
package-name:
|
|
6
|
+
type: string
|
|
7
|
+
required: true
|
|
8
|
+
package-versions:
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
runs-on: ${{ matrix.os }}
|
|
18
|
+
timeout-minutes: 10
|
|
19
|
+
strategy:
|
|
20
|
+
max-parallel: 8
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix:
|
|
23
|
+
os: [ ubuntu-latest ]
|
|
24
|
+
python-version: [ '3.14', '3.13', '3.12', '3.11', '3.10' ]
|
|
25
|
+
package-version: ${{ fromJson(inputs.package-versions) }}
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout
|
|
29
|
+
uses: actions/checkout@v5
|
|
30
|
+
|
|
31
|
+
- name: Install uv and set the python version
|
|
32
|
+
uses: astral-sh/setup-uv@v7
|
|
33
|
+
with:
|
|
34
|
+
python-version: ${{ matrix.python-version }}
|
|
35
|
+
activate-environment: true
|
|
36
|
+
|
|
37
|
+
- name: Install package
|
|
38
|
+
run: |
|
|
39
|
+
uv pip install hatchling_autoextras_hook
|
|
40
|
+
|
|
41
|
+
- name: Install valid package version
|
|
42
|
+
uses: durandtibo/uv-install-package-action@v0.1.1
|
|
43
|
+
with:
|
|
44
|
+
package-name: ${{ inputs.package-name }}
|
|
45
|
+
package-version: ${{ matrix.package-version }}
|
|
46
|
+
python-version: ${{ matrix.python-version }}
|
|
47
|
+
|
|
48
|
+
- name: Show dependency tree
|
|
49
|
+
shell: bash
|
|
50
|
+
run: |
|
|
51
|
+
uv pip tree
|
|
52
|
+
|
|
53
|
+
- name: Run some checks
|
|
54
|
+
run: |
|
|
55
|
+
python tests/package_checks.py
|