lab-env 0.0.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.
Files changed (56) hide show
  1. lab_env-0.0.2/.github/workflows/docs.yml +52 -0
  2. lab_env-0.0.2/.github/workflows/package.yml +41 -0
  3. lab_env-0.0.2/.github/workflows/publish.yml +99 -0
  4. lab_env-0.0.2/.github/workflows/test.yml +38 -0
  5. lab_env-0.0.2/.gitignore +223 -0
  6. lab_env-0.0.2/CITATION.cff +17 -0
  7. lab_env-0.0.2/CONTRIBUTING.md +58 -0
  8. lab_env-0.0.2/LICENSE +674 -0
  9. lab_env-0.0.2/Makefile +15 -0
  10. lab_env-0.0.2/PKG-INFO +115 -0
  11. lab_env-0.0.2/README.md +81 -0
  12. lab_env-0.0.2/docs/index.md +74 -0
  13. lab_env-0.0.2/docs/installation.md +56 -0
  14. lab_env-0.0.2/docs/reference/commands.md +63 -0
  15. lab_env-0.0.2/docs/user-guide/configuration.md +85 -0
  16. lab_env-0.0.2/docs/user-guide/getting-started.md +129 -0
  17. lab_env-0.0.2/mkdocs.yml +63 -0
  18. lab_env-0.0.2/pyproject.toml +69 -0
  19. lab_env-0.0.2/setup.cfg +4 -0
  20. lab_env-0.0.2/src/lab_env/__init__.py +10 -0
  21. lab_env-0.0.2/src/lab_env/cli/__init__.py +5 -0
  22. lab_env-0.0.2/src/lab_env/cli/app.py +90 -0
  23. lab_env-0.0.2/src/lab_env/cli/callbacks.py +15 -0
  24. lab_env-0.0.2/src/lab_env/cli/cmd_doctor.py +20 -0
  25. lab_env-0.0.2/src/lab_env/cli/cmd_hosts.py +27 -0
  26. lab_env-0.0.2/src/lab_env/cli/cmd_init.py +34 -0
  27. lab_env-0.0.2/src/lab_env/cli/cmd_remote.py +113 -0
  28. lab_env-0.0.2/src/lab_env/cli/cmd_shell.py +168 -0
  29. lab_env-0.0.2/src/lab_env/cli/context.py +13 -0
  30. lab_env-0.0.2/src/lab_env/config/__init__.py +15 -0
  31. lab_env-0.0.2/src/lab_env/config/classes.py +40 -0
  32. lab_env-0.0.2/src/lab_env/config/initialize.py +88 -0
  33. lab_env-0.0.2/src/lab_env/config/load.py +164 -0
  34. lab_env-0.0.2/src/lab_env/diagnostics.py +78 -0
  35. lab_env-0.0.2/src/lab_env/remote.py +128 -0
  36. lab_env-0.0.2/src/lab_env/shell/__init__.py +34 -0
  37. lab_env-0.0.2/src/lab_env/shell/aliases.py +53 -0
  38. lab_env-0.0.2/src/lab_env/shell/environment.py +122 -0
  39. lab_env-0.0.2/src/lab_env/shell/functions.py +34 -0
  40. lab_env-0.0.2/src/lab_env/shell/installation.py +131 -0
  41. lab_env-0.0.2/src/lab_env/shell/models.py +28 -0
  42. lab_env-0.0.2/src/lab_env/shell/paths.py +46 -0
  43. lab_env-0.0.2/src/lab_env/shell/rendering.py +99 -0
  44. lab_env-0.0.2/src/lab_env.egg-info/PKG-INFO +115 -0
  45. lab_env-0.0.2/src/lab_env.egg-info/SOURCES.txt +54 -0
  46. lab_env-0.0.2/src/lab_env.egg-info/dependency_links.txt +1 -0
  47. lab_env-0.0.2/src/lab_env.egg-info/entry_points.txt +2 -0
  48. lab_env-0.0.2/src/lab_env.egg-info/requires.txt +9 -0
  49. lab_env-0.0.2/src/lab_env.egg-info/scm_file_list.json +50 -0
  50. lab_env-0.0.2/src/lab_env.egg-info/scm_version.json +8 -0
  51. lab_env-0.0.2/src/lab_env.egg-info/top_level.txt +1 -0
  52. lab_env-0.0.2/tests/test_cli.py +145 -0
  53. lab_env-0.0.2/tests/test_config.py +114 -0
  54. lab_env-0.0.2/tests/test_environment.py +52 -0
  55. lab_env-0.0.2/tests/test_remote.py +99 -0
  56. lab_env-0.0.2/tests/test_shell.py +242 -0
