Metadata-Version: 2.4
Name: pli-slurm-tool
Version: 1.1.2
License: MIT License
        
        Copyright (c) 2024 Kilian Lieret
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: yagmail
Requires-Dist: pandas
Requires-Dist: tabulate
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Dynamic: license-file

# pli-slurm-tool

Script to monitor PLI partitions of the Princeton clusters

## Usage

Install the pipx package in your environment: e.g. `pip install pipx`.

```bash
# User-level quota checking for PLI-CP QoS
pipx run pli-slurm-tool cp-quota-check
```

## Admin usage

* Admin-level quota management for PLI-CP QoS `pipx run pli-slurm-tool cp-monitor-admin` (to be executed every ~30 mins)
* Admin-level usage stats for PLI-CP QoS `pipx run pli-slurm-tool cp-quota-report-admin`

Please add gmail username and app password to your system environment variables to enable email notifications to users:

```bash
export EmailUsername=XXX
export Password=XXX
```

## Development setup

```bash
pip install pre-commit
pre-commit install
pip install --editable .
```

In order to release a new version

1. Increment version in `src/plislurmtool/__init__.py` and push it as a commit
2. Use the github UI to create a new release (use tag `v<VERSION>`, e.g., `v1.0.0`)

Alternatively, here are the manual steps

1. Increment version as above
2. Add tag `git tag v1.0.0`
3. Push `git push && git push origin v1.0.0`
4. `rm -r dist/** && python -m build`
5. `pipx run twine check dist/**`
6. `pipx run twine upload dist/**`

Ask Kilian for API key
