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:
-
Install Testing Dependencies:
Ensure you have
pytestandpytest-covinstalled:pip install pytest pytest-cov
-
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:
-
Navigate to the
docs/folder:cd docs
-
Build the HTML documentation:
make html -
Open the generated documentation in your browser by navigating to the
build/html/index.htmlfile.
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
- Source Code: https://gitlab.greenshare.it/pietro.cosseddu/gs-ai-package
- Documentation: (Link to your documentation site, e.g., Read the Docs or GitHub Pages)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04eb9b9a79973b57b799bcd4dfd25d96a4f514bcefd565da8cc39ff242b4d254
|
|
| MD5 |
c105fc42a219b24b1aabd2105e2f4313
|
|
| BLAKE2b-256 |
cb194fa60aca8ef8d78e0121e71d59ad726c3e707189161d287ec978497b2d42
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92ac71f823d862107321f38c8d11852debe442e2d27026b47a66d39eb599a2e4
|
|
| MD5 |
5db4b01e3ba458067a5dc24ca6aa38b2
|
|
| BLAKE2b-256 |
f8965a2b9f7f1bcd4482ecb1e12833929ec8327ff07b2682b1a605fefdab51b2
|