semvec/pypi-packages huggingface dataset:
declarative-argparse 0.0.8
A simple wrapper around argparse to permit declarative construction and argument retrieval.
Requires Python: <4.0,>=3.10

# Declarative Argparse

This project introduces a wrapper argound the built-in `argparse` module that permits one to make a declarative parser for options.

[[_TOC_]]

## Example

```python
import argparse
from declarative_argparse import DeclarativeOptionParser
from declarative_argparse.options.int import IntDO
from declarative_argparse.options.str import StrDO
class DAPExample(DeclarativeOptionParser):
    def __init__(self) -> None:
        super().__init__(argp=argparse.ArgumentParser())
        self.x: IntDO = self.addInt('--x', '-x', description='X coordinate')
        self.y: IntDO = self.addInt('--y', '-y', description='Y coordinate')
        self.name: StrDO = self.addStr('--name', description='Change tile name').setNArgs('?')
        self.id: StrDO = self.addStr('id', description='specify tile ID')

# ...

args = DAPExample()
args.parseArguments(['--x=0', '-y', '1', 'abc1'])
assert args.x.get_value() == 0
assert args.y.get_value() == 1
assert args.name.get_value() is None
assert args.id.get_value() == 'abc1'
```

## License

MIT

Contributions are always welcome.
astjson 0.0.1
AST to JSON converter
Requires Python: >=3.8

# AST to JSON Converter

This Python module provides a utility function `ast_to_json` which takes a Python Abstract Syntax Tree (AST) and converts it to a dictionary. The dictionary can be serialized to JSON. This is useful for scenarios where you need to analyze or manipulate the Python Abstract Syntax tree in a 
programming language other than Python. I tried to make the implementation similar to `ast.dump` to preserve the structure of the abstract syntax trees.


## Installation

To install this module, simply clone the repository and import the function into your Python script:

```python
import ast
from typing import Any, Dict
import json
import astjson

with open("your_python_program.py") as f:
    program = f.read()
t = ast.parse(program)
print(json.dumps(astjson.ast_to_json(t), indent=2))
```
slurm-gui 0.8.2
GUI/TUI frontends to squeue, sbatch and srun using the fabulous textual TUI framework
Requires Python: >=3.8

# Slurm made easy with slurm-gui ! 

**GUI/TUI frontends to squeue, sbatch and srun using the fabulous textual TUI framework**

[![PyPI](https://img.shields.io/pypi/v/slurm-gui)](https://pypi.org/project/slurm-gui/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/slurm-gui)
[![GH Action PyPI](https://github.com/dirkpetersen/slurm-gui/actions/workflows/python-publish.yml/badge.svg)](https://github.com/dirkpetersen/slurm-gui/actions/workflows/python-publish.yml)
[![PyPI - License](https://img.shields.io/pypi/l/slurm-gui)](https://github.com/dirkpetersen/slurm-gui/blob/main/LICENSE)


Install with `python3 -m pip install slurm-gui` and then run `tsqueue` on a node with Slurm installed to get a list of slurm jobs (tsbatch and tsrun are coming...)

![image](https://github.com/dirkpetersen/slurm-gui/assets/1427719/d56d9b88-0ff4-49cf-a563-b21d4aa2d9e0)

use the mouse or keys to scroll up and down and hit enter to get more details (from squeue and sstat or sacct).

If a job is pending,  get a very detailed reason for it: 

![image](https://github.com/dirkpetersen/slurm-gui/assets/1427719/4889ec08-dee6-406d-b914-e8a79690d69c)

Get a long list of information. squeue info comes first but if you scroll down, you will get also all the info provided by sstat

if a job is running, it will offer you to cancel it plus an error message for jobs you cannot kill

![image](https://github.com/dirkpetersen/slurm-gui/assets/1427719/8c27c8c0-8a00-47e9-be9a-1346ff2cbab5)

and if you have selected one of your own jobs, you can scoll down and get lots of details, for example about the maximum memory consumption (MaxRSS) of your job:

![image](https://github.com/dirkpetersen/slurm-gui/assets/1427719/8037afd5-3a18-4adb-9f39-1578ff619ec8)