plexer-cli 0.1.14__tar.gz → 0.1.17__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 (40) hide show
  1. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/.github/dependabot.yml +1 -1
  2. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/.github/workflows/openssf_scorecard.yml +1 -1
  3. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/.github/workflows/release.yml +64 -22
  4. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/.github/workflows/run_full_test_suite.yml +2 -2
  5. plexer_cli-0.1.17/.pre-commit-config.yaml +29 -0
  6. plexer_cli-0.1.17/.tool-versions +3 -0
  7. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/.vscode/launch.json +2 -2
  8. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/.vscode/plexer-cli.code-workspace +1 -1
  9. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/.vscode/settings.json +1 -1
  10. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/PKG-INFO +1 -1
  11. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/src/plexer_cli/main.py +3 -2
  12. plexer_cli-0.1.14/.pre-commit-config.yaml +0 -12
  13. plexer_cli-0.1.14/.tool-versions +0 -1
  14. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -0
  15. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
  16. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  17. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/.gitignore +0 -0
  18. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/.python-version +0 -0
  19. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/.trivyignore.yaml +0 -0
  20. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/CODE_OF_CONDUCT.md +0 -0
  21. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/Dockerfile +0 -0
  22. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/LICENSE +0 -0
  23. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/README.md +0 -0
  24. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/SECURITY.md +0 -0
  25. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/pyproject.toml +0 -0
  26. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/src/plexer_cli/__init__.py +0 -0
  27. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/src/plexer_cli/artifact.py +0 -0
  28. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/src/plexer_cli/const.py +0 -0
  29. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/src/plexer_cli/file_manager.py +0 -0
  30. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/src/plexer_cli/metadata.py +0 -0
  31. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/tests/bootstrap/blank.mkv +0 -0
  32. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/tests/bootstrap/blank.mp4 +0 -0
  33. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/tests/bootstrap/bootstrap_plexer_e2e.sh +0 -0
  34. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/tests/conftest.py +0 -0
  35. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/tests/test_artifact.py +0 -0
  36. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/tests/test_file_manager.py +0 -0
  37. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/tests/test_metadata.py +0 -0
  38. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/tox.ini +0 -0
  39. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/trivyignore.yaml +0 -0
  40. {plexer_cli-0.1.14 → plexer_cli-0.1.17}/uv.lock +0 -0
@@ -20,4 +20,4 @@ updates:
20
20
  include: "scope"
21
21
  labels:
22
22
  - "dependencies"
23
- - "security"
23
+ - "security"
@@ -44,4 +44,4 @@ jobs:
44
44
  - name: "Upload to code-scanning"
45
45
  uses: github/codeql-action/upload-sarif@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
46
46
  with:
47
- sarif_file: results.sarif
47
+ sarif_file: results.sarif
@@ -16,17 +16,14 @@ permissions:
16
16
  contents: read
17
17
 
18
18
  jobs:
19
- release:
20
- name: Generate New Release - ${{ github.ref_name }}
19
+ build_and_release_project:
20
+ name: Build and Release Project - ${{ github.ref_name }}
21
21
  runs-on: ubuntu-latest
22
22
  environment: release
23
23
 
24
24
  permissions:
25
- attestations: write
26
- contents: write # needed to create GH Release
27
25
  id-token: write # IMPORTANT: this permission is mandatory for trusted publishing to PyPI
28
- packages: write # required for pushing image to GHCR
29
-
26
+
30
27
  steps:
31
28
  - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
32
29
  if: ${{ github.event_name == 'push' }}
@@ -39,7 +36,7 @@ jobs:
39
36
  with:
40
37
  ref: ${{ github.event.inputs.tag }}
41
38
  fetch-depth: 0
42
-
39
+
43
40
  - name: Install uv
44
41
  uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
45
42
  with:
@@ -52,14 +49,14 @@ jobs:
52
49
 
53
50
  - name: Setup and run test suite
54
51
  run: uvx tox -vv -e test
55
-
56
- # build and publish
52
+
53
+ # build and upload Python packages
57
54
  - name: Install Hatch
58
55
  run: uvx pipx install hatch
59
56
 
