- Python 59%
- HTML 40.9%
|
|
||
|---|---|---|
| integration-tests | Added unit tests and integration tests | |
| src | csvcss example | |
| styles | csvcss example | |
| tests | Added unit tests and integration tests | |
| .gitignore | Added unit tests and integration tests | |
| .hgignore | Changeable vector backends. | |
| README.md | csvcss example | |
| requirements.txt | Require protobuf 3.21+ | |
Kothic Mapcss parser/processor tailored for Comaps use.
Dependencies:
- Python >= 3.8
Python dependencies:
pip3 install -r requirements.txt
Running unittests
To run all unittests execute next command from project root folder:
python3 -m unittest discover -s tests
this will search for all test*.py files within tests directory
and execute tests from those files.
Running integration tests
File integration-tests/full_drules_gen.py is intended to generate drules
files for all 6 themes from main Comaps repo. It could be used to understand
which parts of the project are actually used by Comaps repo.
Usage:
cd <comaps directory>
mkdir -p ../drulestest # create local test directory
python3 tools/kothic/integration-tests/full_drules_gen.py -d data o ../drulestest --txt
This command will run generation for styles - default light, default dark,
outdoors light, outdoors dark, vehicle light, vehicle dark and put *.bin
and *.txt files into '../drulestest' subfolder.
Test usage of Csvcss solution
The goal is to check than when re-writing styles using Csvcss, the result is absolutely the same
Step1: generate reference output
cd <comaps directory>
mkdir -p ../drulesref # create directory for reference results
python3 tools/kothic/integration-tests/full_drules_gen.py -d data -o ../drulesref --txt
Step2 : generate new result
make a backup copy of data/styles to data/styles-save
modify styles, using Csvcss solution
cd <comaps directory>
mkdir -p ../drulesnew # create directory for new results
python3 tools/kothic/integration-tests/full_drules_gen.py -d data -o ../drulesnew --txt
Step3 compare
diff ../drulesref/outdoors_light.txt ../drulesnew/outdoors_light.txt
do the same for other files