slurm-cli-api-proxy-client
Mimics SLURM commands, translating them into SLURM REST API calls
https://github.com/slurm-cli-api-proxy/slurm-cli-api-proxy-client
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.8%) to scientific vocabulary
Repository
Mimics SLURM commands, translating them into SLURM REST API calls
Basic Info
- Host: GitHub
- Owner: SLURM-CLI-API-Proxy
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://slurm-cli-api-proxy.github.io/SLURM-CLI-API-Proxy-client/
- Size: 1.73 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
- Releases: 0
Metadata Files
README.dev.md
slurm_api_cli_proxy developer documentation
If you're looking for user documentation, go here.
MOCK API https://app.swaggerhub.com/apis/hcadavid6/slurm-restapirw_jobs/0.0.37
Development install
```shell
Create a virtual environment, e.g. with
python -m venv env
activate virtual environment
source env/bin/activate
make sure to have a recent version of pip and setuptools
python -m pip install --upgrade pip setuptools
(from the project root directory)
install slurmapicli_proxy as an editable package
python -m pip install --no-cache-dir --editable .
install development dependencies
python -m pip install --no-cache-dir --editable .[dev]
install documentation dependencies only
python -m pip install --no-cache-dir --editable .[docs] ```
Afterwards check that the install directory is present in the PATH environment variable.
Running the tests
There are two ways to run tests.
The first way requires an activated virtual environment with the development tools installed:
shell
pytest -v
The second is to use tox, which can be installed separately (e.g. with pip install tox), i.e. not necessarily inside the virtual environment you use for installing slurm_api_cli_proxy, but then builds the necessary virtual environments itself by simply running:
shell
tox
Testing with tox allows for keeping the testing environment separate from your development environment.
The development environment will typically accumulate (old) packages during development that interfere with testing; this problem is avoided by testing with tox.
Test coverage
In addition to just running the tests to see if they pass, they can be used for coverage statistics, i.e. to determine how much of the package's code is actually executed during tests. In an activated virtual environment with the development tools installed, inside the package directory, run:
shell
coverage run
This runs tests and stores the result in a .coverage file.
To see the results on the command line, run
shell
coverage report
coverage can also generate output in HTML and other formats; see coverage help for more information.## Running linters locally
For linting and sorting imports we will use ruff. Running the linters requires an activated virtual environment with the development tools installed.
```shell
linter
ruff check .
linter with automatic fixing
ruff check . --fix ```
To fix readability of your code style you can use yapf.## Generating the API docs
shell
cd docs
make html
The documentation will be in docs/_build/html
If you do not have make use
shell
sphinx-build -b html docs docs/_build/html
To find undocumented Python objects run
shell
cd docs
make coverage
cat _build/coverage/python.txt
To test snippets in documentation run
shell
cd docs
make doctest
Versioning
Bumping the version across all files is done with bump-my-version, e.g.
shell
bump-my-version bump major # bumps from e.g. 0.3.2 to 1.0.0
bump-my-version bump minor # bumps from e.g. 0.3.2 to 0.4.0
bump-my-version bump patch # bumps from e.g. 0.3.2 to 0.3.3
Making a release
This section describes how to make a release in 3 parts:
- preparation
- making a release on PyPI
- making a release on GitHub
(1/3) Preparation
- Verify that the information in
CITATION.cffis correct. - Make sure the version has been updated.
- Run the unit tests with
pytest -v
(2/3) PyPI
In a new terminal:
```shell
OPTIONAL: prepare a new directory with fresh git clone to ensure the release
has the state of origin/main branch
cd $(mktemp -d slurmapicliproxy.XXXXXX) git clone git@github.com:hcadavid/slurmapicliproxy .
make sure to have a recent version of pip and the publishing dependencies
python -m pip install --upgrade pip python -m pip install .[publishing]
create the source distribution and the wheel
python -m build
upload to test pypi instance (requires credentials)
python -m twine upload --repository testpypi dist/* ```
Visit https://test.pypi.org/project/slurmapicli_proxy and verify that your package was uploaded successfully. Keep the terminal open, we'll need it later.
In a new terminal, without an activated virtual environment or an env directory:
```shell cd $(mktemp -d slurmapicli_proxy-test.XXXXXX)
prepare a clean virtual environment and activate it
python -m venv env source env/bin/activate
make sure to have a recent version of pip and setuptools
python -m pip install --upgrade pip
install from test pypi instance:
python -m pip -v install --no-cache-dir \ --index-url https://test.pypi.org/simple/ \ --extra-index-url https://pypi.org/simple slurmapicli_proxy ```
Check that the package works as it should when installed from pypitest.
Then upload to pypi.org with:
```shell
Back to the first terminal,
FINAL STEP: upload to PyPI (requires credentials)
python -m twine upload dist/* ```
(3/3) GitHub
Don't forget to also make a release on GitHub.GitHub-Zenodo integration will also trigger Zenodo into making a snapshot of your repository and sticking a DOI on it.
Owner
- Name: SLURM CLI-API Proxy
- Login: SLURM-CLI-API-Proxy
- Kind: organization
- Location: Netherlands
- Website: https://research-software-directory.org/projects/slurm-oss
- Repositories: 1
- Profile: https://github.com/SLURM-CLI-API-Proxy
Citation (CITATION.cff)
# YAML 1.2
---
cff-version: "1.2.0"
title: "slurm_api_cli_proxy"
authors:
- family-names: Cadavid
given-names: Héctor
orcid: "https://orcid.org/0000-0003-4965-4243"
date-released: 2024-11-15
version: "0.1.0"
repository-code: "https://github.com/SLURM-CLI-API-Proxy/SLURM-CLI-API-Proxy-client"
keywords:
- "slurm"
- "cli"
message: "If you use this software, please cite it using these metadata."
GitHub Events
Total
- Issues event: 9
- Delete event: 21
- Member event: 1
- Issue comment event: 9
- Push event: 87
- Public event: 1
- Pull request event: 40
- Create event: 24
Last Year
- Issues event: 9
- Delete event: 21
- Member event: 1
- Issue comment event: 9
- Push event: 87
- Public event: 1
- Pull request event: 40
- Create event: 24
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 7
- Total pull requests: 17
- Average time to close issues: 3 months
- Average time to close pull requests: 9 days
- Total issue authors: 2
- Total pull request authors: 3
- Average comments per issue: 0.0
- Average comments per pull request: 0.29
- Merged pull requests: 12
- Bot issues: 2
- Bot pull requests: 1
Past Year
- Issues: 7
- Pull requests: 17
- Average time to close issues: 3 months
- Average time to close pull requests: 9 days
- Issue authors: 2
- Pull request authors: 3
- Average comments per issue: 0.0
- Average comments per pull request: 0.29
- Merged pull requests: 12
- Bot issues: 2
- Bot pull requests: 1
Top Authors
Issue Authors
- hcadavid (4)
- github-actions[bot] (2)
Pull Request Authors
- hcadavid (15)
- github-actions[bot] (1)
- carstenschelp-surf (1)