@@ -0,0 +1,52 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+
10
+ permissions:
11
+ contents: read
12
+ pages: write
13
+ id-token: write
14
+
15
+ concurrency:
16
+ group: pages
17
+ cancel-in-progress: false
18
+
19
+ jobs:
20
+ build:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v6
24
+ with:
25
+ fetch-depth: 0
26
+
27
+ - uses: actions/setup-python@v6
28
+ with:
29
+ python-version: "3.11"
30
+
31
+ - name: Install documentation dependencies
32
+ run: python -m pip install -e ".[dev]"
33
+
34
+ - name: Build documentation
35
+ run: zensical build --strict
36
+
37
+ - name: Upload documentation
38
+ uses: actions/upload-pages-artifact@v5
39
+ with:
40
+ path: site
41
+
42
+ deploy:
43
+ if: github.ref == 'refs/heads/main'
44
+ needs: build
45
+ runs-on: ubuntu-latest
46
+ environment:
47
+ name: github-pages
48
+ url: ${{ steps.deployment.outputs.page_url }}
49
+ steps:
50
+ - name: Deploy to GitHub Pages
51
+ id: deployment
52
+ uses: actions/deploy-pages@v5
@@ -0,0 +1,41 @@
1
+ name: Package
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v6
15
+ with:
16
+ fetch-depth: 0
17
+
18
+ - uses: actions/setup-python@v6
19
+ with:
20
+ python-version: "3.11"
21
+
22
+ - name: Build distributions
23
+ run: |
24
+ python -m pip install build twine
25
+ python -m build
26
+ twine check dist/*
27
+
28
+ - name: Smoke-test wheel
29
+ run: |
30
+ python -m venv "${RUNNER_TEMP}/wheel-test"
31
+ "${RUNNER_TEMP}/wheel-test/bin/python" -m pip install dist/*.whl
32
+ cd "${RUNNER_TEMP}"
33
+ "${RUNNER_TEMP}/wheel-test/bin/lab" --version
34
+ "${RUNNER_TEMP}/wheel-test/bin/lab" --config "${RUNNER_TEMP}/config.toml" init
35
+ "${RUNNER_TEMP}/wheel-test/bin/lab" --config "${RUNNER_TEMP}/config.toml" hosts
36
+
37
+ - name: Upload distributions
38
+ uses: actions/upload-artifact@v7
39
+ with:
40
+ name: distributions
41
+ path: dist/
@@ -0,0 +1,99 @@
1
+ # GPL-3.0-or-later - see LICENSE
2
+ name: Publish to PyPI
3
+
4
+ on:
5
+ push:
6
+ tags:
7
+ - "v*"
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.11", "3.12", "3.13"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v6
18
+ with:
19
+ fetch-depth: 0
20
+
21
+ - name: Set up Python ${{ matrix.python-version }}
22
+ uses: actions/setup-python@v6
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+
26
+ - name: Install package
27
+ run: python -m pip install -e ".[dev]"
28
+
29
+ - name: Check style
30
+ run: |
31
+ ruff check .
32
+ ruff format --check .
33
+
34
+ - name: Run tests
35
+ run: pytest --cov=lab_env --cov-report=term-missing
36
+
37
+ build:
38
+ needs: test
39
+ runs-on: ubuntu-latest
40
+
41
+ steps:
42
+ - uses: actions/checkout@v6
43
+ with:
44
+ fetch-depth: 0
45
+
46
+ - name: Set up Python
47
+ uses: actions/setup-python@v6
48
+ with:
49
+ python-version: "3.11"
50
+
51
+ - name: Install build tools
52
+ run: python -m pip install build twine
53
+
54
+ - name: Build distributions
55
+ run: |
56
+ python -m build
57
+ twine check dist/*
58
+
59
+ - name: Upload distributions
60
+ uses: actions/upload-artifact@v7
61
+ with:
62
+ name: dist
63
+ path: dist/
64
+
65
+ publish:
66
+ needs: build
67
+ runs-on: ubuntu-latest
68
+ environment: pypi
69
+ permissions:
70
+ id-token: write
71
+
72
+ steps:
73
+ - name: Download distributions
74
+ uses: actions/download-artifact@v8
75
+ with:
76
+ name: dist
77
+ path: dist/
78
+
79
+ - name: Publish to PyPI
80
+ uses: pypa/gh-action-pypi-publish@release/v1
81
+
82
+ release:
83
+ needs: publish
84
+ runs-on: ubuntu-latest
85
+ permissions:
86
+ contents: write
87
+
88
+ steps:
89
+ - uses: actions/checkout@v6
90
+
91
+ - name: Create GitHub Release
92
+ run: |
93
+ if gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then
94
+ echo "Release ${{ github.ref_name }} already exists; skipping."
95
+ else
96
+ gh release create "${{ github.ref_name }}" --generate-notes
97
+ fi
98
+ env:
99
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,38 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ name: ${{ matrix.os }} / Python ${{ matrix.python-version }}
12
+ runs-on: ${{ matrix.os }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ os: [ubuntu-latest, macos-latest]
17
+ python-version: ["3.11", "3.12", "3.13"]
18
+
19
+ steps:
20
+ - uses: actions/checkout@v6
21
+ with:
22
+ fetch-depth: 0
23
+
24
+ - uses: actions/setup-python@v6
25
+ with:
26
+ python-version: ${{ matrix.python-version }}
27
+
28
+ - name: Install package
29
+ run: python -m pip install -e ".[dev]"
30
+
31
+ - name: Check style
32
+ if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
33
+ run: |
34
+ ruff check .
35
+ ruff format --check .
36
+
37
+ - name: Run tests
38
+ run: pytest --cov=lab_env --cov-report=term-missing
@@ -0,0 +1,223 @@
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
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ # Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ # poetry.lock
109
+ # poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ # pdm.lock
116
+ # pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ # pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # Redis
135
+ *.rdb
136
+ *.aof
137
+ *.pid
138
+
139
+ # RabbitMQ
140
+ mnesia/
141
+ rabbitmq/
142
+ rabbitmq-data/
143
+
144
+ # ActiveMQ
145
+ activemq-data/
146
+
147
+ # SageMath parsed files
148
+ *.sage.py
149
+
150
+ # Environments
151
+ .env
152
+ .envrc
153
+ .venv
154
+ env/
155
+ venv/
156
+ ENV/
157
+ env.bak/
158
+ venv.bak/
159
+
160
+ # Spyder project settings
161
+ .spyderproject
162
+ .spyproject
163
+
164
+ # Rope project settings
165
+ .ropeproject
166
+
167
+ # mkdocs documentation
168
+ /site
169
+
170
+ # mypy
171
+ .mypy_cache/
172
+ .dmypy.json
173
+ dmypy.json
174
+
175
+ # Pyre type checker
176
+ .pyre/
177
+
178
+ # pytype static type analyzer
179
+ .pytype/
180
+
181
+ # Cython debug symbols
182
+ cython_debug/
183
+
184
+ # PyCharm
185
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
186
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
187
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
188
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
189
+ # .idea/
190
+
191
+ # Abstra
192
+ # Abstra is an AI-powered process automation framework.
193
+ # Ignore directories containing user credentials, local state, and settings.
194
+ # Learn more at https://abstra.io/docs
195
+ .abstra/
196
+
197
+ # Visual Studio Code
198
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
200
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
201
+ # you could uncomment the following to ignore the entire vscode folder
202
+ # .vscode/
203
+ .vscode/
204
+ # Temporary file for partial code execution
205
+ tempCodeRunnerFile.py
206
+
207
+ # Ruff stuff:
208
+ .ruff_cache/
209
+
210
+ # PyPI configuration file
211
+ .pypirc
212
+
213
+ # Marimo
214
+ marimo/_static/
215
+ marimo/_lsp/
216
+ __marimo__/
217
+
218
+ # Streamlit
219
+ .streamlit/secrets.toml
220
+
221
+ sandbox/
222
+ *.bak
223
+ legacy/
@@ -0,0 +1,17 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite it as below."
3
+ title: "lab-env"
4
+ abstract: "Tools for consistent research computing environments"
5
+ type: software
6
+ authors:
7
+ - family-names: "Hader"
8
+ given-names: "Christoph"
9
+ affiliation: "University of Arizona"
10
+ repository-code: "https://github.com/uahypersonics/lab-env"
11
+ url: "https://uahypersonics.github.io/lab-env"
12
+ license: GPL-3.0-or-later
13
+ keywords:
14
+ - research computing
15
+ - high-performance computing
16
+ - environment configuration
17
+ - command-line interface
@@ -0,0 +1,58 @@
1
+ # Contributing to lab-env
2
+
3
+ Contributions to code and documentation are welcome. Keep changes focused and
4
+ avoid including credentials, private hostnames, account names, allocation IDs,
5
+ or other personal infrastructure details.
6
+
7
+ ## Development Setup
8
+
9
+ Clone the repository and install the package with development dependencies:
10
+
11
+ ```bash
12
+ git clone https://github.com/uahypersonics/lab-env.git
13
+ cd lab-env
14
+ python -m pip install -e ".[dev]"
15
+ ```
16
+
17
+ The supported baseline is Python 3.11. Continuous integration also tests Python
18
+ 3.12 and 3.13 on Linux and macOS.
19
+
20
+ ## Tests and Style
21
+
22
+ Run the same checks used by continuous integration:
23
+
24
+ ```bash
25
+ pytest
26
+ ruff check .
27
+ ruff format --check .
28
+ ```
29
+
30
+ Tests that exercise configuration or shell behavior must use temporary home and
31
+ configuration directories. Use fake client executables for connection tests.
32
+ Never alter real dotfiles, connect to real clusters, or transfer real data in an
33
+ automated test.
34
+
35
+ ## Documentation
36
+
37
+ Build or preview the Zensical documentation locally:
38
+
39
+ ```bash
40
+ zensical build --strict
41
+ zensical serve
42
+ ```
43
+
44
+ Documentation changes should clearly distinguish implemented features from
45
+ planned behavior.
46
+
47
+ Package artifacts are built and checked by GitHub Actions. Publishing is
48
+ performed only through the release workflow: pushing a `vX.Y.Z` tag runs the
49
+ test suite, builds and checks both distributions, publishes them through PyPI
50
+ Trusted Publishing, and creates a GitHub Release. The package version is
51
+ derived from the tag by `setuptools-scm`. Do not add PyPI credentials or a
52
+ personal `.pypirc` to the repository.
53
+
54
+ ## Pull Requests
55
+
56
+ Create a branch from `main`, include tests for behavioral changes, and open a
57
+ focused pull request. All contributions are made under the GNU General Public
58
+ License v3.0 or later.