Skip to content

Commit

Permalink
Merge pull request #35 from flexiblepower/34-add-generic-parsing-logic
Browse files Browse the repository at this point in the history
34 add generic parsing logic
  • Loading branch information
lfse-slafleur authored Nov 3, 2023
2 parents 1365b3e + 2a32dba commit 9315d70
Show file tree
Hide file tree
Showing 58 changed files with 611 additions and 225 deletions.
58 changes: 57 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,64 @@ jobs:
# flag-name: ${{ matrix.platform }} - py${{ matrix.python }}
# parallel: true

lint:
needs: prepare
strategy:
matrix:
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11" # newest Python that is stable
platform:
- ubuntu-latest
# - macos-latest
# - windows-latest
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
id: setup-python
with:
python-version: ${{ matrix.python }}
- name: Retrieve pre-built distribution files
uses: actions/download-artifact@v3
with: {name: python-distribution-files, path: dist/}
- name: Run tests
run: >-
pipx run --python '${{ steps.setup-python.outputs.python-path }}'
tox -e lint --installpkg '${{ needs.prepare.outputs.wheel-distribution }}'
typecheck:
needs: prepare
strategy:
matrix:
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11" # newest Python that is stable
platform:
- ubuntu-latest
# - macos-latest
# - windows-latest
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
id: setup-python
with:
python-version: ${{ matrix.python }}
- name: Retrieve pre-built distribution files
uses: actions/download-artifact@v3
with: {name: python-distribution-files, path: dist/}
- name: Run tests
run: >-
pipx run --python '${{ steps.setup-python.outputs.python-path }}'
tox -e typecheck --installpkg '${{ needs.prepare.outputs.wheel-distribution }}'
finalize:
needs: test
needs: [test, lint, typecheck]
runs-on: ubuntu-latest
steps:
- run: echo "Finished checks"
Expand Down
16 changes: 16 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Main]
# Add files or directories matching the regular expressions patterns to the
# ignore-list. The regex matches against paths and can be in Posix or Windows
# format. Because '\\' represents the directory delimiter on Windows systems,
# it can't be used as an escape character.
ignore-paths=src/s2python/generated/

# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use, and will cap the count on Windows to
# avoid hangs.
jobs=1

disable=missing-class-docstring,missing-module-docstring,too-few-public-methods,missing-function-docstring

[Format]
max-line-length=120
2 changes: 1 addition & 1 deletion ci/lint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh

. .venv/bin/activate
python -m pylint --rcfile=pylintrc s2_analyzer_backend
pylint src/ tests/unit/
2 changes: 1 addition & 1 deletion ci/setup_dev_environment.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

python3.10 -m venv ./.venv/
python3.8 -m venv ./.venv/
. ./.venv/bin/activate
pip install pip-tools
141 changes: 76 additions & 65 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --extra=development --extra=docs --extra=testing --output-file=./dev-requirements.txt setup.cfg
#
alabaster==0.7.13
# via sphinx
argcomplete==3.1.1
argcomplete==3.1.2
# via datamodel-code-generator
astroid==2.15.6
astroid==3.0.1
# via pylint
attrs==23.1.0
# via jsonschema
babel==2.12.1
babel==2.13.1
# via sphinx
black==23.7.0
black==23.10.1
# via datamodel-code-generator
build==0.10.0
build==1.0.3
# via pip-tools
cachetools==5.3.1
cachetools==5.3.2
# via tox
certifi==2023.7.22
# via requests
Expand All @@ -28,19 +28,19 @@ chardet==5.2.0
# via
# prance
# tox
charset-normalizer==3.2.0
charset-normalizer==3.3.1
# via requests
click==8.1.7
# via
# black
# pip-tools
# s2-ws-json-python (setup.cfg)
# s2-python (setup.cfg)
colorama==0.4.6
# via tox
coverage[toml]==7.3.0
coverage[toml]==7.3.2
# via pytest-cov
datamodel-code-generator==0.21.4
# via s2-ws-json-python (setup.cfg)
datamodel-code-generator==0.22.1
# via s2-python (setup.cfg)
dill==0.3.7
# via pylint
distlib==0.3.7
Expand All @@ -52,24 +52,32 @@ docutils==0.18.1
# sphinx
# sphinx-rtd-theme
# sphinx-tabs
email-validator==2.0.0.post2
email-validator==2.1.0.post1
# via pydantic
exceptiongroup==1.1.3
# via pytest
filelock==3.12.2
filelock==3.13.0
# via
# tox
# virtualenv
genson==1.2.2
# via datamodel-code-generator
identify==2.5.27
identify==2.5.31
# via pre-commit
idna==3.4
# via
# email-validator
# requests
imagesize==1.4.1
# via sphinx
importlib-metadata==6.8.0
# via
# build
# sphinx
importlib-resources==5.13.0
# via
# jsonschema
# openapi-spec-validator
inflect==5.6.2
# via datamodel-code-generator
iniconfig==2.0.0
Expand All @@ -90,15 +98,13 @@ jsonschema==4.17.3
jsonschema-spec==0.1.6
# via openapi-spec-validator
lazy-object-proxy==1.9.0
# via
# astroid
# openapi-spec-validator
# via openapi-spec-validator
markupsafe==2.1.3
# via jinja2
mccabe==0.7.0
# via pylint
mypy==1.5.1
# via s2-ws-json-python (setup.cfg)
mypy==1.6.1
# via s2-python (setup.cfg)
mypy-extensions==1.0.0
# via
# black
Expand All @@ -109,7 +115,7 @@ openapi-schema-validator==0.4.4
# via openapi-spec-validator
openapi-spec-validator==0.5.7
# via datamodel-code-generator
packaging==23.1
packaging==23.2
# via
# black
# build
Expand All @@ -124,8 +130,10 @@ pathable==0.4.3
pathspec==0.11.2
# via black
pip-tools==7.3.0
# via s2-ws-json-python (setup.cfg)
platformdirs==3.10.0
# via s2-python (setup.cfg)
pkgutil-resolve-name==1.3.10
# via jsonschema
platformdirs==3.11.0
# via
# black
# pylint
Expand All @@ -137,41 +145,43 @@ pluggy==1.3.0
# tox
prance==23.6.21.0
# via datamodel-code-generator
pre-commit==3.3.3
# via s2-ws-json-python (setup.cfg)
pydantic[email]==1.10.7
pre-commit==3.5.0
# via s2-python (setup.cfg)
pydantic[email]==1.10.13
# via
# datamodel-code-generator
# s2-ws-json-python (setup.cfg)
# s2-python (setup.cfg)
pygments==2.16.1
# via
# sphinx
# sphinx-tabs
pylint==2.17.5
# via s2-ws-json-python (setup.cfg)
pyproject-api==1.5.4
pylint==3.0.2
# via s2-python (setup.cfg)
pyproject-api==1.6.1
# via tox
pyproject-hooks==1.0.0
# via build
pyrsistent==0.19.3
pyrsistent==0.20.0
# via jsonschema
pysnooper==1.2.0
# via datamodel-code-generator
pytest==7.4.0
pytest==7.4.3
# via
# pytest-cov
# pytest-timer
# s2-ws-json-python (setup.cfg)
# s2-python (setup.cfg)
pytest-cov==4.1.0
# via pytest-cover
pytest-cover==3.0.0
# via pytest-coverage
pytest-coverage==0.0
# via s2-ws-json-python (setup.cfg)
# via s2-python (setup.cfg)
pytest-timer==0.0.11
# via s2-ws-json-python (setup.cfg)
pytz==2023.3
# via s2-ws-json-python (setup.cfg)
# via s2-python (setup.cfg)
pytz==2023.3.post1
# via
# babel
# s2-python (setup.cfg)
pyyaml==6.0.1
# via
# jsonschema-spec
Expand All @@ -183,9 +193,9 @@ requests==2.31.0
# sphinx
rfc3339-validator==0.1.4
# via openapi-schema-validator
ruamel-yaml==0.17.32
ruamel-yaml==0.18.3
# via prance
ruamel-yaml-clib==0.2.7
ruamel-yaml-clib==0.2.8
# via ruamel-yaml
six==1.16.0
# via
Expand All @@ -194,43 +204,38 @@ six==1.16.0
# sphinxcontrib-httpdomain
snowballstemmer==2.2.0
# via sphinx
sphinx==7.2.4
sphinx==7.1.2
# via
# s2-ws-json-python (setup.cfg)
# s2-python (setup.cfg)
# sphinx-copybutton
# sphinx-fontawesome
# sphinx-rtd-theme
# sphinx-tabs
# sphinxcontrib-applehelp
# sphinxcontrib-devhelp
# sphinxcontrib-htmlhelp
# sphinxcontrib-httpdomain
# sphinxcontrib-jquery
# sphinxcontrib-qthelp
# sphinxcontrib-serializinghtml
sphinx-copybutton==0.5.2
# via s2-ws-json-python (setup.cfg)
# via s2-python (setup.cfg)
sphinx-fontawesome==0.0.6
# via s2-ws-json-python (setup.cfg)
# via s2-python (setup.cfg)
sphinx-rtd-theme==1.3.0
# via s2-ws-json-python (setup.cfg)
sphinx-tabs==3.4.1
# via s2-ws-json-python (setup.cfg)
sphinxcontrib-applehelp==1.0.7
# via s2-python (setup.cfg)
sphinx-tabs==3.4.4
# via s2-python (setup.cfg)
sphinxcontrib-applehelp==1.0.4
# via sphinx
sphinxcontrib-devhelp==1.0.5
sphinxcontrib-devhelp==1.0.2
# via sphinx
sphinxcontrib-htmlhelp==2.0.4
sphinxcontrib-htmlhelp==2.0.1
# via sphinx
sphinxcontrib-httpdomain==1.8.1
# via s2-ws-json-python (setup.cfg)
# via s2-python (setup.cfg)
sphinxcontrib-jquery==4.1
# via sphinx-rtd-theme
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.6
sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.9
sphinxcontrib-serializinghtml==1.1.5
# via sphinx
toml==0.10.2
# via datamodel-code-generator
Expand All @@ -248,23 +253,29 @@ tomli==2.0.1
# tox
tomlkit==0.12.1
# via pylint
tox==4.10.0
# via s2-ws-json-python (setup.cfg)
typing-extensions==4.7.1
tox==4.11.3
# via s2-python (setup.cfg)
types-pytz==2023.3.1.1
# via s2-python (setup.cfg)
typing-extensions==4.8.0
# via
# astroid
# black
# mypy
# pydantic
urllib3==2.0.4
# pylint
urllib3==2.0.7
# via requests
virtualenv==20.24.3
virtualenv==20.24.6
# via
# pre-commit
# tox
wheel==0.41.2
wheel==0.41.3
# via pip-tools
wrapt==1.15.0
# via astroid
zipp==3.17.0
# via
# importlib-metadata
# importlib-resources

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down
Loading

0 comments on commit 9315d70

Please sign in to comment.