Skip to main content

Package per associare a dati trasporto pubblico la direzione della tratta

Project description

Below is an example README in Markdown format:


# 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`:

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: gs_ai_package-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 ced659339252610cfc127b402dba92bc1323066f8182f8c4b52efc8395ef9fc2
MD5 b8d3993373f444de164a48729456ba6f
BLAKE2b-256 6f91e4c727cdac48ff145b177a32b20fcaf54ccae349801d24801fb39ffa8110

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gs_ai_package-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f95a08836536a37496669b26d6783f6eb243c2797c1cc81faeae54bfed1a0a30
MD5 4082f5e886219bc1cb18314721522fc3
BLAKE2b-256 71c78cf6c3c69be44c63bd43acb63e93863708b2a614180eaa301972dbb2c92a

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