Skip to main content

Package per associare a dati trasporto pubblico la direzione della tratta

Project description

GS AI Package

The GS AI Package is a library developed for standardizing and streamlining internal projects for the GreenShare Experiments team. This package provides a suite of tools to associate directional information with public transport data, specifically for occupancy (crowding) and evasion data provided by public transport companies.

Features

  • DirectionProcessor Class: A new class introduced in version 0.1.1.

    • Associates the direction with public transport data.
    • Provides methods to process, normalize, and fill missing values in the data.
    • Uniformizes directional information across various projects.
  • Data Processing Functions: Includes functions to:

    • Check if column names are in snake_case.
    • Calculate direction distribution based on the most common values.
    • Fill missing directions using trip-based modes.
    • Uniformize direction values within groups.

Installation

You can install the package from PyPI using pip:

pip install gs_ai_package

For testing and development, you can also install it from TestPyPI:

pip install --index-url https://test.pypi.org/simple/ gs_ai_package

Running Tests

The package includes tests to verify functionality and ensure code quality. To run the tests, follow these steps:

  1. Install Testing Dependencies:

    Ensure you have pytest and pytest-cov installed:

    pip install pytest pytest-cov
    
  2. Run Tests:

    From the root directory of the project, run:

    pytest --cov=gs_ai_package --cov-report=term-missing
    

    This command runs all tests and shows a coverage report in the terminal.

Documentation

The full documentation for this package is generated using Sphinx and is available online (e.g., via Read the Docs or GitHub Pages).

To build the documentation locally:

  1. Navigate to the docs/ folder:

    cd docs
    
  2. Build the HTML documentation:

    make html
    
  3. Open the generated documentation in your browser by navigating to the build/html/index.html file.

Alternatively, you can use sphinx-autobuild for automatic rebuilding and live preview:

sphinx-autobuild . build/html

Then open http://127.0.0.1:8000 in your browser.

Contributing

Contributions are welcome! If you wish to contribute, please follow these guidelines:

  • Fork the repository.
  • Create a new branch for your feature or bugfix.
  • Write tests for your changes.
  • Ensure all tests pass and the coverage is maintained.
  • Submit a pull request with a clear description of your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project URLs

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

gs_ai_package-0.1.3.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

gs_ai_package-0.1.3-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file gs_ai_package-0.1.3.tar.gz.

File metadata

  • Download URL: gs_ai_package-0.1.3.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for gs_ai_package-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1f4f7a04100cc98cc51bcc557d4f92329333571040d8e823c4f13ebd9bfec24e
MD5 5b90bc0b521283d3a51daa45ffba4c28
BLAKE2b-256 3051a105193e988863d7062125d80d4853d68be6081164f291fcb9b73b993878

See more details on using hashes here.

File details

Details for the file gs_ai_package-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: gs_ai_package-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for gs_ai_package-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f6c878ca3bb03f559e68ec71b11ea3e65fc5a0eaf896272467f8a3cb52af51f0
MD5 f84e6ff7a6fd97ffb2ce8e1692f935f4
BLAKE2b-256 c6d4f20ece2c06c9697d88cd172c7cd927cbdb006156ef012b3e6112458a2610

See more details on using hashes here.

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