60
57
  - name: Build dist artifacts
61
58
  run: hatch build
62
-
59
+
63
60
  # PyPI Release
64
61
  # required instead of using hatch due to usage of trusted publishers
65
62
  - name: Publish to TestPyPI
@@ -74,7 +71,7 @@ jobs:
74
71
  uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
75
72
  with:
76
73
  attestations: true
77
-
74
+
78
75
  # Github Release
79
76
  - name: Create Github Release
80
77
  uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
@@ -85,16 +82,36 @@ jobs:
85
82
  fail_on_unmatched_files: true
86
83
  generate_release_notes: true
87
84
  make_latest: true
88
-
89
- # Docker Release
90
- # REF: https://docs.github.com/en/actions/use-cases-and-examples/publishing-packages/publishing-docker-images#publishing-images-to-docker-hub-and-github-packages
91
- ## Uploads to Docker.io and ghcr.io (GitHub Container Registry)
85
+
86
+ #############
87
+
88
+ build_and_push_container:
89
+ name: Build and Push Container - ${{ github.ref_name }}
90
+ runs-on: ubuntu-latest
91
+ environment: release
92
+
93
+ permissions:
94
+ packages: write # required for pushing image to GHCR
95
+
96
+ steps:
97
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
98
+ if: ${{ github.event_name == 'push' }}
99
+ with:
100
+ ref: ${{ github.ref_name }}
101
+ fetch-depth: 0
102
+
103
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
104
+ if: ${{ github.event_name == 'workflow_dispatch' }}
105
+ with:
106
+ ref: ${{ github.event.inputs.tag }}
107
+ fetch-depth: 0
108
+
92
109
  - name: Log in to Docker Hub
93
110
  uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
94
111
  with:
95
112
  username: ${{ secrets.DOCKER_USERNAME }}
96
113
  password: ${{ secrets.DOCKER_PASSWORD }}
97
-
114
+
98
115
  - name: Log in to Github Container registry
99
116
  uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
100
117
  with:
@@ -102,7 +119,7 @@ jobs:
102
119
  username: ${{ github.actor }}
103
120
  password: ${{ secrets.GITHUB_TOKEN }}
104
121
 
105
- - name: Extract metadata (tags, labels) for Docker
122
+ - name: Extract metadata (tags, labels)
106
123
  id: meta
107
124
  uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
108
125
  with:
@@ -110,19 +127,44 @@ jobs:
110
127
  magneticstain/plexer
111
128
  ghcr.io/${{ github.repository }}
112
129
 
113
- # required for automatic SBOM generation and provenance attestation
130
+ # required for multi-platform builds (e.g. arm64)
131
+ - name: Set up QEMU
132
+ uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
133
+
134
+ # explicitly required for automatic SBOM generation and provenance attestation
114
135
  # REF: https://docs.docker.com/guides/gha
115
136
  - name: Set up Docker Buildx
116
137
  uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
117
138
 
118
- - name: Build and push Docker images to all registries
139
+ - name: Validate Docker build configuration
140
+ uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
141
+ with:
142
+ call: check
143
+
144
+ # required for reproducible builds
145
+ # REF: https://docs.docker.com/build/ci/github-actions/reproducible-builds/
146
+ - name: Get Git commit timestamps
147
+ run: echo "TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
148
+
149
+ - name: Build and push Docker image
119
150
  id: push
120
151
  uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
152
+ env:
153
+ SOURCE_DATE_EPOCH: ${{ env.TIMESTAMP }}
121
154
  with:
122
155
  context: .
123
156
  push: true
124
- provenance: mode=max
125
- sbom: true
157
+ platforms: linux/amd64,linux/arm64
158
+ annotations: ${{ steps.meta.outputs.annotations }}
126
159
  tags: ${{ steps.meta.outputs.tags }}
127
160
  labels: ${{ steps.meta.outputs.labels }}
128
-
161
+ provenance: mode=max
162
+ sbom: true
163
+
164
+ - name: Generate artifact attestation for GHCR container image
165
+ uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2
166
+ with:
167
+ subject-name: ghcr.io/${{ github.repository }}
168
+ subject-digest: ${{ steps.push.outputs.digest }}
169
+ sbom-path: "sbom.spdx.json" # REF: https://docs.docker.com/build/metadata/attestations/sbom/#verify-sbom-attestations
170
+ push-to-registry: true
@@ -14,7 +14,7 @@ jobs:
14
14
  unit-test:
