Skip to content

Commit

Permalink
Merge pull request #193 from microformats/add-linting-ci-actions
Browse files Browse the repository at this point in the history
Add linting CI actions
  • Loading branch information
capjamesg authored Jun 29, 2023
2 parents a5a2516 + e1177e1 commit 901b742
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
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

0 comments on commit 901b742

Please sign in to comment.