env-module-manager 0.1.2__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.
- env_module_manager-0.1.2/.github/workflows/publish.yml +66 -0
- env_module_manager-0.1.2/.github/workflows/tag.yml +43 -0
- env_module_manager-0.1.2/.github/workflows/test.yml +76 -0
- env_module_manager-0.1.2/.gitignore +224 -0
- env_module_manager-0.1.2/.python-version +1 -0
- env_module_manager-0.1.2/.readthedocs.yaml +19 -0
- env_module_manager-0.1.2/AGENTS.md +54 -0
- env_module_manager-0.1.2/CONTRIBUTING.md +53 -0
- env_module_manager-0.1.2/LICENSE +21 -0
- env_module_manager-0.1.2/PKG-INFO +91 -0
- env_module_manager-0.1.2/README.md +59 -0
- env_module_manager-0.1.2/docs/configuration.md +47 -0
- env_module_manager-0.1.2/docs/development.md +36 -0
- env_module_manager-0.1.2/docs/environment-modules.md +26 -0
- env_module_manager-0.1.2/docs/index.md +49 -0
- env_module_manager-0.1.2/docs/installation.md +57 -0
- env_module_manager-0.1.2/docs/python-tools.md +84 -0
- env_module_manager-0.1.2/docs/reference.md +41 -0
- env_module_manager-0.1.2/docs/rust-tools.md +24 -0
- env_module_manager-0.1.2/docs/stylesheets/extra.css +85 -0
- env_module_manager-0.1.2/example.bash +11 -0
- env_module_manager-0.1.2/mkdocs.yml +56 -0
- env_module_manager-0.1.2/module_manager/__init__.py +3 -0
- env_module_manager-0.1.2/module_manager/cli.py +178 -0
- env_module_manager-0.1.2/module_manager/config.py +105 -0
- env_module_manager-0.1.2/module_manager/deploy.py +150 -0
- env_module_manager-0.1.2/module_manager/modulefile.py +72 -0
- env_module_manager-0.1.2/pyproject.toml +125 -0
- env_module_manager-0.1.2/tests/test_cli.py +148 -0
- env_module_manager-0.1.2/tests/test_config.py +53 -0
- env_module_manager-0.1.2/tests/test_modulefile.py +116 -0
- env_module_manager-0.1.2/uv.lock +1174 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
release:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Create GitHub Release
|
|
19
|
+
uses: softprops/action-gh-release@v2
|
|
20
|
+
with:
|
|
21
|
+
generate_release_notes: true
|
|
22
|
+
|
|
23
|
+
publish:
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
needs: release
|
|
26
|
+
if: needs.release.result == 'success'
|
|
27
|
+
environment: pypi
|
|
28
|
+
permissions:
|
|
29
|
+
contents: read
|
|
30
|
+
id-token: write
|
|
31
|
+
|
|
32
|
+
steps:
|
|
33
|
+
- name: Checkout repository
|
|
34
|
+
uses: actions/checkout@v4
|
|
35
|
+
|
|
36
|
+
- name: Set up Python
|
|
37
|
+
uses: astral-sh/setup-uv@v3
|
|
38
|
+
with:
|
|
39
|
+
python-version: "3.12"
|
|
40
|
+
|
|
41
|
+
- name: Sync dependencies
|
|
42
|
+
run: uv sync --group dev
|
|
43
|
+
|
|
44
|
+
- name: Build package
|
|
45
|
+
run: |
|
|
46
|
+
rm -rf dist/
|
|
47
|
+
uv build
|
|
48
|
+
uv run twine check dist/*
|
|
49
|
+
|
|
50
|
+
- name: Publish to PyPI
|
|
51
|
+
run: uv run twine upload --repository pypi dist/*
|
|
52
|
+
|
|
53
|
+
trigger-rtd:
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
needs: publish
|
|
56
|
+
if: needs.publish.result == 'success'
|
|
57
|
+
env:
|
|
58
|
+
READTHEDOCS_API_KEY: ${{ secrets.READTHEDOCS_API_KEY }}
|
|
59
|
+
|
|
60
|
+
steps:
|
|
61
|
+
- name: Trigger Read the Docs build
|
|
62
|
+
if: ${{ env.READTHEDOCS_API_KEY != '' }}
|
|
63
|
+
run: |
|
|
64
|
+
curl -X POST \
|
|
65
|
+
-H "Authorization: Token ${READTHEDOCS_API_KEY}" \
|
|
66
|
+
https://readthedocs.org/api/v3/projects/module-manager/versions/latest/builds/
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Tag
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
tag:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
env:
|
|
12
|
+
TAG_PAT: ${{ secrets.GH_PAT_PUSH }}
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
persist-credentials: false
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.12"
|
|
25
|
+
|
|
26
|
+
- name: Read version from pyproject.toml
|
|
27
|
+
id: read_version
|
|
28
|
+
run: |
|
|
29
|
+
VERSION=$(python -c "import pathlib; import tomllib; pyproject=pathlib.Path('pyproject.toml'); data=tomllib.loads(pyproject.read_text()); print(data['project']['version'])")
|
|
30
|
+
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
|
|
31
|
+
echo "Version read from pyproject.toml: $VERSION"
|
|
32
|
+
|
|
33
|
+
- name: Configure Git
|
|
34
|
+
run: |
|
|
35
|
+
git config user.name "GitHub Actions"
|
|
36
|
+
git config user.email "actions@github.com"
|
|
37
|
+
|
|
38
|
+
- name: Create and push tag
|
|
39
|
+
if: ${{ env.TAG_PAT != '' }}
|
|
40
|
+
run: |
|
|
41
|
+
git remote set-url origin "https://x-access-token:${TAG_PAT}@github.com/${GITHUB_REPOSITORY}.git"
|
|
42
|
+
git tag "v$VERSION"
|
|
43
|
+
git push origin "v$VERSION"
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# This workflow mirrors ejb90/gitconductor's test/build workflow shape.
|
|
2
|
+
|
|
3
|
+
name: Test
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches: ["**"]
|
|
8
|
+
pull_request:
|
|
9
|
+
branches: ["main"]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
env:
|
|
15
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
25
|
+
uses: astral-sh/setup-uv@v3
|
|
26
|
+
with:
|
|
27
|
+
python-version: ${{ matrix.python-version }}
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: uv sync --group dev
|
|
31
|
+
|
|
32
|
+
- name: Lint with ruff
|
|
33
|
+
run: uv run ruff check --diff
|
|
34
|
+
|
|
35
|
+
- name: Format with ruff
|
|
36
|
+
run: uv run ruff format --diff
|
|
37
|
+
|
|
38
|
+
- name: Test with pytest
|
|
39
|
+
run: uv run pytest --junitxml=junit.xml -o junit_family=legacy
|
|
40
|
+
|
|
41
|
+
- name: Upload coverage reports to Codecov
|
|
42
|
+
if: ${{ !cancelled() && env.CODECOV_TOKEN != '' }}
|
|
43
|
+
uses: codecov/codecov-action@v5
|
|
44
|
+
with:
|
|
45
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
46
|
+
|
|
47
|
+
- name: Upload test results to Codecov
|
|
48
|
+
if: ${{ !cancelled() && env.CODECOV_TOKEN != '' }}
|
|
49
|
+
uses: codecov/test-results-action@v1
|
|
50
|
+
with:
|
|
51
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
52
|
+
|
|
53
|
+
build:
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
strategy:
|
|
56
|
+
fail-fast: false
|
|
57
|
+
matrix:
|
|
58
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
59
|
+
|
|
60
|
+
steps:
|
|
61
|
+
- name: Check out repository
|
|
62
|
+
uses: actions/checkout@v4
|
|
63
|
+
|
|
64
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
65
|
+
uses: astral-sh/setup-uv@v3
|
|
66
|
+
with:
|
|
67
|
+
python-version: ${{ matrix.python-version }}
|
|
68
|
+
|
|
69
|
+
- name: Install dependencies
|
|
70
|
+
run: uv sync
|
|
71
|
+
|
|
72
|
+
- name: Build package
|
|
73
|
+
run: uv build
|
|
74
|
+
|
|
75
|
+
- name: Verify artifacts
|
|
76
|
+
run: ls -l dist/
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
junit.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py.cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
# Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# UV
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi
|
|
127
|
+
|
|
128
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
129
|
+
__pypackages__/
|
|
130
|
+
|
|
131
|
+
# Celery stuff
|
|
132
|
+
celerybeat-schedule
|
|
133
|
+
celerybeat.pid
|
|
134
|
+
|
|
135
|
+
# Redis
|
|
136
|
+
*.rdb
|
|
137
|
+
*.aof
|
|
138
|
+
*.pid
|
|
139
|
+
|
|
140
|
+
# RabbitMQ
|
|
141
|
+
mnesia/
|
|
142
|
+
rabbitmq/
|
|
143
|
+
rabbitmq-data/
|
|
144
|
+
|
|
145
|
+
# ActiveMQ
|
|
146
|
+
activemq-data/
|
|
147
|
+
|
|
148
|
+
# SageMath parsed files
|
|
149
|
+
*.sage.py
|
|
150
|
+
|
|
151
|
+
# Environments
|
|
152
|
+
.env
|
|
153
|
+
.envrc
|
|
154
|
+
.venv
|
|
155
|
+
env/
|
|
156
|
+
venv/
|
|
157
|
+
ENV/
|
|
158
|
+
env.bak/
|
|
159
|
+
venv.bak/
|
|
160
|
+
|
|
161
|
+
# Spyder project settings
|
|
162
|
+
.spyderproject
|
|
163
|
+
.spyproject
|
|
164
|
+
|
|
165
|
+
# Rope project settings
|
|
166
|
+
.ropeproject
|
|
167
|
+
|
|
168
|
+
# mkdocs documentation
|
|
169
|
+
/site
|
|
170
|
+
|
|
171
|
+
# mypy
|
|
172
|
+
.mypy_cache/
|
|
173
|
+
.dmypy.json
|
|
174
|
+
dmypy.json
|
|
175
|
+
|
|
176
|
+
# Pyre type checker
|
|
177
|
+
.pyre/
|
|
178
|
+
|
|
179
|
+
# pytype static type analyzer
|
|
180
|
+
.pytype/
|
|
181
|
+
|
|
182
|
+
# Cython debug symbols
|
|
183
|
+
cython_debug/
|
|
184
|
+
|
|
185
|
+
# PyCharm
|
|
186
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
187
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
188
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
189
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
190
|
+
# .idea/
|
|
191
|
+
|
|
192
|
+
# Abstra
|
|
193
|
+
# Abstra is an AI-powered process automation framework.
|
|
194
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
195
|
+
# Learn more at https://abstra.io/docs
|
|
196
|
+
.abstra/
|
|
197
|
+
|
|
198
|
+
# Visual Studio Code
|
|
199
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
200
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
201
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
202
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
203
|
+
# .vscode/
|
|
204
|
+
|
|
205
|
+
# Ruff stuff:
|
|
206
|
+
.ruff_cache/
|
|
207
|
+
|
|
208
|
+
# PyPI configuration file
|
|
209
|
+
.pypirc
|
|
210
|
+
|
|
211
|
+
# Marimo
|
|
212
|
+
marimo/_static/
|
|
213
|
+
marimo/_lsp/
|
|
214
|
+
__marimo__/
|
|
215
|
+
|
|
216
|
+
# Streamlit
|
|
217
|
+
.streamlit/secrets.toml
|
|
218
|
+
|
|
219
|
+
# Local
|
|
220
|
+
.gitconductor
|
|
221
|
+
|
|
222
|
+
# OS-generated files
|
|
223
|
+
.DS_Store
|
|
224
|
+
Thumbs.db
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Read the Docs configuration file.
|
|
2
|
+
# See https://docs.readthedocs.com/platform/stable/config-file/
|
|
3
|
+
|
|
4
|
+
version: 2
|
|
5
|
+
|
|
6
|
+
build:
|
|
7
|
+
os: ubuntu-24.04
|
|
8
|
+
tools:
|
|
9
|
+
python: "3.12"
|
|
10
|
+
|
|
11
|
+
mkdocs:
|
|
12
|
+
configuration: mkdocs.yml
|
|
13
|
+
|
|
14
|
+
python:
|
|
15
|
+
install:
|
|
16
|
+
- method: pip
|
|
17
|
+
path: .
|
|
18
|
+
extra_requirements:
|
|
19
|
+
- docs
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Agents
|
|
2
|
+
|
|
3
|
+
This file gives coding agents the local rules for working in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Shape
|
|
6
|
+
|
|
7
|
+
`gitconductor` is a Python CLI/library for managing nested GitLab groups and projects. The core package lives in `gitconductor/`, tests live in `tests/`, and the root `README.md` is also exposed to the package through `gitconductor/_data/README.md`.
|
|
8
|
+
|
|
9
|
+
Important modules:
|
|
10
|
+
|
|
11
|
+
* `gitconductor/cli.py`: top-level Click/Rich Click command group.
|
|
12
|
+
* `gitconductor/cli_git.py`: recursive git CLI commands.
|
|
13
|
+
* `gitconductor/cli_python.py`: recursive Python package CLI commands.
|
|
14
|
+
* `gitconductor/gitlab.py`: GitLab group/project models and recursive operations.
|
|
15
|
+
* `gitconductor/misc.py`: config loading and README helpers.
|
|
16
|
+
* `tests/conftest.py`: GitLab clone fixtures and directory-changing markers.
|
|
17
|
+
|
|
18
|
+
## Commands
|
|
19
|
+
|
|
20
|
+
Use these commands when validating changes:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
uv run pytest
|
|
24
|
+
uv run pytest -k test_name
|
|
25
|
+
uv run ruff check .
|
|
26
|
+
uv run ruff format .
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The test suite is configured with coverage and a 90 percent fail-under threshold. Full tests may need a valid `GITCONDUCTOR_GITLAB_API_KEY` and network access to GitLab.
|
|
30
|
+
|
|
31
|
+
## Coding Rules
|
|
32
|
+
|
|
33
|
+
* Preserve user changes. Do not revert unrelated dirty work.
|
|
34
|
+
* Use typed function signatures throughout tests and source code.
|
|
35
|
+
* Use Google-style docstrings for new or edited functions.
|
|
36
|
+
* Keep CLI wrappers thin; put recursive project behavior on `GitlabGroup` or `GitlabProject`.
|
|
37
|
+
* Prefer `pathlib.Path` over string path manipulation.
|
|
38
|
+
* Prefer structured subprocess calls such as `subprocess.run([...], capture_output=True, text=True)`.
|
|
39
|
+
* Keep edits scoped. Avoid opportunistic refactors while fixing a bug.
|
|
40
|
+
* Update `README.md` when changing user-facing CLI behavior.
|
|
41
|
+
|
|
42
|
+
## Test Fixtures
|
|
43
|
+
|
|
44
|
+
Tests use custom markers to choose the working directory:
|
|
45
|
+
|
|
46
|
+
* `tmp_path`: run from a temporary directory.
|
|
47
|
+
* `repo_path`: run from the cloned root repository.
|
|
48
|
+
* `fresh_repo_path`: copy the cloned repository and run from the fresh copy.
|
|
49
|
+
|
|
50
|
+
When adding tests, choose the narrowest marker that matches the behavior under test.
|
|
51
|
+
|
|
52
|
+
## Packaging Notes
|
|
53
|
+
|
|
54
|
+
Python package discovery treats a repository as a package when it contains `pyproject.toml` or `setup.py`. Recursive Python commands should work from the top-level group, a subgroup, or an individual project directory.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Contributions are welcome. This project uses `uv` for local development,
|
|
4
|
+
Ruff for linting/formatting, Pytest for tests, and MkDocs for documentation.
|
|
5
|
+
|
|
6
|
+
## Setup
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
uv sync --group dev
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Checks
|
|
13
|
+
|
|
14
|
+
Run the same core checks used by CI:
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
uv run ruff check .
|
|
18
|
+
uv run ruff format --check .
|
|
19
|
+
uv run pytest
|
|
20
|
+
uv build
|
|
21
|
+
uv run mkdocs build --strict
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Format code before opening a pull request:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
uv run ruff format .
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Documentation
|
|
31
|
+
|
|
32
|
+
Preview documentation locally:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
uv run mkdocs serve
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Then open:
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
http://127.0.0.1:8000
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Releases
|
|
45
|
+
|
|
46
|
+
Release tags use the project version from `pyproject.toml`:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
git tag v0.1.0
|
|
50
|
+
git push origin v0.1.0
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
GitHub Actions handles release publishing for matching `v*` tags.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ellis
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: env-module-manager
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Deploy Python and Rust CLI tools behind GNU environment modulefiles
|
|
5
|
+
Project-URL: Homepage, https://github.com/ejb90/module-manager
|
|
6
|
+
Project-URL: Documentation, https://module-manager.readthedocs.io/
|
|
7
|
+
Project-URL: Tests, https://app.codecov.io/gh/ejb90/module-manager
|
|
8
|
+
Project-URL: Repository, https://github.com/ejb90/module-manager
|
|
9
|
+
Author: ejb90
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: System Administrators
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: MacOS
|
|
17
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering
|
|
24
|
+
Classifier: Topic :: System :: Systems Administration
|
|
25
|
+
Classifier: Topic :: Utilities
|
|
26
|
+
Requires-Python: >=3.11
|
|
27
|
+
Requires-Dist: click>=8.1
|
|
28
|
+
Requires-Dist: rich-click>=1.8
|
|
29
|
+
Provides-Extra: docs
|
|
30
|
+
Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# module-manager
|
|
34
|
+
|
|
35
|
+

|
|
36
|
+
[](https://codecov.io/gh/ejb90/module-manager)
|
|
37
|
+
[](LICENSE)
|
|
38
|
+

|
|
39
|
+
[](https://module-manager.readthedocs.io/en/latest/?badge=latest)
|
|
40
|
+
[](https://pypi.org/project/env-module-manager/)
|
|
41
|
+
[](https://pypi.org/project/env-module-manager/)
|
|
42
|
+
|
|
43
|
+
`module-manager` deploys versioned Python and Rust CLI tools behind GNU
|
|
44
|
+
environment modulefiles for Linux/HPC systems.
|
|
45
|
+
|
|
46
|
+
It writes tools and modulefiles into predictable versioned locations:
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
/prod/tools/<name>/<version>/bin
|
|
50
|
+
/prod/modulefiles/<name>/<version>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Quick Start
|
|
54
|
+
|
|
55
|
+
Deploy a Python CLI with `uv tool install`:
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
module-manager deploy-python ruff 0.8.0 \
|
|
59
|
+
--package 'ruff==0.8.0' \
|
|
60
|
+
--prefix /prod/tools \
|
|
61
|
+
--module-root /prod/modulefiles \
|
|
62
|
+
--execute-install
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Deploy a Rust binary:
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
module-manager deploy-rust ripgrep 14.1.1 \
|
|
69
|
+
--binary ./target/release/rg \
|
|
70
|
+
--prefix /prod/tools \
|
|
71
|
+
--module-root /prod/modulefiles
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Use the generated module:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
module use /prod/modulefiles
|
|
78
|
+
module load ruff/0.8.0
|
|
79
|
+
ruff --version
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Documentation
|
|
83
|
+
|
|
84
|
+
Full documentation lives in `docs/` and can be served with MkDocs:
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
uv run mkdocs serve
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Start with `docs/index.md` for installation, configuration, Python tools, Rust
|
|
91
|
+
tools, and local development notes.
|