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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
595a0d7
feat!: migrate from python 2 to python 3, fix a few bugs (see https:/…
Sep 15, 2023
a8351e9
docs: rename LICENSE file
Sep 15, 2023
3c77679
refactor: migrate from optparse to argparse (resolves https://github.…
Sep 15, 2023
7358340
fix: change parsing of cpu cores in pbs plugin, allow empty queue in …
Sep 15, 2023
59aa6fb
ci: add github actions job for pytest
Sep 15, 2023
b5ea898
feat: migrate project metadata from setup.py to pyproject.toml (resol…
Sep 18, 2023
9484f4b
fix: a few bugs in job parser, set sensible defaults (fixes https://g…
Sep 19, 2023
24400f5
fix: a few bugs in PBS plugin, add some error handling (fixes https:/…
Sep 20, 2023
2b13c8c
fix: call python 3 in qtop shell script
Sep 21, 2023
de21fdc
fix: change scope of several variables to global
Sep 25, 2023
86b34ab
feat: modify PBS extractor to use qstat json output (closes https://g…
Sep 25, 2023
b63be88
fix: bug in pbs plugin
Sep 25, 2023
78660c7
feat: modify PBS extractor to use qstat -Q json output (resolves http…
Sep 26, 2023
c2c42db
fix: add document variable to global scope in qstat.py
Sep 26, 2023
fd6692f
feat: add timestamp to qstat logs by default
Sep 26, 2023
cb8a861
feat: mump qtop to version 0.9.20230926
Sep 26, 2023
5cfced3
fix: a bug in node filtering functionality
Sep 27, 2023
8a6aae0
feat: add option to display full output for pager
Sep 27, 2023
73edd02
feat: also display stopped queues with asterisk in queue summary
Sep 27, 2023
c4075f9
feat: also display full output for pager in non-transposed display mo…
Sep 28, 2023
3838227
feat: modify log message for worker node remapping
Sep 28, 2023
cfff4bc
fix: bug when using -rr/repoducible option
Oct 10, 2023
730ee53
ci: add GitHub Action to build python package from source (resolves h…
Oct 17, 2023
50950d8
docs: add copyright headers
Nov 9, 2023
01032f2
docs: bump version to 0.9.20231017
Nov 9, 2023
24d9041
docs: add copyright headers
Nov 10, 2023
82ba100
docs: bump version to 0.9.20231110
Nov 10, 2023
dd9cc33
Update CHANGELOG.rst
fgeorgatos Dec 4, 2023
ea6ae98
Merge pull request #319 from qtop/20231204FG-update-changelog
sebinbash Dec 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: build-qtop

on:
push:
branches:
- master
- 'releases/**'
pull_request:
branches:
- master

jobs:
build-project:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: pip install build twine
- run: pyproject-build
- uses: actions/upload-artifact@v3
with:
name: qtop-dist
path: dist/
14 changes: 14 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: pytest-qtop

on: push

jobs:
run-pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: pip install pytest
- run: python -m pytest
12 changes: 12 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@

0.9.20231110
------------
- Feature enhancement: Migrate to Python 3
- Removed: support for Python 2
- Feature enhancement: Use argparse instead of optparse
- Feature enhancement: Migrate to pyproject.toml
- Feature enhancement: Add CI Pipeline
- Feature enhancement: Use JSON output for PBS Plugin
- Bugfix: Fix parsing of CPU cores in PBS plugin
- Bugfix: Add full width output for piping into less

0.9.20161222
------------
- Bugfix: hotfix for ``tar_out`` issue #283, #284
Expand Down
File renamed without changes.
7 changes: 2 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ include CONTRIBUTING.rst
include helpfile.txt
include Makefile
include MANIFEST.in
include MIT-license.txt
include LICENSE
include qtopconf.yaml
include qtop.py
include qtop
include qtop_py/cli.py
include qtop_py/colormap.py
include qtop_py/constants.py
include qtop_py/contrib/func_tests.sh
Expand All @@ -28,10 +29,6 @@ include qtop_py/inputs/jobstatuses.sh
include qtop_py/inputs/jobsubmits.sh
include qtop_py/inputs/qtop-input.jdl
include qtop_py/inputs/qtop-input.sh
include qtop_py/legacy/counter.py
include qtop_py/legacy/__init__.py
include qtop_py/legacy/namedtuple.py
include qtop_py/legacy/ordereddict.py
include qtop_py/plugins/demo.py
include qtop_py/plugins/__init__.py
include qtop_py/plugins/oar.py
Expand Down
5 changes: 0 additions & 5 deletions Makefile

This file was deleted.

27 changes: 27 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "qtop"
dynamic = ["version"]
description = """
qtop: the fast text mode way to monitor your cluster's utilization and status;
the time has come to take back control of your cluster's scheduling business"""
readme = "README.rst"
authors = [
{ name="Sotiris Fragkiskos", email="sfranky@gmail.com"},
]
requires-python = ">=3"

[project.urls]
"Homepage" = "https://github.com/qtop/qtop"

[project.scripts]
qtop = "qtop_py.qtop:main"

[tool.setuptools.dynamic]
version = {attr = "qtop_py.__version__"}

[tool.setuptools]
packages = ["qtop_py"]
2 changes: 1 addition & 1 deletion qtop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

python -m qtop "$@"
python3 -m qtop_py.cli "$@"

2 changes: 1 addition & 1 deletion qtop_py/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.9.20161222"
__version__ = "0.9.20231110"
9 changes: 9 additions & 0 deletions qtop_py/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright 2023 Hewlett Packard Enterprise Development LP
# SPDX-License-Identifier: MIT

import re
import sys
from qtop_py.qtop import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
5 changes: 1 addition & 4 deletions qtop_py/colormap.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
try:
from collections import OrderedDict
except ImportError:
from qtop_py.legacy.ordereddict import OrderedDict
from collections import OrderedDict

# example color maps
# order should be from more generic-->more specific
Expand Down
Empty file removed qtop_py/legacy/__init__.py
Empty file.
198 changes: 0 additions & 198 deletions qtop_py/legacy/counter.py

This file was deleted.

Loading