Skip to content

Commit

Permalink
Remove lzma from docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vkresch committed Dec 13, 2023
1 parent a59b161 commit 8b5857b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
fail-fast: false
matrix:
runs-on: [ubuntu-latest]
python-version: ['3.8']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

name: "🐍 ${{ matrix.python-version }} • ${{ matrix.runs-on }}"
runs-on: ${{ matrix.runs-on }}
Expand Down
6 changes: 0 additions & 6 deletions doc/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ After the compilation you can find the binary in the ``dist`` directory. You can
./dist/osi_general_validator --help
Make sure to provide the path to the rules when validating trace files to avoid path errors:

.. code-block:: bash
python rules2yml.py # Parse and generate rules folder
./dist/osi_general_validator --rules rules data/small_test.txt.lzma
Setup for linux developers
----------------------------
Expand Down
15 changes: 7 additions & 8 deletions doc/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ After installation you can call the command ``osivalidator`` in your terminal wh
Set the buffer size to retrieve OSI messages from trace file. Set it to 0 if you do not want to use buffering at all.
To run the validation first you need an OSI trace file which consists of multiple OSI messages.
In the directory ``data`` of the repository we already provide an example trace file which is called ``small_test.txt.lzma`` (a `lzma <https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Markov_chain_algorithm>`_ compressed trace file with the ``$$__$$`` separator which can/should be converted into an ``*.osi`` file). For decompressing lzma compressed files on linux machines run ``lzma -d data/small_test.txt.lzma``.
Use the `txt2osi.py <https://github.com/OpenSimulationInterface/open-simulation-interface/blob/master/format/txt2osi.py>`_ of the OSI repo in the format directory to convert from ``*.txt`` to ``*.osi`` files or from ``*.txt.lzma`` to ``*.osi.lzma``). See usage below:
In the directory ``data`` of the repository we already provide an example trace file which is called ``small_test.txt``.
Use the `txt2osi.py <https://github.com/OpenSimulationInterface/open-simulation-interface/blob/master/format/txt2osi.py>`_ of the OSI repo in the format directory to convert from ``*.txt`` to ``*.osi`` files. See usage below:
.. code-block:: bash
Expand All @@ -52,28 +52,27 @@ Use the `txt2osi.py <https://github.com/OpenSimulationInterface/open-simulation-
Name of the type used to serialize data.
--output OUTPUT, -o OUTPUT
Output name of the file.
--compress, -c Compress the output to a lzma file.
To validate the trace files you simply call ``osivalidator`` and provide the path to the trace:
.. code-block:: bash
osivalidator --data data/small_test.osi.lzma
osivalidator --data data/small_test.txt.lzma
osivalidator --data data/small_test.osi
osivalidator --data data/small_test.txt
You can also validate the traces in parallel to increase the speed of the validation by providing ``-p`` flag:
.. code-block:: bash
osivalidator --data data/small_test.osi.lzma -p
osivalidator --data data/small_test.txt.lzma -p
osivalidator --data data/small_test.osi -p
osivalidator --data data/small_test.txt -p
To validate trace files with rules defined in the comments of ``*.proto`` files in the open-simulation-interface repository first you need to generate them and then specify them:
.. code-block:: bash
python rules2yml.py # Generates the rule directory
osivalidator -r rules data/small_test.txt.lzma -p
osivalidator -r rules data/small_test.txt -p
After successfully running the validation the following output is generated:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ tqdm
tabulate
ruamel.yaml
defusedxml
iso3166==2.1.1
protobuf==3.15.0
git+https://github.com/OpenSimulationInterface/open-simulation-interface.git@master#egg=open-simulation-interface

0 comments on commit 8b5857b

Please sign in to comment.