rekordbox-edit 0.3.0.dev16__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.
Files changed (38) hide show
  1. rekordbox_edit-0.3.0.dev16/.github/actions/commitizen-bump/action.yml +138 -0
  2. rekordbox_edit-0.3.0.dev16/.github/actions/commitizen-bump/commitizen-bump.sh +129 -0
  3. rekordbox_edit-0.3.0.dev16/.github/actions/install/action.yml +20 -0
  4. rekordbox_edit-0.3.0.dev16/.github/actions/lint/action.yml +29 -0
  5. rekordbox_edit-0.3.0.dev16/.github/actions/test/action.yml +24 -0
  6. rekordbox_edit-0.3.0.dev16/.github/workflows/cd.yml +83 -0
  7. rekordbox_edit-0.3.0.dev16/.github/workflows/ci.yml +82 -0
  8. rekordbox_edit-0.3.0.dev16/.github/workflows/publish.yml +59 -0
  9. rekordbox_edit-0.3.0.dev16/.github/workflows/release.yml +48 -0
  10. rekordbox_edit-0.3.0.dev16/.gitignore +48 -0
  11. rekordbox_edit-0.3.0.dev16/.pre-commit-config.yaml +35 -0
  12. rekordbox_edit-0.3.0.dev16/CHANGELOG.md +128 -0
  13. rekordbox_edit-0.3.0.dev16/CONTRIBUTING.md +88 -0
  14. rekordbox_edit-0.3.0.dev16/LICENSE +21 -0
  15. rekordbox_edit-0.3.0.dev16/Makefile +22 -0
  16. rekordbox_edit-0.3.0.dev16/PKG-INFO +254 -0
  17. rekordbox_edit-0.3.0.dev16/README.md +236 -0
  18. rekordbox_edit-0.3.0.dev16/codecov.yml +10 -0
  19. rekordbox_edit-0.3.0.dev16/pyproject.toml +99 -0
  20. rekordbox_edit-0.3.0.dev16/rekordbox_edit/__init__.py +5 -0
  21. rekordbox_edit-0.3.0.dev16/rekordbox_edit/_click.py +99 -0
  22. rekordbox_edit-0.3.0.dev16/rekordbox_edit/cli.py +48 -0
  23. rekordbox_edit-0.3.0.dev16/rekordbox_edit/commands/__init__.py +1 -0
  24. rekordbox_edit-0.3.0.dev16/rekordbox_edit/commands/convert.py +570 -0
  25. rekordbox_edit-0.3.0.dev16/rekordbox_edit/commands/search.py +109 -0
  26. rekordbox_edit-0.3.0.dev16/rekordbox_edit/logger.py +109 -0
  27. rekordbox_edit-0.3.0.dev16/rekordbox_edit/query.py +263 -0
  28. rekordbox_edit-0.3.0.dev16/rekordbox_edit/utils.py +324 -0
  29. rekordbox_edit-0.3.0.dev16/ruff.toml +84 -0
  30. rekordbox_edit-0.3.0.dev16/tests/__init__.py +1 -0
  31. rekordbox_edit-0.3.0.dev16/tests/commands/__init__.py +1 -0
  32. rekordbox_edit-0.3.0.dev16/tests/commands/test_convert.py +2141 -0
  33. rekordbox_edit-0.3.0.dev16/tests/commands/test_search.py +237 -0
  34. rekordbox_edit-0.3.0.dev16/tests/conftest.py +45 -0
  35. rekordbox_edit-0.3.0.dev16/tests/test_logger.py +117 -0
  36. rekordbox_edit-0.3.0.dev16/tests/test_query.py +591 -0
  37. rekordbox_edit-0.3.0.dev16/tests/test_utils.py +549 -0
  38. rekordbox_edit-0.3.0.dev16/uv.lock +1428 -0
