From 3f899b787073fbfb2d6361ebc9e4278d66cd4fed Mon Sep 17 00:00:00 2001 From: Paul Stretenowich Date: Fri, 24 Jan 2025 16:25:52 -0500 Subject: [PATCH 1/5] Adding missing undelete and undeprecate --- pt_cli/cli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pt_cli/cli.py b/pt_cli/cli.py index 541268f..94deffd 100755 --- a/pt_cli/cli.py +++ b/pt_cli/cli.py @@ -22,7 +22,9 @@ GenPipes, Edit, Delete, + Undelete, Deprecate, + UnDeprecate, Curate ) @@ -163,7 +165,9 @@ def projects(parsed_local): Edit(connection_obj=connector_session, subparser=subparser) Delete(connection_obj=connector_session, subparser=subparser) + Undelete(connection_obj=connector_session, subparser=subparser) Deprecate(connection_obj=connector_session, subparser=subparser) + UnDeprecate(connection_obj=connector_session, subparser=subparser) Curate(connection_obj=connector_session, subparser=subparser) shtab.add_argument_to(parser, ["-s", "--print-completion"]) From d1327c68e7b365ddb33cc642f0397090f35ac7ca Mon Sep 17 00:00:00 2001 From: paulstretenowich <31796146+paulstretenowich@users.noreply.github.com> Date: Fri, 24 Jan 2025 21:27:47 +0000 Subject: [PATCH 2/5] [create-pull-request] automated change --- CHANGELOG.md | 7 +++++++ pt_cli/__version__.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dce2a8f..7f76c77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [2.1.2](https://github.com/c3g/project_tracking_cli/compare/2.1.1...2.1.2) + +- Adding missing undelete and undeprecate [`3f899b7`](https://github.com/c3g/project_tracking_cli/commit/3f899b787073fbfb2d6361ebc9e4278d66cd4fed) + #### [2.1.1](https://github.com/c3g/project_tracking_cli/compare/2.1.0...2.1.1) +> 12 November 2024 + +- [create-pull-request] automated change [`6c76cde`](https://github.com/c3g/project_tracking_cli/commit/6c76cdefa78f83a9cb4c6683ac04b0c9192d8e78) - Updating to a maintained release action as the previous one was not maintained anymore [`57622a1`](https://github.com/c3g/project_tracking_cli/commit/57622a12e0d5cb2dc2fc8a2daa1cd7a83fd2c899) #### [2.1.0](https://github.com/c3g/project_tracking_cli/compare/2.0...2.1.0) diff --git a/pt_cli/__version__.py b/pt_cli/__version__.py index 55fa725..f811561 100644 --- a/pt_cli/__version__.py +++ b/pt_cli/__version__.py @@ -1 +1 @@ -__version__ = '2.1.1' +__version__ = '2.1.2' From 31a0f18bfb3e0ead40caf0e2d7f7fe9cf0b7a89b Mon Sep 17 00:00:00 2001 From: Paul Stretenowich Date: Fri, 24 Jan 2025 16:51:56 -0500 Subject: [PATCH 3/5] Debug + adding linting to Actions --- .github/workflows/PyTest.yml | 29 +++++++++++++++++++++++++++++ pt_cli/cli.py | 4 ++-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/PyTest.yml diff --git a/.github/workflows/PyTest.yml b/.github/workflows/PyTest.yml new file mode 100644 index 0000000..591e51a --- /dev/null +++ b/.github/workflows/PyTest.yml @@ -0,0 +1,29 @@ +name: Run PyTest + +on: + pull_request: + types: [opened, synchronize, reopened] + branches: ['dev', 'main'] + push: + branches: ['main'] + +jobs: + test-and-lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up PDM + uses: pdm-project/setup-pdm@v4.1 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + pdm install -d -G testing + pdm add pytest flake8 + + - name: Lint with flake8 + run: | + pdm run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=.venv + pdm run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=.venv diff --git a/pt_cli/cli.py b/pt_cli/cli.py index 94deffd..f0667ef 100755 --- a/pt_cli/cli.py +++ b/pt_cli/cli.py @@ -22,7 +22,7 @@ GenPipes, Edit, Delete, - Undelete, + UnDelete, Deprecate, UnDeprecate, Curate @@ -165,7 +165,7 @@ def projects(parsed_local): Edit(connection_obj=connector_session, subparser=subparser) Delete(connection_obj=connector_session, subparser=subparser) - Undelete(connection_obj=connector_session, subparser=subparser) + UnDelete(connection_obj=connector_session, subparser=subparser) Deprecate(connection_obj=connector_session, subparser=subparser) UnDeprecate(connection_obj=connector_session, subparser=subparser) Curate(connection_obj=connector_session, subparser=subparser) From 071a8f807498cd91138e719b6759271ae3970419 Mon Sep 17 00:00:00 2001 From: paulstretenowich <31796146+paulstretenowich@users.noreply.github.com> Date: Fri, 24 Jan 2025 21:54:29 +0000 Subject: [PATCH 4/5] [create-pull-request] automated change --- CHANGELOG.md | 7 +++++++ pt_cli/__version__.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f76c77..54cf07a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [2.1.3](https://github.com/c3g/project_tracking_cli/compare/2.1.2...2.1.3) + +- Debug + adding linting to Actions [`31a0f18`](https://github.com/c3g/project_tracking_cli/commit/31a0f18bfb3e0ead40caf0e2d7f7fe9cf0b7a89b) + #### [2.1.2](https://github.com/c3g/project_tracking_cli/compare/2.1.1...2.1.2) +> 24 January 2025 + +- [create-pull-request] automated change [`d1327c6`](https://github.com/c3g/project_tracking_cli/commit/d1327c68e7b365ddb33cc642f0397090f35ac7ca) - Adding missing undelete and undeprecate [`3f899b7`](https://github.com/c3g/project_tracking_cli/commit/3f899b787073fbfb2d6361ebc9e4278d66cd4fed) #### [2.1.1](https://github.com/c3g/project_tracking_cli/compare/2.1.0...2.1.1) diff --git a/pt_cli/__version__.py b/pt_cli/__version__.py index f811561..2d31b1c 100644 --- a/pt_cli/__version__.py +++ b/pt_cli/__version__.py @@ -1 +1 @@ -__version__ = '2.1.2' +__version__ = '2.1.3' From 36ab35113cb1e04fcda516b89113f528e3ca5cfe Mon Sep 17 00:00:00 2001 From: Paul Stretenowich Date: Fri, 14 Feb 2025 16:43:29 -0500 Subject: [PATCH 5/5] Removing lxml and using html5lib to avoid BS4 failing with lxml on HPCs --- pt_cli/connect.py | 3 +-- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pt_cli/connect.py b/pt_cli/connect.py index f1406e6..3776cbd 100755 --- a/pt_cli/connect.py +++ b/pt_cli/connect.py @@ -10,7 +10,6 @@ import requests import bs4 -import lxml logger = logging.getLogger(__name__) @@ -128,7 +127,7 @@ def maybe_json(self, data): return loads except json.decoder.JSONDecodeError: if isinstance(data, str): - soup = bs4.BeautifulSoup(data, features="lxml") + soup = bs4.BeautifulSoup(data, features="html5lib") if soup.get_text().startswith("----------"): sys.stdout.write(soup.get_text()) elif soup.get_text().startswith("Welcome"): diff --git a/pyproject.toml b/pyproject.toml index 3f7f7fd..9c270ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ dependencies = [ "pyyaml>=6.0", "requests>=2.28", "beautifulsoup4>=4.12", - "lxml", + "html5lib", "shtab", ]