pluginify 0.1.0__tar.gz → 1.0.0__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.
- pluginify-1.0.0/.github/workflows/code-quality.yaml +87 -0
- pluginify-1.0.0/.github/workflows/deploy-docs.yaml +32 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/.github/workflows/generate-badges.yaml +28 -52
- pluginify-1.0.0/.github/workflows/package-and-publish.yaml +34 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/.github/workflows/status-check.yaml +1 -1
- pluginify-1.0.0/.github/workflows/tag-and-release.yaml +27 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/PKG-INFO +13 -9
- {pluginify-0.1.0 → pluginify-1.0.0}/README.md +12 -8
- pluginify-1.0.0/docs/source/releases/1.0.0/1.0.0-no-bug-fixes-required-on-this-release.yaml +17 -0
- pluginify-1.0.0/docs/source/releases/1.0.0/1.19.0-internal-release.yaml +12 -0
- pluginify-1.0.0/docs/source/releases/1.0.0/1.19.0-open-source-upload.yaml +7 -0
- pluginify-1.0.0/docs/source/releases/1.0.0/1.19.0-patch-internal-use-vars-runner.yaml +17 -0
- pluginify-1.0.0/docs/source/releases/1.0.0/ignore-dot-files-and-dirs.yaml +17 -0
- pluginify-1.0.0/docs/source/releases/1.0.0/module-to-class-updates.yaml +12 -0
- pluginify-1.0.0/docs/source/releases/1.0.0/obp-plugin-registry-updates.yaml +18 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/_version.py +2 -2
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/commandline_typer.py +4 -2
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/config.py +3 -1
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/create_plugin_registries.py +20 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/interfaces/__init__.py +5 -2
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/interfaces/base.py +2 -2
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/interfaces/class_based/data_modifiers.py +1 -1
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/interfaces/class_based_plugin.py +10 -6
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/plugin_registry.py +79 -12
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/plugins/classes/data_modifiers/cuboid.py +3 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/pydantic_models/v1/configs.py +3 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/utils/validators.py +3 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/pyproject.toml +19 -1
- {pluginify-0.1.0 → pluginify-1.0.0}/tests/conftest.py +13 -6
- {pluginify-0.1.0 → pluginify-1.0.0}/tests/unit_tests/config/test_config.py +3 -0
- pluginify-0.1.0/.github/workflows/lint-and-test.yaml +0 -119
- pluginify-0.1.0/.github/workflows/package-and-publish.yaml +0 -106
- pluginify-0.1.0/docs/source/releases/latest/initial-commit.yaml +0 -92
- {pluginify-0.1.0 → pluginify-1.0.0}/LICENSE +0 -0
- {pluginify-0.1.0/docs/source/releases/latest → pluginify-1.0.0/docs/source/releases/1.0.0}/ci-fix-perms.yaml +0 -0
- {pluginify-0.1.0/docs/source/releases/latest → pluginify-1.0.0/docs/source/releases/1.0.0}/copy-geoips-functionality.yaml +0 -0
- {pluginify-0.1.0/docs/source/releases/latest → pluginify-1.0.0/docs/source/releases/1.0.0}/pluginify-updates-jeremy-comments.yaml +0 -0
- {pluginify-0.1.0/docs/source/releases/latest → pluginify-1.0.0/docs/source/releases/1.0.0}/pypi-publish-bug-fix.yaml +0 -0
- {pluginify-0.1.0/docs/source/releases/latest → pluginify-1.0.0/docs/source/releases/1.0.0}/remove-all-geoips-references.yaml +0 -0
- {pluginify-0.1.0/docs/source/releases/latest → pluginify-1.0.0/docs/source/releases/1.0.0}/replace-geoips-functionality.yaml +0 -0
- {pluginify-0.1.0/docs/source/releases/latest → pluginify-1.0.0/docs/source/releases/1.0.0}/update-black-formatting.yaml +0 -0
- {pluginify-0.1.0/docs/source/releases/latest → pluginify-1.0.0/docs/source/releases/1.0.0}/version-update.yaml +0 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/__init__.py +0 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/errors.py +0 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/interfaces/yaml_based/configs.py +0 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/plugins/yaml/configs/stucco.yaml +0 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/utils/__init__.py +0 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/pluginify/utils/context_managers.py +0 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/tests/unit_tests/plugin_registries/files/bad/invalid_interfaces.yaml +0 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/tests/unit_tests/plugin_registries/files/bad/missing_lowest_keys.yaml +0 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/tests/unit_tests/plugin_registries/files/bad/missing_plugin_types.yaml +0 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/tests/unit_tests/plugin_registries/files/good/pluginify.yaml +0 -0
- {pluginify-0.1.0 → pluginify-1.0.0}/tests/unit_tests/plugin_registries/test_plugin_registries.py +0 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
name: CodeQuality
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
env:
|
|
17
|
+
UV_SYSTEM_PYTHON: true
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
lint:
|
|
21
|
+
continue-on-error: true
|
|
22
|
+
runs-on: ${{ vars.RUNNER }}
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
25
|
+
|
|
26
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: "3.13"
|
|
29
|
+
|
|
30
|
+
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
|
|
31
|
+
with:
|
|
32
|
+
go-version: stable
|
|
33
|
+
cache: false
|
|
34
|
+
|
|
35
|
+
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
|
|
36
|
+
|
|
37
|
+
- name: Install linters
|
|
38
|
+
run: |
|
|
39
|
+
uv pip install ruff blacken-docs mdformat validate-pyproject
|
|
40
|
+
go install github.com/rhysd/actionlint/cmd/actionlint@latest
|
|
41
|
+
go install github.com/google/yamlfmt/cmd/yamlfmt@latest
|
|
42
|
+
echo "$HOME/go/bin" >> "$GITHUB_PATH"
|
|
43
|
+
|
|
44
|
+
- name: Ruff (lint)
|
|
45
|
+
run: ruff check ./pluginify
|
|
46
|
+
|
|
47
|
+
- name: Ruff (format)
|
|
48
|
+
if: success() || failure()
|
|
49
|
+
run: ruff format --check ./pluginify
|
|
50
|
+
|
|
51
|
+
- name: Blacken-docs
|
|
52
|
+
if: success() || failure()
|
|
53
|
+
run: git ls-files '*.rst' '*.md' | xargs -r blacken-docs --check
|
|
54
|
+
|
|
55
|
+
- name: mdformat
|
|
56
|
+
if: success() || failure()
|
|
57
|
+
run: mdformat --check .
|
|
58
|
+
|
|
59
|
+
- name: actionlint
|
|
60
|
+
if: success() || failure()
|
|
61
|
+
run: actionlint
|
|
62
|
+
|
|
63
|
+
- name: validate-pyproject
|
|
64
|
+
if: success() || failure()
|
|
65
|
+
run: validate-pyproject pyproject.toml
|
|
66
|
+
|
|
67
|
+
- name: yamlfmt
|
|
68
|
+
if: success() || failure()
|
|
69
|
+
run: yamlfmt -lint
|
|
70
|
+
|
|
71
|
+
mypy:
|
|
72
|
+
continue-on-error: true
|
|
73
|
+
runs-on: ${{ vars.RUNNER }}
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
76
|
+
|
|
77
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
78
|
+
with:
|
|
79
|
+
python-version: "3.13"
|
|
80
|
+
|
|
81
|
+
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
|
|
82
|
+
|
|
83
|
+
- name: Install package with all extras
|
|
84
|
+
run: uv pip install -e ".[doc,lint,test]" mypy
|
|
85
|
+
|
|
86
|
+
- name: Run mypy
|
|
87
|
+
run: mypy ./pluginify
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Deploy docs
|
|
2
|
+
|
|
3
|
+
# 1. Tag and Release - on merge of v*-version-release
|
|
4
|
+
# * Tag current version
|
|
5
|
+
# * Release just tagged version
|
|
6
|
+
# 2. Package and Publish - on published release (from #1)
|
|
7
|
+
# * Build wheel
|
|
8
|
+
# * Publish to pypi
|
|
9
|
+
# 3. Deploy docs - on published release (from #1)
|
|
10
|
+
# * pip install geoips
|
|
11
|
+
# * pip install plugin repo
|
|
12
|
+
# * build docs with geoips/docs/build_docs.sh
|
|
13
|
+
# * deploy docs with geoips/docs/deploy_pages.sh
|
|
14
|
+
|
|
15
|
+
on:
|
|
16
|
+
# Triggers the workflow on published release
|
|
17
|
+
release:
|
|
18
|
+
types:
|
|
19
|
+
- published
|
|
20
|
+
# Allows run of this workflow manually from the Actions tab
|
|
21
|
+
# Must be merged to default before it will be available to manually run.
|
|
22
|
+
workflow_dispatch:
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
deploy-docs:
|
|
26
|
+
name: Deploy docs
|
|
27
|
+
# You do not appear to be able to use variables in the "uses" field.
|
|
28
|
+
uses: NRLMMD-GEOIPS/geoips_ci/.github/workflows/reusable-deploy-docs.yaml@main
|
|
29
|
+
permissions:
|
|
30
|
+
contents: write
|
|
31
|
+
secrets:
|
|
32
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -17,46 +17,46 @@ env:
|
|
|
17
17
|
|
|
18
18
|
jobs:
|
|
19
19
|
check-commits:
|
|
20
|
-
runs-on:
|
|
20
|
+
runs-on: ${{ vars.RUNNER }}
|
|
21
21
|
outputs:
|
|
22
22
|
has_new_commits: ${{ steps.check.outputs.has_new_commits }}
|
|
23
23
|
steps:
|
|
24
|
-
- uses: actions/checkout@v4
|
|
24
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
25
25
|
with:
|
|
26
26
|
fetch-depth: 0
|
|
27
27
|
|
|
28
28
|
- name: Check for new commits in last 24 hours
|
|
29
29
|
id: check
|
|
30
30
|
run: |
|
|
31
|
-
COMMITS=$(git log --oneline --since="25 hours ago" --no-merges | grep -v "\[skip ci\]"
|
|
31
|
+
COMMITS=$(git log --oneline --since="25 hours ago" --no-merges | grep -c -v "\[skip ci\]")
|
|
32
32
|
if [ "$COMMITS" -gt 0 ]; then
|
|
33
|
-
echo "has_new_commits=true" >> $GITHUB_OUTPUT
|
|
33
|
+
echo "has_new_commits=true" >> "$GITHUB_OUTPUT"
|
|
34
34
|
echo "Found $COMMITS new commits in the last 25 hours"
|
|
35
35
|
else
|
|
36
|
-
echo "has_new_commits=false" >> $GITHUB_OUTPUT
|
|
36
|
+
echo "has_new_commits=false" >> "$GITHUB_OUTPUT"
|
|
37
37
|
echo "No new commits in the last 25 hours"
|
|
38
38
|
fi
|
|
39
39
|
|
|
40
40
|
generate-badges:
|
|
41
41
|
needs: check-commits
|
|
42
42
|
if: needs.check-commits.outputs.has_new_commits == 'true'
|
|
43
|
-
runs-on:
|
|
43
|
+
runs-on: ${{ vars.RUNNER }}
|
|
44
44
|
|
|
45
45
|
steps:
|
|
46
|
-
- uses: actions/checkout@v4
|
|
46
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
47
47
|
with:
|
|
48
48
|
fetch-depth: 0
|
|
49
49
|
|
|
50
|
-
- uses: actions/setup-python@v5
|
|
50
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
51
51
|
with:
|
|
52
52
|
python-version: "3.13"
|
|
53
53
|
|
|
54
|
-
- uses: astral-sh/setup-uv@v6
|
|
54
|
+
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
|
|
55
55
|
|
|
56
56
|
- name: Install dependencies
|
|
57
57
|
run: |
|
|
58
|
-
uv pip install -e .[doc,lint,test]
|
|
59
|
-
uv pip install pytest mypy ruff commitizen coverage genbadge[all]
|
|
58
|
+
uv pip install -e ".[doc,lint,test]"
|
|
59
|
+
uv pip install pytest mypy ruff commitizen coverage "genbadge[all]"
|
|
60
60
|
|
|
61
61
|
- name: Create directories
|
|
62
62
|
run: |
|
|
@@ -95,7 +95,7 @@ jobs:
|
|
|
95
95
|
- name: Run mypy
|
|
96
96
|
id: mypy
|
|
97
97
|
continue-on-error: true
|
|
98
|
-
run: mypy ./
|
|
98
|
+
run: mypy ./pluginify --junit-xml reports/mypy.xml || true
|
|
99
99
|
|
|
100
100
|
- name: Generate mypy badge
|
|
101
101
|
run: |
|
|
@@ -112,7 +112,7 @@ jobs:
|
|
|
112
112
|
- name: Run ruff
|
|
113
113
|
id: ruff
|
|
114
114
|
continue-on-error: true
|
|
115
|
-
run: ruff check ./
|
|
115
|
+
run: ruff check ./pluginify --output-format=junit -o reports/ruff.xml || true
|
|
116
116
|
|
|
117
117
|
- name: Generate ruff badge
|
|
118
118
|
run: |
|
|
@@ -155,31 +155,6 @@ jobs:
|
|
|
155
155
|
"
|
|
156
156
|
fi
|
|
157
157
|
|
|
158
|
-
- uses: actions/setup-node@v4
|
|
159
|
-
with:
|
|
160
|
-
node-version: "22"
|
|
161
|
-
|
|
162
|
-
- name: Run cspell
|
|
163
|
-
id: cspell
|
|
164
|
-
continue-on-error: true
|
|
165
|
-
run: npx cspell "./src/**/*" --no-progress
|
|
166
|
-
|
|
167
|
-
- name: Generate cspell badge
|
|
168
|
-
run: |
|
|
169
|
-
if [ "${{ steps.cspell.outcome }}" == "success" ]; then
|
|
170
|
-
python -c "
|
|
171
|
-
from genbadge import Badge
|
|
172
|
-
b = Badge(left_txt='cspell', right_txt='passing', color='brightgreen')
|
|
173
|
-
b.write_to('.github/badges/cspell-badge.svg', use_shields=False)
|
|
174
|
-
"
|
|
175
|
-
else
|
|
176
|
-
python -c "
|
|
177
|
-
from genbadge import Badge
|
|
178
|
-
b = Badge(left_txt='cspell', right_txt='failing', color='red')
|
|
179
|
-
b.write_to('.github/badges/cspell-badge.svg', use_shields=False)
|
|
180
|
-
"
|
|
181
|
-
fi
|
|
182
|
-
|
|
183
158
|
- name: Check commitizen
|
|
184
159
|
id: commitizen
|
|
185
160
|
continue-on-error: true
|
|
@@ -208,10 +183,10 @@ jobs:
|
|
|
208
183
|
run: |
|
|
209
184
|
git add .github/badges/*.svg
|
|
210
185
|
if git diff --cached --quiet; then
|
|
211
|
-
echo "has_changes=false" >> $GITHUB_OUTPUT
|
|
186
|
+
echo "has_changes=false" >> "$GITHUB_OUTPUT"
|
|
212
187
|
echo "No badge changes detected"
|
|
213
188
|
else
|
|
214
|
-
echo "has_changes=true" >> $GITHUB_OUTPUT
|
|
189
|
+
echo "has_changes=true" >> "$GITHUB_OUTPUT"
|
|
215
190
|
echo "Badge changes detected:"
|
|
216
191
|
git diff --cached --name-status .github/badges/
|
|
217
192
|
fi
|
|
@@ -226,15 +201,16 @@ jobs:
|
|
|
226
201
|
|
|
227
202
|
- name: Generate summary
|
|
228
203
|
run: |
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
204
|
+
{
|
|
205
|
+
echo "## Badge Generation Summary"
|
|
206
|
+
echo ""
|
|
207
|
+
echo "| Check | Status |"
|
|
208
|
+
echo "|-------|--------|"
|
|
209
|
+
echo "| Pytest & Coverage | ${{ steps.pytest.outcome }} |"
|
|
210
|
+
echo "| Mypy | ${{ steps.mypy.outcome }} |"
|
|
211
|
+
echo "| Ruff | ${{ steps.ruff.outcome }} |"
|
|
212
|
+
echo "| Install | ${{ steps.install.outcome }} |"
|
|
213
|
+
echo "| Commitizen | ${{ steps.commitizen.outcome }} |"
|
|
214
|
+
echo ""
|
|
215
|
+
echo "Badges committed: ${{ steps.badge_changes.outputs.has_changes }}"
|
|
216
|
+
} >> "$GITHUB_STEP_SUMMARY"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Package/publish
|
|
2
|
+
|
|
3
|
+
# 1. Tag and Release - on merge of v*-version-release
|
|
4
|
+
# * Tag current version
|
|
5
|
+
# * Release just tagged version
|
|
6
|
+
# 2. Package and Publish - on published release (from #1)
|
|
7
|
+
# * Build wheel
|
|
8
|
+
# * Publish to pypi
|
|
9
|
+
# 3. Deploy docs - on published release (from #1)
|
|
10
|
+
# * pip install geoips
|
|
11
|
+
# * pip install plugin repo
|
|
12
|
+
# * build docs with geoips/docs/build_docs.sh
|
|
13
|
+
# * deploy docs with geoips/docs/deploy_pages.sh
|
|
14
|
+
|
|
15
|
+
on:
|
|
16
|
+
# triggers the workflow on published release
|
|
17
|
+
release:
|
|
18
|
+
types:
|
|
19
|
+
- published
|
|
20
|
+
# allows run of this workflow manually from the actions tab
|
|
21
|
+
# must be merged to default before it will be available to manually run.
|
|
22
|
+
workflow_dispatch:
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
package-publish:
|
|
26
|
+
name: Package/publish
|
|
27
|
+
# You do not appear to be able to use variables in the "uses" field.
|
|
28
|
+
uses: NRLMMD-GEOIPS/geoips_ci/.github/workflows/reusable-package-and-publish.yaml@main
|
|
29
|
+
permissions:
|
|
30
|
+
contents: read
|
|
31
|
+
secrets:
|
|
32
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
33
|
+
pypi_user: ${{ secrets.PYPI_USER }}
|
|
34
|
+
pypi_password: ${{ secrets.PYPI_PASSWORD }}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Tag/release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# Triggers the workflow when pull request closed (either closed
|
|
5
|
+
# as non-planned, or actually approved and merged.)
|
|
6
|
+
pull_request:
|
|
7
|
+
types:
|
|
8
|
+
- closed
|
|
9
|
+
# You do not appear to be able to use variables in triggers
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
# Allows run of this workflow manually from the Actions tab
|
|
13
|
+
# Must be merged to default branch before it will be available
|
|
14
|
+
# to manually run.
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
tag-release:
|
|
19
|
+
name: Tag/release
|
|
20
|
+
# You do not appear to be able to use variables in the "uses" field.
|
|
21
|
+
uses: NRLMMD-GEOIPS/geoips_ci/.github/workflows/reusable-tag-and-release.yaml@main
|
|
22
|
+
# Only run this if the pull request was merged, not just closed.
|
|
23
|
+
if: github.event.pull_request.merged == true
|
|
24
|
+
permissions:
|
|
25
|
+
contents: write
|
|
26
|
+
secrets:
|
|
27
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pluginify
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Summary: Pluginify package
|
|
5
5
|
License: LICENSE
|
|
6
6
|
License-File: LICENSE
|
|
@@ -24,11 +24,12 @@ Requires-Dist: typer
|
|
|
24
24
|
Project-URL: Repository, https://github.com/NRLMMD-GEOIPS/pluginify
|
|
25
25
|
Description-Content-Type: text/markdown
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
```
|
|
28
|
+
# # # This source code is subject to the license referenced at
|
|
29
|
+
# # # https://github.com/NRLMMD-GEOIPS.
|
|
30
|
+
```
|
|
29
31
|
|
|
30
|
-
Pluginify
|
|
31
|
-
=========
|
|
32
|
+
# Pluginify
|
|
32
33
|
|
|
33
34
|
This repository contains everything necessary to fully register YAML and python classes
|
|
34
35
|
and/or modules as valid python plugin objects. A YAML-based plugin object essentially
|
|
@@ -43,21 +44,24 @@ PluginRegistry class. This package can and is used alongside other packages such
|
|
|
43
44
|
[GeoIPS](https://github.com/NRLMMD-GEOIPS/geoips) to handle their plugin-based
|
|
44
45
|
infrastructure.
|
|
45
46
|
|
|
46
|
-
Install pluginify package
|
|
47
|
-
|
|
47
|
+
## Install pluginify package
|
|
48
|
+
|
|
48
49
|
Current status:
|
|
50
|
+
|
|
49
51
|
```bash
|
|
50
52
|
git clone https://github.com/NRLMMD-GEOIPS/pluginify.git
|
|
51
53
|
# cd to pluginify's top level dir
|
|
52
54
|
pip install -e .
|
|
53
55
|
```
|
|
56
|
+
|
|
54
57
|
OR
|
|
58
|
+
|
|
55
59
|
```bash
|
|
56
60
|
pip install pluginify
|
|
57
61
|
```
|
|
58
62
|
|
|
59
|
-
Use pluginify
|
|
60
|
-
|
|
63
|
+
## Use pluginify
|
|
64
|
+
|
|
61
65
|
```bash
|
|
62
66
|
pluginify -h
|
|
63
67
|
# Top level commands without additional args
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
```
|
|
2
|
+
# # # This source code is subject to the license referenced at
|
|
3
|
+
# # # https://github.com/NRLMMD-GEOIPS.
|
|
4
|
+
```
|
|
3
5
|
|
|
4
|
-
Pluginify
|
|
5
|
-
=========
|
|
6
|
+
# Pluginify
|
|
6
7
|
|
|
7
8
|
This repository contains everything necessary to fully register YAML and python classes
|
|
8
9
|
and/or modules as valid python plugin objects. A YAML-based plugin object essentially
|
|
@@ -17,21 +18,24 @@ PluginRegistry class. This package can and is used alongside other packages such
|
|
|
17
18
|
[GeoIPS](https://github.com/NRLMMD-GEOIPS/geoips) to handle their plugin-based
|
|
18
19
|
infrastructure.
|
|
19
20
|
|
|
20
|
-
Install pluginify package
|
|
21
|
-
|
|
21
|
+
## Install pluginify package
|
|
22
|
+
|
|
22
23
|
Current status:
|
|
24
|
+
|
|
23
25
|
```bash
|
|
24
26
|
git clone https://github.com/NRLMMD-GEOIPS/pluginify.git
|
|
25
27
|
# cd to pluginify's top level dir
|
|
26
28
|
pip install -e .
|
|
27
29
|
```
|
|
30
|
+
|
|
28
31
|
OR
|
|
32
|
+
|
|
29
33
|
```bash
|
|
30
34
|
pip install pluginify
|
|
31
35
|
```
|
|
32
36
|
|
|
33
|
-
Use pluginify
|
|
34
|
-
|
|
37
|
+
## Use pluginify
|
|
38
|
+
|
|
35
39
|
```bash
|
|
36
40
|
pluginify -h
|
|
37
41
|
# Top level commands without additional args
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
documentation:
|
|
2
|
+
- title: Add release note for version 1.19.0
|
|
3
|
+
description: |
|
|
4
|
+
Release note on release branch to force tag/release, package/publish,
|
|
5
|
+
and deploy docs.
|
|
6
|
+
|
|
7
|
+
Additionally add any updated files from geoips_ci/sync
|
|
8
|
+
files:
|
|
9
|
+
added:
|
|
10
|
+
- docs/source/releases/latest/1.19.0-release-note.yaml
|
|
11
|
+
modified:
|
|
12
|
+
- geoips_ci/sync updated files
|
|
13
|
+
date:
|
|
14
|
+
start: 2026-06-05
|
|
15
|
+
finish: 2026-06-05
|
|
16
|
+
related-issue:
|
|
17
|
+
internal: geoips#1067 - 1.19.0 updates
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Release Process:
|
|
2
|
+
- title: Add 1.19.0 release note
|
|
3
|
+
description: |
|
|
4
|
+
Currently tagged internal version 1.18.2.
|
|
5
|
+
files:
|
|
6
|
+
added:
|
|
7
|
+
- docs/source/releases/1.19.0/1.19.0-internal-release.yaml
|
|
8
|
+
related-issue:
|
|
9
|
+
internal: pluginify#1067 - 1.19.0 updates*
|
|
10
|
+
date:
|
|
11
|
+
start: 2026-05-26
|
|
12
|
+
finish: 2026-05-26
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
continuous integration:
|
|
2
|
+
- title: 'Use vars.RUNNER for runners'
|
|
3
|
+
description: |
|
|
4
|
+
Ensure we are using standard vars.RUNNER for the new pluginify-specific workflows.
|
|
5
|
+
Eventually we will want to consolidate this CI with the standard actions in
|
|
6
|
+
geoips_ci, but for now at least use vars.RUNNER.
|
|
7
|
+
files:
|
|
8
|
+
added: []
|
|
9
|
+
modified:
|
|
10
|
+
- '.github/workflows/generate-badges.yaml'
|
|
11
|
+
- '.github/workflows/lint-and-test.yaml'
|
|
12
|
+
deleted: []
|
|
13
|
+
moved: []
|
|
14
|
+
date:
|
|
15
|
+
start: 2026-05-26
|
|
16
|
+
finish: 2026-05-26
|
|
17
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
enhancement:
|
|
2
|
+
- title: 'Omit dot files and directories from registry.'
|
|
3
|
+
description: |
|
|
4
|
+
Updated plugin registry code to ignore any instance of dot files or directories
|
|
5
|
+
from the plugin registry. This is a minor update to prevent .ipynb files and other
|
|
6
|
+
irrelevant files from sometimes leaking into the registry and causing problems
|
|
7
|
+
(such as duplicate keys).
|
|
8
|
+
files:
|
|
9
|
+
modified:
|
|
10
|
+
- pluginify/create_plugin_registries.py
|
|
11
|
+
related-issue:
|
|
12
|
+
number: null
|
|
13
|
+
repo_url: ''
|
|
14
|
+
date:
|
|
15
|
+
start: null
|
|
16
|
+
finish: null
|
|
17
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
bug fix:
|
|
2
|
+
- title: 'Fix bug where non-plugin modules are treated like plugins during registry initialization'
|
|
3
|
+
description: |
|
|
4
|
+
In GeoIPS 1342 we converted nearly all of the module-based plugins to true
|
|
5
|
+
class-based plugins. In doing so I discovered a bug where non-plugin modules living
|
|
6
|
+
in the geoips/plugins/classes/.../ directory caused errors when trying to build
|
|
7
|
+
the plugin registry. To fix this, I've added a check to see if a module has an
|
|
8
|
+
'interface' attribute set to None. If that condition is met, then just ignore the
|
|
9
|
+
module and continue to the next potential plugin.
|
|
10
|
+
files:
|
|
11
|
+
modified:
|
|
12
|
+
- pluginify/create_plugin_registries.py
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
enhancement:
|
|
2
|
+
- title: 'Migrate OBP "expand" functionality to pluginify.'
|
|
3
|
+
description: |
|
|
4
|
+
Direct copy over of changes made in a GeoIPS PR to the plugin_registry.py file.
|
|
5
|
+
|
|
6
|
+
Changes made added support for pluginify to dynamically 'expand' a workflow if a
|
|
7
|
+
product, product_default, or workflow was found within a workflow plugin. This is
|
|
8
|
+
only done if the '_expand' argument is set to True, which is done via the
|
|
9
|
+
'geoips expand <workflow_name>' command.
|
|
10
|
+
files:
|
|
11
|
+
modified:
|
|
12
|
+
- pluginify/plugin_registry.py
|
|
13
|
+
related-issue:
|
|
14
|
+
number: null
|
|
15
|
+
repo_url: ''
|
|
16
|
+
date:
|
|
17
|
+
start: null
|
|
18
|
+
finish: null
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# # # This source code is subject to the license referenced at
|
|
2
|
+
# # # https://github.com/NRLMMD-GEOIPS.
|
|
3
|
+
|
|
1
4
|
"""Commandline module for Pluginify.
|
|
2
5
|
|
|
3
6
|
Supports two main commands, `pluginify create` and `pluginify delete` as well as
|
|
@@ -140,7 +143,6 @@ class DocstringTyper(typer.Typer):
|
|
|
140
143
|
new_params = []
|
|
141
144
|
|
|
142
145
|
for name, param in sig.parameters.items():
|
|
143
|
-
|
|
144
146
|
default = param.default
|
|
145
147
|
help_text = param_help.get(name)
|
|
146
148
|
|
|
@@ -155,7 +157,7 @@ class DocstringTyper(typer.Typer):
|
|
|
155
157
|
|
|
156
158
|
# Optional arguments
|
|
157
159
|
short = f"-{name[0]}"
|
|
158
|
-
long = f"--{name.replace('_','-')}"
|
|
160
|
+
long = f"--{name.replace('_', '-')}"
|
|
159
161
|
|
|
160
162
|
option = typer.Option(default, short, long, help=help_text)
|
|
161
163
|
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# # # This source code is subject to the license referenced at
|
|
2
|
+
# # # https://github.com/NRLMMD-GEOIPS.
|
|
3
|
+
|
|
1
4
|
"""Module containing configuration variables needed for pluginify to run."""
|
|
2
5
|
|
|
3
6
|
|
|
@@ -58,7 +61,6 @@ def _env_to_variable(name, default):
|
|
|
58
61
|
env_val = getenv(name)
|
|
59
62
|
|
|
60
63
|
if env_val:
|
|
61
|
-
|
|
62
64
|
if name == "PLUGINIFY_REGISTRY_DIRECTORY":
|
|
63
65
|
return Path(env_val)
|
|
64
66
|
elif name == "PLUGINIFY_REBUILD_REGISTRIES":
|
|
@@ -27,6 +27,7 @@ from os.path import (
|
|
|
27
27
|
split,
|
|
28
28
|
splitext,
|
|
29
29
|
)
|
|
30
|
+
from pathlib import Path
|
|
30
31
|
import re
|
|
31
32
|
import warnings
|
|
32
33
|
|
|
@@ -481,6 +482,13 @@ def parse_plugin_paths(plugin_paths, package, package_dir, plugins, namespace):
|
|
|
481
482
|
for plugin_type in plugin_paths:
|
|
482
483
|
# Loop through each file of the current plugin type.
|
|
483
484
|
for filepath in plugin_paths[plugin_type]:
|
|
485
|
+
# If any 'part' of the full filepath starts with a '.' (dot) directory or
|
|
486
|
+
# file, do not use this filepath. Just continue to the next filepath
|
|
487
|
+
# provided. Resolving path to prevent false-positives on "." or ".."
|
|
488
|
+
# paths for relative paths as an edge case.
|
|
489
|
+
if any(part.startswith(".") for part in Path(filepath).resolve().parts):
|
|
490
|
+
continue
|
|
491
|
+
|
|
484
492
|
filepath = str(filepath)
|
|
485
493
|
# Path relative to the package directory
|
|
486
494
|
relpath = os_relpath(filepath, start=package_dir)
|
|
@@ -949,6 +957,18 @@ def add_class_plugin(package, relpath, plugins):
|
|
|
949
957
|
at relpath '{relpath}'\n"""
|
|
950
958
|
return error_message
|
|
951
959
|
|
|
960
|
+
# If interface is None, then legitimately skip the module.
|
|
961
|
+
# We want to skip this first, before we test anything else.
|
|
962
|
+
# If it is not a plugin, we don't care if there are other
|
|
963
|
+
# errors in it at this stage (ie, avoid unnecessary unrelated
|
|
964
|
+
# catastrophic failures)
|
|
965
|
+
if hasattr(module, "interface") and module.interface is None:
|
|
966
|
+
LOG.info(
|
|
967
|
+
f"Skipping module '{module_name}' from '{package}', "
|
|
968
|
+
"interface_name is 'None'"
|
|
969
|
+
)
|
|
970
|
+
return error_message
|
|
971
|
+
|
|
952
972
|
# We've encountered a truly 'class-based' plugin. I.e. we don't need to generate
|
|
953
973
|
# the plugin object from the module itself. Collect metadata from this plugin
|
|
954
974
|
# in a different fashion to what we've done previously.
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
# # # This source code is subject to the license referenced at
|
|
2
|
+
# # # https://github.com/NRLMMD-GEOIPS.
|
|
3
|
+
|
|
1
4
|
"""Initialization module for pluginify interfaces."""
|
|
2
5
|
|
|
3
|
-
from pluginify.interfaces.class_based.data_modifiers import data_modifiers
|
|
4
|
-
from pluginify.interfaces.yaml_based.configs import configs
|
|
6
|
+
from pluginify.interfaces.class_based.data_modifiers import data_modifiers # noqa: F401
|
|
7
|
+
from pluginify.interfaces.yaml_based.configs import configs # noqa: F401
|
|
5
8
|
|
|
6
9
|
class_based_interfaces = ["data_modifiers"]
|
|
7
10
|
yaml_based_interfaces = ["configs"]
|
|
@@ -35,7 +35,7 @@ class BaseInterface(abc.ABC):
|
|
|
35
35
|
import pluginify.plugin_registry as plugin_registry_module
|
|
36
36
|
|
|
37
37
|
name = "BaseInterface"
|
|
38
|
-
interface_type =
|
|
38
|
+
interface_type: str = "" # This is set by child classes
|
|
39
39
|
rebuild_registries = REBUILD_REGISTRIES
|
|
40
40
|
# Setting this attribute at the top level so it can be used by all methods.
|
|
41
41
|
# This can be overridden by setting them in child interface classes
|
|
@@ -375,7 +375,7 @@ class BaseClassInterface(BaseInterface):
|
|
|
375
375
|
|
|
376
376
|
interface_type = "class_based"
|
|
377
377
|
name = "BaseClassInterface"
|
|
378
|
-
required_args = {}
|
|
378
|
+
required_args: dict[str, list[str]] = {}
|
|
379
379
|
|
|
380
380
|
def __repr__(self):
|
|
381
381
|
"""Plugin interface repr method."""
|