Skip to content

Installation

Maurice edited this page Nov 10, 2022 · 18 revisions

Prerequisites

  • Python 3.9 or so, including pip
  • git
  • java
  • Saxon (java)

Required Python packages should mostly be installed by installer (during pip install, see below).

  • openpyxml (I will move code that requires this module to a separate module in the future)
  • PIL (I might move code that requires this module to a separate module in the future)
  • MpApi (not installed automatically at the moment, see https://github.com/mokko/MpApi.git)

Getting/updating Python package from Github using git

Only first time:

git clone https://github.com/mokko/zml2lido.git

This step creates a new dir called zml2lido. I call this dir script_dir. You will typically need to invoke the lido pipeline script in this directory.

N.B.: the package has three different directories called zml2lido. Take the highest one in the directory.

Updating files from zml2lido git

cd zml2lido # change to script_dir git pull

Install Python stuff (needs to be repeated with some more deeper updates) in script_dir:

pip install -e .

Install Saxon (java version) in dir of your choice and leave that dir in the configuration file only first time. I assume that java is in your path already.

Configuration file

create a directory zml2lido/sdata

mkdir sdata

The directory sdata is used to save lido files, also location for the config file.

Make a config file with the location of saxon on your system. Here is how my config file looks:

$script_dir/sdata/lido.conf:

saxLib = r"C:\m3\SaxonHE10-5J\saxon-he-10.5.jar"

Test lido pipeline script

lido -h

If there is a problem with the installation it reports an error; on success it shows something like this:

 C:\m3\zml2lido>lido -h
 usage: lido [-h] [-c] -i INPUT -j JOB [-f] [-v]

 Little LIDO toolchain

 optional arguments:
  -h, --help            show this help message and exit
  -c, --chunks          expect the input to be multiple precisely-named chunks
  -i INPUT, --input INPUT
                        zml input file
  -j JOB, --job JOB     pick job (e.g. smb or dd)
  -f, --force           force overwrite existing lido
  -v, --validate        validate lido