15
15
  name: Run unit tests with version ${{ matrix.py }} on ${{ matrix.os }}
16
16
  runs-on: ${{ matrix.os }}
17
-
17
+
18
18
  strategy:
19
19
  matrix:
20
20
  py:
@@ -31,7 +31,7 @@ jobs:
31
31
  - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
32
32
  with:
33
33
  fetch-depth: 0
34
-
34
+
35
35
  - name: Install uv and set python versions
36
36
  uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
37
37
  with:
@@ -0,0 +1,29 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: debug-statements
6
+ - id: end-of-file-fixer
7
+ - id: forbid-submodules
8
+ - id: mixed-line-ending
9
+ - id: name-tests-test
10
+ args: [ --pytest-test-first ]
11
+ - id: trailing-whitespace
12
+
13
+ - repo: https://github.com/astral-sh/ruff-pre-commit
14
+ rev: v0.17.2
15
+ hooks:
16
+ - id: ruff-format
17
+ - id: ruff-check
18
+ args: [ --fix ]
19
+
20
+ # REF: https://docs.astral.sh/uv/guides/integration/pre-commit/
21
+ - repo: https://github.com/astral-sh/uv-pre-commit
22
+ rev: 0.13.5
23
+ hooks:
24
+ - id: uv-lock
25
+
26
+ - repo: https://github.com/rhysd/actionlint
27
+ rev: v1.7.12
28
+ hooks:
29
+ - id: actionlint
@@ -0,0 +1,3 @@
1
+ actionlint 1.7.9
2
+ pre-commit 4.5.0
3
+ uv 0.10.2
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": "0.2.0",
3
3
  "configurations": [
4
-
4
+
5
5
  {
6
6
  "name": "Run w/ Tmp Dirs",
7
7
  "type": "debugpy",
@@ -39,4 +39,4 @@
39
39
  "justMyCode": true,
40
40
  }
41
41
  ]
42
- }
42
+ }
@@ -8,4 +8,4 @@
8
8
  "trivy.useIgnoreFile": true,
9
9
  "trivy.secretScanning": true
10
10
  }
11
- }
11
+ }
@@ -4,4 +4,4 @@
4
4
  ],
5
5
  "python.testing.unittestEnabled": false,
6
6
  "python.testing.pytestEnabled": true
7
- }
7
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: plexer_cli
3
- Version: 0.1.14
3
+ Version: 0.1.17
4
4
  Summary: Normalize media files and directories for use with Plex Media Server
5
5
  Project-URL: Repository, https://github.com/magneticstain/plexer
6
6
  Project-URL: Documentation, https://github.com/magneticstain/plexer-cli/wiki
@@ -6,15 +6,16 @@ Main App Entrypoint
6
6
  """
7
7
 
8
8
  __author__ = "magneticstain"
9
- __version__ = "0.1.14"
9
+ __version__ = "0.1.17"
10
10
  __license__ = "MIT"
11
11
 
12
12
  import argparse
13
+
13
14
  import logzero
14
15
  from logzero import logger
16
+
15
17
  # yes, docs suggest importing it twice:
16
18
  # https://logzero.readthedocs.io/en/latest/#advanced-usage-examples
17
-
18
19
  from plexer_cli.file_manager import FileManager
19
20
 
20
21
 
@@ -1,12 +0,0 @@
1
- repos:
2
- - repo: https://github.com/astral-sh/ruff-pre-commit
3
- rev: v0.15.1
4
- hooks:
5
- - id: ruff-format
6
- - id: ruff-check
7
- args: [ --fix ]
8
- # REF: https://docs.astral.sh/uv/guides/integration/pre-commit/
9
- - repo: https://github.com/astral-sh/uv-pre-commit
10
- rev: 0.10.2
11
- hooks:
12
- - id: uv-lock
@@ -1 +0,0 @@
1
- uv 0.10.2
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes