Skip to main content

"FCS-QL (CLARIN-FCS Core 2.0 Query Language) Grammar and Parser"

Project description

FCS-QL for Python



fcs-ql-parser @ PyPI CI: Python package Documentation Status

Installation

# built package
python3 -m pip install dist/fcs_ql_parser-<version>-py2.py3-none-any.whl
# or
python3 -m pip install dist/fcs-ql-parser-<version>.tar.gz

# for local development
python3 -m pip install -e .

Building

Fetch (or update) grammar files:

git clone https://github.com/clarin-eric/fcs-ql.git
cp fcs-ql/src/main/antlr4/eu/clarin/sru/fcs/qlparser/*.g4 src/fcsql/

(Re-)Generate python parser code:

# create virtual env
python3 -m venv venv
source venv/bin/activate
pip install -U pip setuptools wheel

# install antler tool
python3 -m pip install antlr4-tools
# pip install -e .[antlr]

cd src/fcsql
antlr4 -Dlanguage=Python3 *.g4

Build package:

# pip install -e .[build]
python3 -m build

Development

  • Uses pytest (with coverage, clarity and randomly plugins).
python3 -m pip install -e .[test]

pytest

Run style checks:

# general style checks
python3 -m pip install -e .[style]

black --check .
flake8 . --show-source --statistics
isort --check --diff .
mypy src

# building the package and check metadata
python3 -m pip install -e .[build]

python3 -m build
twine check --strict dist/*

# build documentation and check links ...
python3 -m pip install -e .[docs]

sphinx-build -b html docs dist/docs
sphinx-build -b linkcheck docs dist/docs

Build documentation

python3 -m pip install -r ./docs/requirements.txt
# or 
python3 -m pip install -e .[docs]

sphinx-build -b html docs dist/docs
sphinx-build -b linkcheck docs dist/docs

See also

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fcs-ql-parser-1.0.0.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

fcs_ql_parser-1.0.0-py2.py3-none-any.whl (31.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file fcs-ql-parser-1.0.0.tar.gz.

File metadata

  • Download URL: fcs-ql-parser-1.0.0.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for fcs-ql-parser-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e7085fcc529effcb397852dd8a4d5996f9ef463b251600db3b2bbd88b65ffbde
MD5 f2e82a50ed9b8eff636be2ee70a4ec9a
BLAKE2b-256 67b67ff47d15f7e4bdd245a4118eab6202b59f56b40783cdbf744f004c735312

See more details on using hashes here.

File details

Details for the file fcs_ql_parser-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for fcs_ql_parser-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7cd121854bfcdd3b47777e688f8fdcd2a0a8414bd80c67f9a2197c7d35273e3e
MD5 4135d85fa35197dcb211df355bfaf263
BLAKE2b-256 cc76d96ef18e81a7a6126b18fabfd6156b40add446e10040ac33492b47779154

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page