Skip to main content

ilivalidator

Python package for ilivalidator.

Ilivalidator is compiled to a native shared library with GraalVM. This Python package calls the native shared library.

The native shared libs are built with Github Actions and thus are available for macOS, Ubuntu and Windows (all OS are x86_64).

Installation

pip install ilivalidator

Run

from ilivalidator import Ilivalidator

valid = Ilivalidator.validate(['path/to/foo.xtf'])
print("The file is valid: {}".format(valid))

Options are set with a dictionary:

from ilivalidator import Ilivalidator

settings = {Ilivalidator.SETTING_ALL_OBJECTS_ACCESSIBLE: True}
valid = Ilivalidator.validate(["file1.xtf","file2.xtf"], settings)

Supported options:

Python package Ilivalidator
SETTING_ILIDIRS --modeldir
SETTING_MODELNAMES --models
SETTING_ALL_OBJECTS_ACCESSIBLE --allObjectsAccessible
SETTING_LOGFILE --log
SETTING_LOGFILE_TIMESTAMP --logtime
SETTING_XTFLOG --xtflog
trace --trace

You have to use True/False for options without arguments, e.g. SETTING_ALL_OBJECTS_ACCESSIBLE.

Develop

Requirements

On Ubuntu 22.04:

sudo apt update
sudo apt install python3-pip
sudo apt install python3.10-venv
sudo apt-get install unzip zip
sudo apt-get install build-essential libz-dev zlib1g-dev

The latter two are needed for SDKMan and GraalVM Native Image.

Python setup

python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade setuptools wheel

Building

python3 setup.py sdist bdist_wheel
python3 setup.py sdist bdist_wheel --plat-name=manylinux2014_aarch64 
python3 setup.py sdist bdist_wheel --plat-name=manylinux2014_x86_64 

Install locally

pip install -e .
pip install -e .[test]

Running tests

pytest ilivalidator

Dev environment

You can use Multipass for using Ubuntu as Development environment:

multipass launch jammy --cpus 4 --disk 20G --memory 8G --name pylitools-dev
multipass mount $HOME/sources pylitools-dev:/home/ubuntu/sources
multipass shell pylitools-dev
multipass stop pylitools-dev

Install Java:

sudo apt-get update 
sudo apt-get install gcc zlib1g-dev build-essential zip unzip

curl -s "https://get.sdkman.io" | bash
source "/home/ubuntu/.sdkman/bin/sdkman-init.sh"
sdk i java 21-graalce

Compile shared lib:

./gradlew clean test nativeCompile

JAVA_HOME muss gesetzt sein. Notfalls einmal aus- und einloggen, wenn man in der gleichen Session Java installiert hat.

Todo

  • Tests: Wie kann die shared lib getestet werden?

Release files for ilivalidator 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ilivalidator 0.0.4
File Size Uploaded
ilivalidator-0.0.4.tar.gz 4.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for ilivalidator 0.0.4
File
ilivalidator-0.0.4-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
ilivalidator-0.0.4-py3-none-manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
ilivalidator-0.0.4-py3-none-manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
ilivalidator-0.0.4-py3-none-macosx_12_0_x86_64.whl Python 3 none macOS 12.0+ x86-64 Details

Total release size: 72.5 MB

Release files / ilivalidator-0.0.4.tar.gz

Download URL ilivalidator-0.0.4.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
044da5b832f0f72af60d0af9e3acd317c9db68116ecbbb90250a991c9f28707f
BLAKE2b-256 checksum
How to use checksums
e1b81c9b1ab17a974dc0af08531dfef77be99d28fa57edadf0bd26dfe752233f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / ilivalidator-0.0.4-py3-none-win_amd64.whl

Download URL ilivalidator-0.0.4-py3-none-win_amd64.whl
Size 18.3 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
d7236edec274f106aa0ce375a6de2c1fe0952145717a65d1080822aca1c55552
BLAKE2b-256 checksum
How to use checksums
2750c33663e7498351ae5b23666aaf3c43e81646641bb7f7d95fc6557288b5e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / ilivalidator-0.0.4-py3-none-manylinux2014_x86_64.whl

Download URL ilivalidator-0.0.4-py3-none-manylinux2014_x86_64.whl
Size 18.5 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
040752e1d8a6907bbcb923f4ed1dea8bafb0c50fc32d917023c9d4e2277c8c48
BLAKE2b-256 checksum
How to use checksums
f04d150254b9a6c5a52a29d43bb8dc6a9d16c93361e891a0b22cc4e123baf026
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / ilivalidator-0.0.4-py3-none-manylinux2014_aarch64.whl

Download URL ilivalidator-0.0.4-py3-none-manylinux2014_aarch64.whl
Size 17.7 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
f3f0586dd8ef6050662cc2f854d7907b16b55d7d58231782c5e7672d909459fa
BLAKE2b-256 checksum
How to use checksums
9f21a10d10c3c2d9f1c648fedc843ca6c7f174e9275e2845ea05db4ab15a4334
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / ilivalidator-0.0.4-py3-none-macosx_12_0_x86_64.whl

Download URL ilivalidator-0.0.4-py3-none-macosx_12_0_x86_64.whl
Size 18.1 MB
Tags Python 3 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
329ab01041f5d9d10d6d8d06fc48bd7e9bdbb9e3e81b9480290fc2bcc08cedc3
BLAKE2b-256 checksum
How to use checksums
02098a4dbf8d5305ae4101f948d0dd079f8adc9a612500effd2ad843318a0c35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.0.4 This release

5 release files

0.0.3

4 release files

0.0.2

4 release files

0.0.1

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page