This repository contains the Flask-based Collectives web app, an event management system for outdoor clubs.
A live demonstration exists at https://test.collectives.cafannecy.fr
Detailed documentation is available in the doc folder and can be browsed at https://doc.collectives.cafannecy.fr
- Install uv: follow https://docs.astral.sh/uv/getting-started/installation/
# macOS and Linux
> curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
PS> powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"-
Clone this git repository (or unzip release archive)
-
From the root of the cloned repo, run
uv sync -
Start the local server:
uv run run.py -
Navigate to http://localhost:5000/ to test the app
Instance specific configuration can be included in instance/config.py
Default account is admin Default password is foobar2 (can be changed in config.py)
A data set for tests can be loaded into the db via etc/test_set.py
- Unzip the package from the source.
- Install Python (this app has been tested with Python 3.8) and pip3
- Install required dependencies with pip
pip install -r requirements.txt - Run the development server (it will be available at http://localhost:5000)
./run.py(do not run this in production)
-
Fork this repository and clone your fork to your local machine
-
(Optional) Install
ruffVS Code extension to format and lint your code automatically -
Updates the dependencies lock file
uv lock -
Make the desired changes, following guidelines in [CODING.md]
-
Make sure your is correctly formatted:
uvx ruff format -
Run the linter:
uvx ruff check --fix -
Run unit and integration tests:
uv run pytest -
Push your local branch to your fork and create a pull request against the main repository
Dependency are configured the the pyproject.toml file, but it is recommend to use the uv high-level interface when possible. See https://docs.astral.sh/uv/, uv add --help and uv lock --help for more information.
- Adding a dependency
uv add your-python-package - Updating the depency lock file:
uv lock. This may be necessary if changing thepyproject.tomlfile directly. - Upgrading all dependencies to latest possible version:
uv lock --upgrade. This should be run regularly stay up to date with upstream packages. - A pip
requirements.txtfile may be created usinguv pip freeze
- Navigate to
docrepository - Run
uv run make html - Open the result in a web browser, e.g:
open build/html/index.html