-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python module: Revised JSON structure and filters (#175)
* update toc rule to follow the pattern of other number markers * start working on to_dict_new to revise the JSON output structure * implement attribute, list, table and milestone handling in node_to_dict_new * fix id_query and ensure bookCode is added * include titles and poetry in JSON output * reduce inner nesting in JSON with a decorator fuction * handle footnotes and cross refs * implement filtering * remove old to_dict code * re-write the to_list function as per the new JSON * update syntax trees in test as per the change in toc rule * add linting for python module on gitactions * fix error in github action script * change the use of filter Enum in CLI * remove unused import
- Loading branch information
1 parent
895450f
commit 28e613a
Showing
8 changed files
with
465 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: check-linting | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: [push, pull_request ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains the linting for python module | ||
python-build-n-lint: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10.6' # Version range or exact version of a Python version to use, using SemVer's version range syntax | ||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified | ||
|
||
- name: Create Virtual Environment | ||
run: python -m venv ENV-dev | ||
|
||
- name: Use VENV | ||
run: source ENV-dev/bin/activate | ||
|
||
- name: install packages | ||
working-directory: ./python-usfm-parser | ||
run: pip install -r dev-requirements.txt | ||
|
||
- name: Run linter | ||
working-directory: ./python-usfm-parser | ||
run: pylint --extension-pkg-allow-list=lxml src/usfm_grammar/*.py |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.