Skip to content
New issue

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

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

Already on GitHub? # to your account

Add linting CI actions #193

Merged
merged 9 commits into from
Jun 29, 2023
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
6 changes: 6 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,9 @@ jobs:
run: poetry install --no-interaction
- name: Run tests
run: poetry run pytest
- uses: psf/black@stable
with:
options: "--check --verbose"
src: "./"
version: "23.3"
- uses: isort/isort-action@v1
9 changes: 5 additions & 4 deletions dumpout.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from mf2py import Parser
import os.path
import glob
import json
import os.path

from mf2py import Parser

allfiles = glob.glob(os.path.join('.', 'tests', 'tests', '**', '**', '*.json'))
allfiles = glob.glob(os.path.join(".", "tests", "tests", "**", "**", "*.json"))
for jsonfile in allfiles:
htmlfile = jsonfile[:-4] + 'html'
htmlfile = jsonfile[:-4] + "html"
with open(htmlfile) as f:
p = json.loads(Parser(doc=f).to_json(pretty_print=True))
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ beautifulsoup4 = "^4.11.1"
lxml = "^4.9.2"
mock = "^5.0.1"
pytest = "^7.2.1"
black = "^23.3.0"
isort = "^5.12.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down