"FCS-QL (CLARIN-FCS Core 2.0 Query Language) Grammar and Parser"
Project description
FCS-QL for Python
- CLARIN-FCS Core 2.0 query language grammar and parser
- based on Github: clarin-eric/fcs-ql and Github: clarin-eric/fcs-simple-endpoint
- for more details visit: CLARIN FCS Technical Details
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
Release history Release notifications | RSS feed
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.1.tar.gz
(28.9 kB
view details)
Built Distribution
File details
Details for the file fcs-ql-parser-1.0.1.tar.gz
.
File metadata
- Download URL: fcs-ql-parser-1.0.1.tar.gz
- Upload date:
- Size: 28.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 912ba655d8de915330469cd476cda8a11ae6b07800fbc893c61446817b3eab72 |
|
MD5 | 67c72e69782829652a41502668335f6c |
|
BLAKE2b-256 | 0addab3973b8534f7761ef764b3867a7d910a2a8d391b20b16e89eb7446d6012 |
File details
Details for the file fcs_ql_parser-1.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: fcs_ql_parser-1.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 31.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c50385c6e5955f5424b21a69cdc83807fb82f5168431338aa4e2ac514423cb8 |
|
MD5 | bfeec104facffb236db1de2bf593bd00 |
|
BLAKE2b-256 | 0161355aed2249473b6b3d15767deb5346ea84ec02c8e53b0f6d0f12e7c8caf7 |