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

Hot fix #34

Merged
merged 5 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
29 changes: 29 additions & 0 deletions .github/workflows/PyTest.yml
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,22 @@ 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)

> 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)
Expand Down
2 changes: 1 addition & 1 deletion pt_cli/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.1.1'
__version__ = '2.1.3'
4 changes: 4 additions & 0 deletions pt_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
GenPipes,
Edit,
Delete,
UnDelete,
Deprecate,
UnDeprecate,
Curate
)

Expand Down Expand Up @@ -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"])
Expand Down
3 changes: 1 addition & 2 deletions pt_cli/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import requests
import bs4
import lxml

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -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"):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies = [
"pyyaml>=6.0",
"requests>=2.28",
"beautifulsoup4>=4.12",
"lxml",
"html5lib",
"shtab",
]

Expand Down