Skip to content

Docs for input_utils. #96

Docs for input_utils.

Docs for input_utils. #96

Workflow file for this run

name: 'Run all tests'
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
run-tests:
runs-on: ubuntu-latest
name: run-tests
steps:
- name: checkout
uses: actions/checkout@v3
- name: install ANTLR4
run: |
sudo apt update
sudo apt install antlr4
- name: install dictionary
run: sudo apt install wamerican
- name: install python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: install deps
run: |
export ANTLR4_VERSION=$(antlr4 | head -1 | cut -d ' ' -f 6)
echo "ANTLR4: ${ANTLR4_VERSION}"
pip install --upgrade pip
pip install antlr4-python3-runtime==${ANTLR4_VERSION}
pip install bitstring
pip install cloudpickle
pip install holidays
pip install kazoo
pip install overrides
pip install pytz
pip install requests
- name: process dateparse_utils grammar
run: |
cd src/pyutils/datetimes
antlr4 -Dlanguage=Python3 ./dateparse_utils.g4
cd ../../..
- name: setup unscrambler
run: |
sudo touch /usr/share/dict/sparse_index
sudo chmod 666 /usr/share/dict/sparse_index
export PYTHONPATH="${PWD}/src"
echo "from pyutils.unscrambler import Unscrambler" > tmp.py
echo "Unscrambler.repopulate()" >> tmp.py
python3 tmp.py
rm -f tmp.py
- name: run all tests
run: |
export PYTHONPATH="${PWD}/src"
cd tests
./run_tests.py --unit --doctest --show_failures --keep_going