Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(readme): update readme with a clearer description of the repo #8

Merged
merged 1 commit into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#  Introduction

Thank you for considering contribution to Navitia Client !

You will find in the following few ground rules to help to provide a good tool to the open-source community.

## Ground rules

By contributing to this project:

* Be respectful with others and remember that this project is maintained by volunteers which are doing so on their free time.
* If you want to make a change, please create an issue first so we might be able to track your changes.
* Ensure that your code is following the [Style Guide for Python Code](https://peps.python.org/pep-0008/).
* Make sure that any changes you provide is covered tested properly.
* Create clear commit messages and keep the history of your branch as clean as possible.

##  How to contribute

To contribute to this repository, you will need to install the dependancies located in [dev-requirements.txt](dev-requirements.txt).

```bash
pip install dev-requirements.txt
```

We are relying on a few tools (mypy, ruff) to ensure code quality, which are run at commit time. Make sure that [pre-commit](https://pre-commit.com/) has been installed properly

```bash
pre-commit init
```

Ensure that these tools ran successfully on your machine before creating a pull-request. In any case, they have been added to the CI, so your pull request will not be mergeable until all error are fixed.

##  Testing

Ensure that any changes you provide is covered by tests. We are using [pytest](https://docs.pytest.org/en/8.0.x/).

After installation of the dev dependancies, you can run all tests using

```bash
python -m pytest tests/
```

##   Issues and feature requests

Feel free to open a Github issue when reporting an issue or asking for a feature request.
67 changes: 66 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,67 @@
# navitia-client
A Python client to use navitia.io APIs

This repository provides A Python client to use [navitia.io APIs](https://doc.navitia.io).

##  Pre-requisites

To use this library, you will need an access token from [navitia.io](https://navitia.io/tarifs/).

##  Installation

The package is not yet available on pip.

For development purpose, you can install it using

```bash
pip install -e .
```

## Usage

```python
from navitia_client.client import NavitiaClient
client = NavitiaClient(auth=<YOUR_TOKEN_HERE>)
```

A base URL for Navitia IO is hardcoded and provided to NavitiaClient by default. It can be updated using the base_navitia_url parameter.

##  API support

As of April 7th 2024, the library supports the following [APIs](https://doc.navitia.io/#api-catalog):

| API | Supported ? |
| ----------------------------------------- | ----------- |
| Coverage | ✅ |
| Datasets | ❌ |
| Contributors | ❌ |
| Inverted geocoding | ❌ |
| Public transportation Objects exploration | ❌ |
| Autocomplete on Public Transport objects | ❌ |
| Autocomplete on geographical objects | ❌ |
| Places nearby | ❌ |
| Journeys | ❌ |
| Isochrones | ❌ |
| Route Schedules | ❌ |
| Stop Schedules | ❌ |
| Terminus Schedules | ❌ |
| Departures | ❌ |
| Arrivals | ❌ |
| Line reports | ❌ |
| Traffic reports | ❌ |
| Equipment_Reports | ❌ |

##  Dependencies

* Python >= 3.10
* requests>=2.31

Additional dependencies are described in the [pyproject.toml file](pyproject.toml).

##  Contributing

You are free to contribute to the repo. Please read [Contributing.md](CONTRIBUTING.md).

##  Additional questions

* IS this client asynchronous ?
No, and it is not planned to. If you want to add async support, feel free to contribute.
Loading