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.4.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.4-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gs_ai_package-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 04eb9b9a79973b57b799bcd4dfd25d96a4f514bcefd565da8cc39ff242b4d254
MD5 c105fc42a219b24b1aabd2105e2f4313
BLAKE2b-256 cb194fa60aca8ef8d78e0121e71d59ad726c3e707189161d287ec978497b2d42

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gs_ai_package-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 92ac71f823d862107321f38c8d11852debe442e2d27026b47a66d39eb599a2e4
MD5 5db4b01e3ba458067a5dc24ca6aa38b2
BLAKE2b-256 f8965a2b9f7f1bcd4482ecb1e12833929ec8327ff07b2682b1a605fefdab51b2

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