Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major refactoring: Python 3 support, Bugfixes in PBS Plugin, etc. #318

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

sebinbash
Copy link
Collaborator

This is PR contains a major refactoring of qtop including multiple enhancements and bugfixes.

Changelog

  • Migrate to Python 3
  • Use argparse instead of optparse
  • Fix parsing of CPU cores in PBS plugin
  • Migrate to pyproject.toml
  • Add CI Pipeline
  • Use JSON output for PBS Plugin
  • Add full width output for piping into less

The issues fixed by these changes, including a description of the bug or feature are referenced in the commit messages.

Sebastian Schnorbus and others added 29 commits November 27, 2023 12:04
BREAKING CHANGE: python 2.x is no longer supported

- Modify print statements
- Change izip to zip, xrange to range, etc.
- Remove legacy implementations of OrderedDict, namedtuple and Counter

Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
…serializer (partly fixes #314)

Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
 #313)

- Move qtop.py in the qtop_py directory
- Move main routine into main() function
- Change scope of certain variables is main() to global
- Add cli.py script to be called from the qtop bash script

Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
…fixes #314)

- qstat: display '#' as a default symbol if there are more users than symbols
- pbs: update regex statements to account for truncated strings in qstat output
- pbs: update regex statement to account for job arrays in qstat output
- pbs: parse both Torque and PBS Pro style job ids
- pbs: add unit tests for _get_jobs_cores

Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
- use qstat -f -F json instead of qstat by default
- handle parsing of both output formats in extractor for backwards
  compatibility

Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
- use readline() instead of next()

Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
- use qstat -Q -f -F json instead of qstat -q
- handle parsing of both output formats in extractor for backwards
  compatibility

Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
- Added -l flag to display workernode matrix in full width.
  This allows the output to be piped into 'less -RS'

Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
…de (resolves #316)

- Allow lines to overflow with -l option for piping into a pager (e.g.
  less)

Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
)

Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Signed-off-by: Sebastian Schnorbus <sebastian.schnorbus@hpe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants