Skip to main content

No project description provided

Project description

OTLMOW-GUI

PyPI otlmow-gui-downloads Unittests PyPI - Python Version GitHub issues coverage

Summary

The main use case of the otlmow-gui is to provide a graphical user interface for the OTLMOW project. It is built using the PyQt6 framework and is compatible with Python 3.7 and higher. This will eventually replace the OTL wizard.

OTLMOW Project

This project aims to implement the Flemish data standard OTL (https://wegenenverkeer.data.vlaanderen.be/) in Python. It is split into different packages to reduce compatibility issues

Installation guide

NEEDS atleast python 3.13.2 to use the pyinstaller_script.py to create a .exe file

Currently, you need at least Python version 3.9 to use this library.

To install the OTL MOW project into your Python project, use pip to install it:

pip install otlmow_gui

To upgrade an existing installation use:

pip install otlmow_gui --upgrade

To run the OTL-wizard do the following:

python OTLWizard.py

We are working on a way to deploy this to the different operating systems. This is expected near the end of 2023.

Translations guide

  1. Install babel in a seperate python environment so it doesn't end up in the requirements.txt
    pip install babel

  2. Generate the locale\base.pot file from the strings in your python code by running using the seperate python environment:
    pybabel extract -F babel.cfg -o locale\base.pot .\Domain .\GUI .\Exceptions

  3. Update the locale\\<language_code>\LC_MESSAGES\message.po files to the new base.pot using the seperate python environment with:
    pybabel update -i .\locale\base.pot -d locale --no-fuzzy-matching

  4. Find your new_text_key in the locale\\<language_code>\LC_MESSAGES\message.po of each language and fill in the tranlation for that text in like:

    msgid "new_text_key"
    msgstr "The translation for this new key"
    

    if you don't know all the text_keys you added you can search for msgstr "" to find all msgids that have no translation yet

  5. Compile new translations into messages.mo files using the seperate python environment
    pybabel compile -d locale

exe and installer creation guide

  1. Make sure you have a python 3.13 environment with the requirements.txt installed set up
    NOTE: Keep using PyInstaller 6.10.0, newer version can get false positives on Windows Defender. Lookout for detections of Wacatac.B!ml, Wacatac.H!ml, Wacapew.C!ml these are false positives. They get detected only when you compile with newer versions and not when you compile with older versions of PyInstaller. If any user has a detection, it is most likely because of an outdated Windows Defender. Ask them to update Windows and/or Windows Defender.
  2. Run the pyinstaller_script.py in that environment This will make the OTL Wizard 2.exe in the LatestReleaseMulti folder
  3. Download and install Inno Setup Compiler
  4. In the LatestReleaseMulti/inno_setup_installer_setup_script.iss script replace all occurrences of:
    C:\Users\chris\PycharmProjects\OTLMOW-GUI
    with the absolute path to the root of your project
  5. Open LatestReleaseMulti/inno_setup_installer_setup_script.iss with Inno Setup Compiler and compile.
    This should create LatestReleaseMulti/OTL wizard 2 installer.exe

Custom logging implementation usage

This project has a custom logging class called OTLLogger.py, it is build on the standard logging library.
Instead of using logging.debug("message") you should use OTLLogger.logger.debug("message")

This custom logger can also display the time between 2 OTLLogger.logger.debug() calls by adding the same timing_ref to the extra argument in both log calls. Example:

OTLLogger.logger.debug(f"Execute OtlmowConverter.from_file_to_objects({file_path.name})", 
                            extra={"timing_ref": f"file_to_objects_{file_path.stem}"})

object_lists = list(OtlmowConverter.from_file_to_objects(file_path,**kwargs))

OTLLogger.logger.debug(f"Execute OtlmowConverter.from_file_to_objects({file_path.name}) ({len(object_lists)} objects)", 
                            extra={"timing_ref": f"file_to_objects_{file_path.stem}"})

The sleeping cat GIF link

https://giphy.com/gifs/xUA7aZtd2GIfzYDR5e

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

otlmow_gui-1.0rc5.tar.gz (920.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

otlmow_gui-1.0rc5-py3-none-any.whl (951.9 kB view details)

Uploaded Python 3

File details

Details for the file otlmow_gui-1.0rc5.tar.gz.

File metadata

  • Download URL: otlmow_gui-1.0rc5.tar.gz
  • Upload date:
  • Size: 920.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for otlmow_gui-1.0rc5.tar.gz
Algorithm Hash digest
SHA256 2aa89dbefa622e70d4b106989cde318f0e896bee458497bb5c32c9bdc7a6ae0e
MD5 9f36f469c765de106e5338a89534f153
BLAKE2b-256 c0fc34c650cf763c309ed3dafbe94516deed9eb0b91d9e3b0131021bef912632

See more details on using hashes here.

Provenance

The following attestation bundles were made for otlmow_gui-1.0rc5.tar.gz:

Publisher: release.yml on davidvlaminck/OTLMOW-GUI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file otlmow_gui-1.0rc5-py3-none-any.whl.

File metadata

  • Download URL: otlmow_gui-1.0rc5-py3-none-any.whl
  • Upload date:
  • Size: 951.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for otlmow_gui-1.0rc5-py3-none-any.whl
Algorithm Hash digest
SHA256 97331f25e332c4e3cb5204e8ebcf500d650acb45d50f7724daf24e681b742d25
MD5 919fc787166f1f45c93430514e59c398
BLAKE2b-256 58508ef9825ba5bc290783432461075c0240cbdf8a173e59b9a5e91b1a699b24

See more details on using hashes here.

Provenance

The following attestation bundles were made for otlmow_gui-1.0rc5-py3-none-any.whl:

Publisher: release.yml on davidvlaminck/OTLMOW-GUI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page