Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
echo "::group::Python environment"
python -m pip install --upgrade pip
pip install uv
uv sync
uv sync --locked --all-extras --dev
echo "::endgroup::"

- name: Build C++ mechanical layer (CMake)
Expand Down
10 changes: 9 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@ ci:
# so we use GitHub Actions for that instead
submodules: false # Whether to update submodules during autoupdate

fail_fast: false # Continue running other hooks even if one fails
fail_fast: true # Stop running other hooks even if one fails

repos:
# UV: Python package and project manager
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.17
hooks:
- id: uv-lock # To make sure your uv.lock file is up to date even if your pyproject.toml file was changed
- id: uv-export # To keep a requirements.txt file in sync with your uv.lock file
args: ["--output-file=requirements.txt", "--quiet"]

# Codespell: Spell checker
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
Expand Down
5 changes: 4 additions & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ abstract: >-
the second library from Python. The tool enables users to implement
their own decisional layer, i.e., to control the agents' choices of desired velocities.
keywords:
- anthropometry
- crowd generation
- crowd dynamics
- pedestrian dynamics
- anthropometry
- mechanical interactions
- bideltoid breadth
- chest depth
- non-circular shapes
licence: CeCILL-B
version: 1.0.0
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<table align="center" style="width:100%; border-collapse:collapse;">
<tr>
<td align="center" style="width:100%;">
<img src="./docs/source/_static/logo/logo_doc.png" width="300" alt="Project icon" style="display:block; margin:auto;">
<img src="https://raw.githubusercontent.com/Crowd-Mechanics/LEMONS/master/docs/source/_static/logo/logo_doc.png" width="300" alt="Project icon" style="display:block; margin:auto;">
</td>
</tr>
<tr>
Expand All @@ -19,7 +19,7 @@
[![](https://badgen.net/badge/🚀/Streamlit%20App/green)](https://lemons.streamlit.app/)
[![](https://badgen.net/badge/VIDEO/10.5281%2Fzenodo.17885366/red)](https://doi.org/10.5281/zenodo.17885366)

<img src="./docs/source/_static/logo/logo_icon.png" alt="lemon" width="20" style="vertical-align:middle;"> **LEMONS**: *An Open-Source Platform to Generate Non-Circular, Anthropometry-Based Pedestrian Shapes and Simulate Their Mechanical Interactions in 2D*
<img src="https://raw.githubusercontent.com/Crowd-Mechanics/LEMONS/master/docs/source/_static/logo/logo_icon.png" alt="lemon" width="20" style="vertical-align:middle;"> **LEMONS**: *An Open-Source Platform to Generate Non-Circular, Anthropometry-Based Pedestrian Shapes and Simulate Their Mechanical Interactions in 2D*

</div>

Expand Down Expand Up @@ -54,27 +54,24 @@ Cite us:
## An example of a generated crowd
<tr>
<td align="center" style="width:100%;">
<img src="./data/images/crowd_150_agents.png" width="450" alt="Project icon" style="display:block; margin:auto;">
<img src="https://raw.githubusercontent.com/Crowd-Mechanics/LEMONS/master/data/images/crowd_150_agents.png" width="450" alt="Project icon" style="display:block; margin:auto;">
</td>
</tr>

## An example of a crowd simulation
Forward propagation of a push through a row of people (experience from [Feldmann S., Adrian J., 2023](https://doi.org/10.1016/j.ssci.2023.106173)). Dotted lines: measured head trajectories, solid lines: simulation.
<tr>
<td align="center" style="width:100%;">
<img src="./data/images/practical_case_push_close_to_wall.png" width="450" alt="An example of a crowd simulation." style="display:block; margin:auto;">
<img src="https://raw.githubusercontent.com/Crowd-Mechanics/LEMONS/master/data/images/practical_case_push_close_to_wall.png" width="450" alt="An example of a crowd simulation." style="display:block; margin:auto;">
</td>
</tr>

## An example of a 3D crowd
<tr>
<td align="center" style="width:100%;">
<img src="./data/images/3D_crowd.png" width="450" alt="A crowd in 3D." style="display:block; margin:auto;">
<img src="https://raw.githubusercontent.com/Crowd-Mechanics/LEMONS/master/data/images/3D_crowd.png" width="450" alt="A crowd in 3D." style="display:block; margin:auto;">
</td>
</tr>

## License
Every part of `LEMONS` is available under the [`CeCILL-B`](https://cecill.info/licences.fr.html) license.



67 changes: 48 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,62 +1,85 @@
[project]
name = "lemons"
version = "1.0.0"
description = "lemons is an open-source platform to generate non-circular, anthropometry-based pedestrian shapes and simulate their mechanical interactions in two dimensions"
description = "Python wrapper for the LEMONS library to generate anthropometry-based, non-circular pedestrian shapes, visualize crowds, and simulate 2D dynamics."
keywords = [
"crowd generation",
"crowd dynamics",
"pedestrian dynamics",
"anthropometry",
"mechanical interactions",
"bideltoid breadth",
"chest depth",
"non-circular shapes",
]
readme = "README.md"
requires-python = ">=3.13"
authors = [
{ name = "Oscar DUFOUR" },
{ name = "Maxime STAPELLE" },
{ name = "Alexandre NICOLAS" },
{ name = "Oscar DUFOUR", email = "oscar.dufour@univ-lyon1.fr" },
{ name = "Maxime STAPELLE", email = "maxime.stapelle@univ-lyon1.fr" },
{ name = "Alexandre NICOLAS", email = "alexandre.nicolas@univ-lyon1.fr" },
]
license = "CECILL-B"
license-files = ["LICEN[CS]E.txt"]
classifiers = [
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.13",
]

dependencies = [
"breathe>=4.36.0",
"cmcrameri>=1.9",
"codespell>=2.4.1",
"dicttoxml>=1.7.16",
"exhale>=0.3.7",
"gprof2dot>=2025.4.14",
"jupyter>=1.1.1",
"kaleido>=1.2.0",
"kivy>=2.3.1",
"matplotlib>=3.10.3",
"myst-parser>=4.0.1",
"nbmake>=1.5.5",
"nbsphinx>=0.9.6",
"nbsphinx-link>=1.3.1",
"numpy>=2.2.6",
"numpydoc>=1.8.0",
"pandas>=2.2.3",
"pathlib>=1.0.1",
"plotly>=6.1.1",
"pre-commit>=4.5.0",
"pytest>=8.3.5",
"pytest-cov>=6.1.1",
"pytest-xdist[psutil]>=3.8.0",
"pyvista>=0.45.2",
"ruff>=0.11.10",
"scipy>=1.15.3",
"shapely>=2.1.1",
"sphinx>=8.2.3",
"sphinx-autodoc-typehints>=3.2.0",
"sphinx-mdinclude>=0.6.2",
"sphinx-rtd-theme>=3.0.2",
"streamlit>=1.45.1",
"streamlit-option-menu>=0.4.0",
"watchdog>=6.0.0",
"xmltodict>=0.14.2",
]

[project.optional-dependencies]
dev = []
dev = [
"pre-commit>=4.5.0",
"codespell>=2.4.1",
"numpydoc>=1.8.0",
"ruff>=0.11.10",
"exhale>=0.3.7",
"breathe>=4.36.0",
"myst-parser>=4.0.1",
"nbmake>=1.5.5",
"nbsphinx>=0.9.6",
"nbsphinx-link>=1.3.1",
"sphinx>=8.2.3",
"sphinx-autodoc-typehints>=3.2.0",
"sphinx-mdinclude>=0.6.2",
"sphinx-rtd-theme>=3.0.2",
]

[project.urls]
Homepage = "https://github.com/Crowd-Mechanics/LEMONS"
Issues = "https://github.com/Crowd-Mechanics/LEMONS/issues"

[build-system]
requires = ["setuptools", "wheel", "pandoc"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
where = ["src"]
include = ["configuration*", "streamlit_app*"]

[tool.numpydoc_validation]
checks = [
Expand All @@ -68,3 +91,9 @@ checks = [
# have to use single quotes for regex in TOML
exclude = ['\.undocumented_method$', '\.__repr__$']
override_SS05 = ['^Process ', '^Assess ', '^Access ']

[[tool.uv.index]]
name = "pypi"
url = "https://pypi.org/simple/"
publish-url = "https://pypi.org/legacy/"
explicit = true
Loading