Skip to content

NIPKaart/offstreet-parking

Repository files navigation

alt Banner of the offstreet parking project

GitHub Activity GitHub Last Commit Linting

Project Maintenance License Contributors

Forks Stargazers Issues

About

This project makes it possible to collect data from municipalities about off-street parking spaces (garages or park and rides) and upload them to the NIPKaart platform.

Supported cities

Country City Type Update interval
Netherlands Amsterdam Parking garages Every 10 minutes
Germany Hamburg Park and rides Every 30 minutes (paused in midnight)

Development

This Python project is fully managed using the Poetry dependency manager.

You need at least:

  1. Create a .env file
cp .env.example .env
  1. Fillout the database credentials and which city you want to upload
  2. Change the city and wait_time (in minutes) in the .env file.
  3. Install all packages, including all development requirements:
poetry install

Poetry creates by default an virtual environment where it installs all necessary pip packages, to enter or exit the venv run the following commands:

poetry shell
exit

Setup the pre-commit check, you must run this inside the virtual environment:

pre-commit install

Now you're all set to get started!

As this repository uses the pre-commit framework, all changes are linted and tested with each commit. You can run all checks and tests manually, using the following command:

poetry run pre-commit run --all-files
Click here to see more!

Build image

Build docker image, type could be parkandride or garages

docker build -t nipkaart-[TYPE]-[CITY] .

Run the image

docker run nipkaart-[TYPE]-[CITY] -d --restart on-failure --name nipkaart-[TYPE]-[CITY]

or

docker stack deploy -c deploy/[CITY].yml offstreet

Contributing

Would you like to contribute to the development of this project? Then read the prepared contribution guidelines and go ahead!

Thank you for being involved! 😍

License

MIT License

Copyright (c) 2021-2024 Klaas Schoute

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.