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.0rc3.tar.gz (170.0 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.0rc3-py3-none-any.whl (200.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: otlmow_gui-1.0rc3.tar.gz
  • Upload date:
  • Size: 170.0 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.0rc3.tar.gz
Algorithm Hash digest
SHA256 2dfb3dbbceb0bf4bb2a669c8a346685faf6cf77420a16148f4487f153ab558c2
MD5 13c1b6d6737642a070307df310dfc7e9
BLAKE2b-256 23e11b90ec998a0cd8fadf0ff230c2d1cb1ca6746c6e959049a462dad8168963

See more details on using hashes here.

Provenance

The following attestation bundles were made for otlmow_gui-1.0rc3.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.0rc3-py3-none-any.whl.

File metadata

  • Download URL: otlmow_gui-1.0rc3-py3-none-any.whl
  • Upload date:
  • Size: 200.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.0rc3-py3-none-any.whl
Algorithm Hash digest
SHA256 2e3c0a193be8dd8c481d4aec384da13ca0178581db11fd3440b20224dc0e74c9
MD5 336e049e412faa0942773f4a31ea687a
BLAKE2b-256 3d17d7e5bf72caa96f64b54b5bc3899d6336a13969bb1b839ae5d6aa061fb6bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for otlmow_gui-1.0rc3-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