@@ -0,0 +1,138 @@
1
+ # COPIED FROM https://github.com/commitizen-tools/commitizen-action/blob/master/action.yml
2
+ name: "Bump and changelog using commitizen"
3
+ description: "Create a commit bumping the version of your project and creating a changelog file"
4
+ branding:
5
+ icon: "git-commit"
6
+ color: "purple"
7
+ outputs:
8
+ version:
9
+ value: "" # gets populated by commitizen-bump.sh
10
+ description: "New version"
11
+ inputs:
12
+ working_directory:
13
+ description: "Change to this directory before running"
14
+ required: false
15
+ dry_run:
16
+ description: "Run without creating commit, output to stdout"
17
+ required: false
18
+ commit:
19
+ description: "If true a commit is created containing the bump changes"
20
+ required: false
21
+ default: "true"
22
+ push:
23
+ description: "If true the bump commit is pushed to the remote repository"
24
+ required: false
25
+ default: "true"
26
+ merge:
27
+ description: >
28
+ If true, the bump commit is pushed to the remote repository even when the
29
+ action is run on the pull_request event, immediately merging the pull request
30
+ required: false
31
+ default: "false"
32
+ prerelease:
33
+ description: "Set as prerelease version"
34
+ required: false
35
+ devrelease:
36
+ description: "Non-negative integer for dev. release"
37
+ required: false
38
+ local_version:
39
+ description: "Bump only the local version portion"
40
+ required: false
41
+ default: "false"
42
+ changelog:
43
+ description: "Create changelog when bumping the version"
44
+ default: "true"
45
+ required: false
46
+ github_token:
47
+ description: 'Token for the repo. Can be passed in using $\{{ secrets.GITHUB_TOKEN }}'
48
+ required: false
49
+ repository:
50
+ description: "Repository name to push. Default or empty value represents current github repository (${GITHUB_REPOSITORY})"
51
+ default: ""
52
+ required: false
53
+ branch:
54
+ description: "Destination branch to push changes"
55
+ required: false
56
+ default: ""
57
+ extra_requirements:
58
+ description: "Extra commitizen dependencies like your custom plugins or rules"
59
+ required: false
60
+ default: ""
61
+ changelog_increment_filename:
62
+ description: "Filename to store the incremented generated changelog. This is different to changelog as it only contains the changes for the just generated version"
63
+ required: false
64
+ git_redirect_stderr:
65
+ description: "Redirect git output to stderr. Useful if you do not want git output in your changelog"
66
+ required: false
67
+ default: "false"
68
+ git_name:
69
+ description: "Name used to configure git (for git operations)"
70
+ required: false
71
+ default: "github-actions[bot]"
72
+ git_email:
73
+ description: "Email address used to configure git (for git operations)"
74
+ required: false
75
+ default: "github-actions[bot]@users.noreply.github.com"
76
+ commitizen_version:
77
+ description: "Specify the version to be used by commitizen"
78
+ required: false
79
+ default: latest
80
+ no_raise:
81
+ description: "Don't raise the given comma-delimited exit codes"
82
+ required: false
83
+ default: "21"
84
+ increment:
85
+ description: "Manually specify the desired increment"
86
+ required: false
87
+ check_consistency:
88
+ default: "false"
89
+ description: "check consistency among versions defined in commitizen configuration and version_files"
90
+ required: false
91
+ gpg_sign:
92
+ description: >
93
+ If true, use GPG to sign commits and tags (for git operations). Requires separate
94
+ setup of GPG key and passphrase in GitHub Actions (e.g. with the action
95
+ crazy-max/ghaction-import-gpg)
96
+ required: false
97
+ default: "false"
98
+ debug:
99
+ description: "If true, prints debug output to GitHub Actions stdout."
100
+ required: false
101
+ default: "false"
102
+ actor:
103
+ description: "The account that will be used to perform git operations, defaults to the GITHUB_ACTOR"
104
+ required: false
105
+ manual_version:
106
+ description: "Manually specify the version to bump to"
107
+ required: false
108
+ runs:
109
+ using: "composite"
110
+ steps:
111
+ - shell: bash
112
+ run: ${{ github.action_path }}/commitizen-bump.sh
113
+ env:
114
+ INPUT_WORKING_DIRECTORY: ${{ inputs.working_directory }}
115
+ INPUT_DRY_RUN: ${{ inputs.dry_run }}
116
+ INPUT_COMMIT: ${{ inputs.commit }}
117
+ INPUT_PUSH: ${{ inputs.push }}
118
+ INPUT_MERGE: ${{ inputs.merge }}
119
+ INPUT_PRERELEASE: ${{ inputs.prerelease }}
120
+ INPUT_DEVRELEASE: ${{ inputs.devrelease }}
121
+ INPUT_LOCAL_VERSION: ${{ inputs.local_version }}
122
+ INPUT_CHANGELOG: ${{ inputs.changelog }}
123
+ INPUT_GITHUB_TOKEN: ${{ inputs.github_token }}
124
+ INPUT_REPOSITORY: ${{ inputs.repository }}
125
+ INPUT_BRANCH: ${{ inputs.branch }}
126
+ INPUT_EXTRA_REQUIREMENTS: ${{ inputs.extra_requirements }}
127
+ INPUT_CHANGELOG_INCREMENT_FILENAME: ${{ inputs.changelog_increment_filename }}
128
+ INPUT_GIT_REDIRECT_STDERR: ${{ inputs.git_redirect_stderr }}
129
+ INPUT_GIT_NAME: ${{ inputs.git_name }}
130
+ INPUT_GIT_EMAIL: ${{ inputs.git_email }}
131
+ INPUT_COMMITIZEN_VERSION: ${{ inputs.commitizen_version }}
132
+ INPUT_NO_RAISE: ${{ inputs.no_raise }}
133
+ INPUT_INCREMENT: ${{ inputs.increment }}
134
+ INPUT_CHECK_CONSISTENCY: ${{ inputs.check_consistency }}
135
+ INPUT_GPG_SIGN: ${{ inputs.gpg_sign }}
136
+ INPUT_DEBUG: ${{ inputs.debug }}
137
+ INPUT_ACTOR: ${{ inputs.actor }}
138
+ INPUT_MANUAL_VERSION: ${{ inputs.manual_version }}
@@ -0,0 +1,129 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # COPIED FROM https://github.com/commitizen-tools/commitizen-action/blob/master/entrypoint.sh
4
+
5
+ set -e
6
+
7
+ # Reporting
8
+ gpg --version
9
+ git --version
10
+
11
+ if [[ -z $INPUT_GITHUB_TOKEN && $INPUT_PUSH == "true" ]]; then
12
+ echo 'Missing input "github_token: ${{ secrets.GITHUB_TOKEN }}" which is required to push.' >&2
13
+ exit 1
14
+ fi
15
+
16
+ echo "Configuring Git username, email, and pull behavior..."
17
+
18
+ # Fix #56
19
+ git config --global --add safe.directory "*"
20
+
21
+ git config --local user.name "${INPUT_GIT_NAME}"
22
+ git config --local user.email "${INPUT_GIT_EMAIL}"
23
+ git config --local pull.rebase true
24
+ echo "Git name: $(git config --get user.name)"
25
+ echo "Git email: $(git config --get user.email)"
26
+
27
+ PIP_CMD=('pip' 'install')
28
+ if [[ $INPUT_COMMITIZEN_VERSION == 'latest' ]]; then
29
+ PIP_CMD+=('commitizen')
30
+ else
31
+ PIP_CMD+=("commitizen==${INPUT_COMMITIZEN_VERSION}")
32
+ fi
33
+ IFS=" " read -r -a INPUT_EXTRA_REQUIREMENTS <<<"$INPUT_EXTRA_REQUIREMENTS"
34
+ PIP_CMD+=("${INPUT_EXTRA_REQUIREMENTS[@]}")
35
+ echo "${PIP_CMD[@]}"
36
+ "${PIP_CMD[@]}"
37
+ echo "Commitizen version: $(cz version)"
38
+
39
+ if [[ $INPUT_WORKING_DIRECTORY ]]; then
40
+ cd $INPUT_WORKING_DIRECTORY
41
+ fi
42
+
43
+ PREV_REV="$(cz version --project)"
44
+ echo "PREVIOUS_REVISION=${PREV_REV}" >>"$GITHUB_ENV"
45
+
46
+ CZ_CMD=('cz')
47
+ if [[ $INPUT_DEBUG == 'true' ]]; then
48
+ CZ_CMD+=('--debug')
49
+ fi
50
+ if [[ $INPUT_NO_RAISE ]]; then
51
+ CZ_CMD+=('--no-raise' "$INPUT_NO_RAISE")
52
+ fi
53
+ CZ_CMD+=('bump' '--yes')
54
+ if [[ $INPUT_GPG_SIGN == 'true' ]]; then
55
+ CZ_CMD+=('--gpg-sign')
56
+ fi
57
+ if [[ $INPUT_DRY_RUN == 'true' ]]; then
58
+ CZ_CMD+=('--dry-run')
59
+ fi
60
+ if [[ $INPUT_CHANGELOG == 'true' ]]; then
61
+ CZ_CMD+=('--changelog')
62
+ fi
63
+ if [[ $INPUT_PRERELEASE ]]; then
64
+ CZ_CMD+=('--prerelease' "$INPUT_PRERELEASE")
65
+ fi
66
+ if [[ $INPUT_DEVRELEASE ]]; then
67
+ CZ_CMD+=('--devrelease' "$INPUT_DEVRELEASE")
68
+ fi
69
+ if [[ $INPUT_LOCAL_VERSION == 'true' ]]; then
70
+ CZ_CMD+=('--local-version')
71
+ fi
72
+ if [[ $INPUT_COMMIT == 'false' ]]; then
73
+ CZ_CMD+=('--files-only')
74
+ fi
75
+ if [[ $INPUT_INCREMENT ]]; then
76
+ CZ_CMD+=('--increment' "$INPUT_INCREMENT")
77
+ fi
78
+ if [[ $INPUT_CHECK_CONSISTENCY == 'true' ]]; then
79
+ CZ_CMD+=('--check-consistency')
80
+ fi
81
+ if [[ $INPUT_GIT_REDIRECT_STDERR == 'true' ]]; then
82
+ CZ_CMD+=('--git-output-to-stderr')
83
+ fi
84
+ if [[ $INPUT_MANUAL_VERSION ]]; then
85
+ CZ_CMD+=("$INPUT_MANUAL_VERSION")
86
+ fi
87
+ if [[ $INPUT_CHANGELOG_INCREMENT_FILENAME ]]; then
88
+ CZ_CMD+=('--changelog-to-stdout')
89
+ echo "${CZ_CMD[@]}" ">$INPUT_CHANGELOG_INCREMENT_FILENAME"
90
+ "${CZ_CMD[@]}" >"$INPUT_CHANGELOG_INCREMENT_FILENAME"
91
+ else
92
+ echo "${CZ_CMD[@]}"
93
+ "${CZ_CMD[@]}"
94
+ fi
95
+ if [[ $INPUT_ACTOR ]]; then
96
+ ACTOR=$INPUT_ACTOR
97
+ else
98
+ ACTOR=$GITHUB_ACTOR
99
+ fi
100
+
101
+ REV="$(cz version --project)"
102
+ if [[ $REV == "$PREV_REV" ]]; then
103
+ INPUT_PUSH='false'
104
+ fi
105
+ echo "REVISION=${REV}" >>"$GITHUB_ENV"
106
+ echo "version=${REV}" >>"$GITHUB_OUTPUT"
107
+
108
+ GITHUB_DOMAIN=${GITHUB_SERVER_URL#*//}
109
+ CURRENT_BRANCH="$(git branch --show-current)"
110
+ INPUT_BRANCH="${INPUT_BRANCH:-$CURRENT_BRANCH}"
111
+ INPUT_REPOSITORY="${INPUT_REPOSITORY:-$GITHUB_REPOSITORY}"
112
+
113
+ echo "Repository: ${INPUT_REPOSITORY}"
114
+ echo "Actor: ${ACTOR}"
115
+
116
+ if [[ $INPUT_PUSH == 'true' ]]; then
117
+ if [[ $INPUT_MERGE != 'true' && $GITHUB_EVENT_NAME == 'pull_request' ]]; then
118
+ echo "Refusing to push on pull_request event since that would merge the pull request." >&2
119
+ echo "You probably want to run on push to your default branch instead." >&2
120
+ else
121
+ echo "Pushing to branch..."
122
+ REMOTE_REPO="https://${ACTOR}:${INPUT_GITHUB_TOKEN}@${GITHUB_DOMAIN}/${INPUT_REPOSITORY}.git"
123
+ git pull "$REMOTE_REPO" "$INPUT_BRANCH"
124
+ git push "$REMOTE_REPO" "HEAD:${INPUT_BRANCH}" --tags
125
+ fi
126
+ else
127
+ echo "Not pushing"
128
+ fi
129
+ echo "Done."
@@ -0,0 +1,20 @@
1
+ name: "Setup UV"
2
+ description: "Install UV, set up Python, and install dependencies"
3
+
4
+ runs:
5
+ using: "composite"
6
+ steps:
7
+ - name: Install UV
8
+ uses: astral-sh/setup-uv@v4
9
+ with:
10
+ enable-cache: true
11
+
12
+ - name: Set up Python
13
+ uses: actions/setup-python@v4
14
+ with:
15
+ python-version: ${{ env.PYTHON }}
16
+
17
+ - name: Install dependencies
18
+ shell: bash
19
+ run: |
20
+ uv sync --all-groups
@@ -0,0 +1,29 @@
1
+ name: "Lint"
2
+ description: "Run all lint (pre-commit) checks"
3
+
4
+ runs:
5
+ using: "composite"
6
+ steps:
7
+ - name: Checkout
8
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
9
+ with:
10
+ fetch-depth: 0
11
+
12
+ - name: Setup UV
13
+ uses: ./.github/actions/install
14
+
15
+ - name: Validate Conventional Commits
16
+ shell: bash
17
+ if: ${{ github.ref != 'refs/heads/main' }}
18
+ run: |
19
+ uv run cz check --rev-range origin/main..HEAD
20
+
21
+ - name: Run lint
22
+ shell: bash
23
+ run: |
24
+ uv run ruff check --fix
25
+
26
+ - name: Run type checks
27
+ shell: bash
28
+ run: |
29
+ uv run ty check
@@ -0,0 +1,24 @@
1
+ name: "Run Unit Tests"
2
+ description: "Set up Python environment and run all unit tests"
3
+
4
+ runs:
5
+ using: "composite"
6
+ steps:
7
+ - name: Checkout
8
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
9
+
10
+ - name: Setup UV
11
+ uses: ./.github/actions/install
12
+
13
+ - name: Run unit tests
14
+ shell: bash
15
+ run: |
16
+ uv run pytest tests --cov=rekordbox_edit --junitxml=.coverage/junit.xml --cov-report=term-missing --cov-report=html --cov-report=xml
17
+
18
+ - name: Upload results to Codecov
19
+ uses: codecov/codecov-action@main
20
+ with:
21
+ token: ${{ env.CODECOV_TOKEN }}
22
+ directory: .coverage
23
+ env_vars: OS,PYTHON
24
+ verbose: true
@@ -0,0 +1,83 @@
1
+ name: Canary Continuous Deployment
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths-ignore:
7
+ - "docs/**"
8
+ - ".github/**"
9
+ - ".resources/**"
10
+ - "logos/**"
11
+ - "README.md"
12
+ - "CHANGELOG.md"
13
+ - "CONTRIBUTING.md"
14
+ - ".pre-commit-config.yaml"
15
+ - ".readthedocs.yaml"
16
+ workflow_dispatch:
17
+
18
+ jobs:
19
+ ci:
20
+ uses: ./.github/workflows/ci.yml
21
+ secrets: inherit
22
+
23
+ canary-release:
24
+ name: 📦 Canary Release
25
+ needs: ci
26
+ if: "!startsWith(github.event.head_commit.message, 'bump:')"
27
+ runs-on: ubuntu-latest
28
+ environment: canary-publish
29
+ permissions:
30
+ contents: write
31
+ id-token: write
32
+ env:
33
+ PYTHON: "3.14"
34
+
35
+ steps:
36
+ - name: Check out
37
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
38
+ with:
39
+ fetch-depth: 0
40
+
41
+ - name: Setup UV
42
+ uses: ./.github/actions/install
43
+
44
+ - name: Bump to dev version
45
+ id: bump
46
+ uses: ./.github/actions/commitizen-bump
47
+ with:
48
+ devrelease: ${{ github.run_number }}
49
+ commit: false
50
+ push: false
51
+ changelog: false
52
+
53
+ - name: Get version
54
+ id: version
55
+ run: echo "version=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")" >> $GITHUB_OUTPUT
56
+
57
+ - name: Build distribution
58
+ run: |
59
+ uv build
60
+
61
+ - name: Create and push tag
62
+ run: |
63
+ git tag v${{ steps.version.outputs.version }}
64
+ git push origin v${{ steps.version.outputs.version }}
65
+
66
+ - name: Publish to PyPI
67
+ uses: pypa/gh-action-pypi-publish@release/v1
68
+ with:
69
+ skip-existing: true
70
+
71
+ - name: Create GitHub Pre-Release
72
+ uses: softprops/action-gh-release@v1
73
+ with:
74
+ tag_name: v${{ steps.version.outputs.version }}
75
+ name: v${{ steps.version.outputs.version }}
76
+ prerelease: true
77
+ generate_release_notes: true
78
+ body: |
79
+ 🚧 Development pre-release
80
+
81
+ Install: `pip install --pre rekordbox-edit==${{ steps.version.outputs.version }}`
82
+ env:
83
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,82 @@
1
+ name: CI Checks
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+ workflow_call:
8
+
9
+ jobs:
10
+ code-change:
11
+ name: Detect Changes
12
+ runs-on: ubuntu-latest
13
+ outputs:
14
+ should_skip: ${{ steps.skip_check.outputs.should_skip }}
15
+ code: ${{ steps.filter.outputs.code }}
16
+ steps:
17
+ - id: skip_check
18
+ uses: fkirc/skip-duplicate-actions@master
19
+
20
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21
+
22
+ - uses: dorny/paths-filter@v3
23
+ id: filter
24
+ with:
25
+ filters: |
26
+ code:
27
+ - '.github/actions/**'
28
+ - '.github/workflows/**'
29
+ - 'rekordbox_edit/**'
30
+ - 'tests/**'
31
+ - 'pyproject.toml'
32
+ - 'uv.lock'
33
+ - 'Makefile'
34
+ - 'ruff.toml'
35
+
36
+ lint:
37
+ name: 🧺 Lint
38
+ runs-on: ubuntu-latest
39
+ if: ${{ needs.code-change.outputs.code == 'true' }}
40
+ env:
41
+ PYTHON: "3.13"
42
+ steps:
43
+ - name: Checkout code
44
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
45
+
46
+ - name: Run lint tests
47
+ uses: ./.github/actions/lint
48
+
49
+ unit-tests:
50
+ name: 🧪 Tests
51
+ needs: code-change
52
+ if: ${{ needs.code-change.outputs.should_skip != 'true' && needs.code-change.outputs.code == 'true' }}
53
+ strategy:
54
+ fail-fast: false
55
+ matrix:
56
+ os: ["ubuntu-latest", "windows-latest", "macos-latest"]
57
+ python-version: ["3.10", "3.14"] # oldest and latest
58
+ runs-on: ${{ matrix.os }}
59
+ env:
60
+ OS: ${{ matrix.os }}
61
+ PYTHON: ${{ matrix.python-version }}
62
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
63
+
64
+ steps:
65
+ - name: Checkout code
66
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
67
+
68
+ - name: Run unit tests
69
+ uses: ./.github/actions/test
70
+ all-green:
71
+ name: ✅ All Green
72
+ if: always()
73
+ needs:
74
+ - lint
75
+ - unit-tests
76
+ runs-on: Ubuntu-latest
77
+
78
+ steps:
79
+ - uses: re-actors/alls-green@release/v1
80
+ with:
81
+ allowed-skips: unit-tests, lint
82
+ jobs: ${{ toJSON(needs) }}
@@ -0,0 +1,59 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [released]
6
+
7
+ jobs:
8
+ build:
9
+ name: 🛠️ Build
10
+ runs-on: ubuntu-latest
11
+ env:
12
+ PYTHON: "3.14"
13
+ steps:
14
+ - name: checkout
15
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
16
+
17
+ - name: Setup UV
18
+ uses: ./.github/actions/install
19
+
20
+ - name: Build distribution
21
+ run: |
22
+ uv build
23
+ - uses: actions/upload-artifact@v4
24
+ with:
25
+ name: dist
26
+ path: dist/
27
+
28
+ publish-test-pypi:
29
+ name: 📦 Publish to Test-PyPI
30
+ runs-on: ubuntu-latest
31
+ needs: build
32
+ environment: test-publish
33
+ permissions:
34
+ id-token: write
35
+ steps:
36
+ - uses: actions/download-artifact@v4
37
+ with:
38
+ name: dist
39
+ path: dist/
40
+ - name: Publish package distributions 📦 to TestPyPI
41
+ uses: pypa/gh-action-pypi-publish@release/v1
42
+ with:
43
+ repository-url: https://test.pypi.org/legacy/
44
+
45
+ publish-pypi:
46
+ name: 📦 Publish to PyPI
47
+ runs-on: ubuntu-latest
48
+ needs: publish-test-pypi
49
+ environment: publish
50
+ permissions:
51
+ id-token: write
52
+ steps:
53
+ - uses: actions/download-artifact@v4
54
+ with:
55
+ pattern: dist
56
+ path: dist
57
+ merge-multiple: true
58
+ - name: Publish to PyPI
59
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,48 @@
1
+ name: Verion Bump and Create a Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ ci:
8
+ uses: ./.github/workflows/ci.yml
9
+ secrets: inherit
10
+
11
+ version-bump:
12
+ name: 📦 Stable Release
13
+ needs: ci
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ contents: write
17
+
18
+ steps:
19
+ - name: Check out
20
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21
+ with:
22
+ token: "${{ secrets.WORKFLOW_TOKEN }}"
23
+ fetch-depth: 0
24
+
25
+ - name: Import GPG key
26
+ uses: crazy-max/ghaction-import-gpg@v6
27
+ with:
28
+ gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
29
+ passphrase: ${{ secrets.GPG_PASSPHRASE }}
30
+ git_user_signingkey: true
31
+ git_commit_gpgsign: true
32
+ git_tag_gpgsign: true
33
+ git_push_gpgsign: false
34
+
35
+ - name: Create bump and changelog
36
+ uses: ./.github/actions/commitizen-bump
37
+ with:
38
+ github_token: ${{ secrets.WORKFLOW_TOKEN }}
39
+ changelog_increment_filename: body.md
40
+ gpg_sign: true
41
+
42
+ - name: Release
43
+ uses: softprops/action-gh-release@v1
44
+ with:
45
+ body_path: "body.md"
46
+ tag_name: ${{ env.REVISION }}
47
+ env:
48
+ GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
@@ -0,0 +1,48 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Distribution / packaging
7
+ .Python
8
+ build/
9
+ develop-eggs/
10
+ dist/
11
+ downloads/
12
+ eggs/
13
+ .eggs/
14
+ lib/
15
+ lib64/
16
+ parts/
17
+ sdist/
18
+ var/
19
+ wheels/
20
+ pip-wheel-metadata/
21
+ share/python-wheels/
22
+ *.egg-info/
23
+ .installed.cfg
24
+ *.egg
25
+ MANIFEST
26
+
27
+ # Virtual environments
28
+ venv/
29
+ env/
30
+ ENV/
31
+ env.bak/
32
+ venv.bak/
33
+
34
+ # IDE
35
+ .vscode/
36
+ .idea/
37
+ *.swp
38
+ *.swo
39
+
40
+ # OS
41
+ .DS_Store
42
+ Thumbs.db
43
+
44
+ # Environment variables
45
+ .env
46
+
47
+ # Test files
48
+ .coverage
@@ -0,0 +1,35 @@
1
+ repos:
2
+ - repo: https://gitlab.com/vojko.pribudic.foss/pre-commit-update
3
+ rev: v0.9.0
4
+ hooks:
5
+ - id: pre-commit-update
6
+ - repo: https://github.com/pre-commit/pre-commit-hooks
7
+ rev: v6.0.0
8
+ hooks:
9
+ - id: trailing-whitespace
10
+ - id: end-of-file-fixer
11
+ - id: check-yaml
12
+ - id: check-added-large-files
13
+ - id: check-merge-conflict
14
+ - id: debug-statements
15
+ - id: check-toml
16
+ - id: check-case-conflict
17
+ - repo: https://github.com/commitizen-tools/commitizen
18
+ rev: v4.13.10
19
+ hooks:
20
+ - id: commitizen
21
+ stages: [commit-msg]
22
+ - repo: local
23
+ hooks:
24
+ - id: uv-lock-check
25
+ name: Check uv.lock is up to date
26
+ entry: uv lock --check
27
+ language: system
28
+ files: pyproject\.toml$
29
+ pass_filenames: false
30
+ - repo: https://github.com/astral-sh/ruff-pre-commit
31
+ rev: v0.15.11
32
+ hooks:
33
+ - id: ruff-check
34
+ args: [--fix]
35
+ - id: ruff-format