Skip to content

Commit

Permalink
minor changes, just packaging...
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain Faure committed Apr 24, 2020
1 parent a628eb0 commit 9840c0b
Show file tree
Hide file tree
Showing 72 changed files with 83 additions and 142 deletions.
47 changes: 20 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,50 @@

CROMOSIM is a Python Library for Crowd Motion Simulation.

- **Website:** http://www.cromosim.fr
- **Source code:** https://github.com/sylvain-faure/cromosim

The aim of this open source project is to make it possible to users to run simulations based from several models (cellular automata, microscopic simulations or using compartments), to test new configurations, and even to investigate the possibility to program their own model in complex geometry : do-it yourself !

This package proposes Python implementations of the numerical methods detailed in the book “Crowds in equations: an introduction to the microscopic modeling of crowds” by B. Maury (ENS Ulm & Univ. Paris-Sud) and S. Faure (CNRS), World Scientific 2018, Advanced textbooks in mathematics.

Github repository
=================

Download the source code and the examples here:

https://github.com/sylvain-faure/cromosim/

How to use cromosim ?
=====================
---------------------

First you have to install cromosim, either by using pip
First you have to install cromosim, either by using pip:

~$ pip install cromosim
~$ pip install cromosim

or by manually installing the package
or by manually installing the package:

cromosim$ python setup.py install
cromosim$ python setup.py install

Once cromosim is installed, you can verify that it is possible to import it
into Python:

~$ python
Python 3.7.7 (default, Mar 10 2020, 15:43:33)
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cromosim
>>> print(cromosim.__version__)
2.0.0
>>>
~$ python
Python 3.7.7 (default, Mar 10 2020, 15:43:33)
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cromosim
>>> print(cromosim.__version__)
2.0.0
>>>

Now to make a first simulation, you can download one of the examples found in:

https://github.com/sylvain-faure/cromosim/tree/master/examples
https://github.com/sylvain-faure/cromosim/tree/master/examples

or retrieve all the examples available using the following command (svn
is the Subversion command):

~$ svn export https://github.com/sylvain\-faure/cromosim/trunk/examples my-cromosim
~$ svn export https://github.com/sylvain\-faure/cromosim/trunk/examples my-cromosim

and then run a first example:

~$ cd my-cromosim/micro/granular
granular$ python micro_granular.py --json input_room.json
~$ cd my-cromosim/micro/granular
granular$ python micro_granular.py --json input_room.json

These examples will allow you to start your own calculations.

Documentation
=============

http://www.cromosim.fr
77 changes: 0 additions & 77 deletions README.rst

This file was deleted.

2 changes: 1 addition & 1 deletion cromosim/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '2.0.0'
version = '2.0.2'
Binary file added doc/.DS_Store
Binary file not shown.
Binary file added doc/source/.DS_Store
Binary file not shown.
Binary file added doc/source/_static/.DS_Store
Binary file not shown.
Binary file removed doc/source/_static/cellular_automata.theora.ogv
Binary file not shown.
Binary file removed doc/source/_static/cellular_automata.webm
Binary file not shown.
Binary file removed doc/source/_static/compartments.theora.ogv
Binary file not shown.
Binary file removed doc/source/_static/compartments.webm
Binary file not shown.
Binary file not shown.
Binary file removed doc/source/_static/domain_manually_wall_distance.png
Binary file not shown.
Binary file removed doc/source/_static/ftl_order1.theora.ogv
Binary file not shown.
Binary file removed doc/source/_static/ftl_order1.webm
Binary file not shown.
Binary file removed doc/source/_static/ftl_order1_periodic.theora.ogv
Binary file not shown.
Binary file removed doc/source/_static/ftl_order1_periodic.webm
Binary file not shown.
Binary file removed doc/source/_static/ftl_order2.theora.ogv
Binary file not shown.
Binary file removed doc/source/_static/ftl_order2.webm
Binary file not shown.
Binary file removed doc/source/_static/ftl_order2_periodic.theora.ogv
Binary file not shown.
Binary file removed doc/source/_static/ftl_order2_periodic.webm
Binary file not shown.
Binary file removed doc/source/_static/micro_granular.mp4
Binary file not shown.
Binary file removed doc/source/_static/micro_granular.png
Binary file not shown.
Binary file removed doc/source/_static/micro_granular.theora.ogv
Binary file not shown.
Binary file removed doc/source/_static/micro_granular.webm
Binary file not shown.
Binary file modified doc/source/_static/micro_granular_event.mp4
Binary file not shown.
Binary file not shown.
Binary file removed doc/source/_static/micro_granular_event.webmhd.webm
Binary file not shown.
Binary file modified doc/source/_static/micro_granular_room_paths.mp4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified doc/source/_static/micro_granular_shibuya_crossing.mp4
Binary file not shown.
Binary file not shown.
Binary file modified doc/source/_static/micro_granular_shibuya_crossing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified doc/source/_static/micro_granular_stadium.mp4
Binary file not shown.
Binary file not shown.
Binary file modified doc/source/_static/micro_granular_stadium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file removed doc/source/_static/micro_granular_stairs_0.mp4
Binary file not shown.
Binary file modified doc/source/_static/micro_granular_stairs_0_1.mp4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed doc/source/_static/micro_granular_stairs_1.mp4
Binary file not shown.
Binary file removed doc/source/_static/micro_social.mp4
Binary file not shown.
Binary file removed doc/source/_static/micro_social.theora.ogv
Binary file not shown.
Binary file removed doc/source/_static/micro_social.webm
Binary file not shown.
Binary file modified doc/source/_static/micro_social_event.mp4
Binary file not shown.
Binary file removed doc/source/_static/micro_social_event.oggtheora.ogv
Binary file not shown.
Binary file removed doc/source/_static/micro_social_event.webmhd.webm
Binary file not shown.
Binary file modified doc/source/_static/micro_social_room_paths.mp4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified doc/source/_static/micro_social_shibuya_crossing.mp4
Binary file not shown.
Binary file not shown.
Binary file modified doc/source/_static/micro_social_shibuya_crossing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified doc/source/_static/micro_social_stadium.mp4
Binary file not shown.
Binary file not shown.
Binary file modified doc/source/_static/micro_social_stadium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed doc/source/_static/micro_social_stadium.webmhd.webm
Binary file not shown.
Binary file removed doc/source/_static/micro_social_stairs_0.mp4
Binary file not shown.
Binary file modified doc/source/_static/micro_social_stairs_0_1.mp4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed doc/source/_static/micro_social_stairs_1.mp4
Binary file not shown.
Binary file modified doc/source/_static/shibuya_crossing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions doc/source/example_ca.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ Results:
<br>
<video style="display:block; margin: 0 auto;" controls poster="_static/cellular_automata.png" width="50%" height="auto">
<source src="_static/cellular_automata.mp4" />
<source src="_static/cellular_automata.webm" />
<source src="_static/cellular_automata.theora.ogv" />
</video>
<br>
<div align=center>
Expand Down
2 changes: 0 additions & 2 deletions doc/source/example_comp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ Results:
<br>
<video style="display:block; margin: 0 auto;" controls poster="_static/compartments.png" width="50%" height="auto">
<source src="_static/compartments.mp4" />
<source src="_static/compartments.webm" />
<source src="_static/compartments.theora.ogv" />
</video>
<br>
<div align=center>
Expand Down
8 changes: 0 additions & 8 deletions doc/source/example_ftl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ Results:
<br>
<video style="display:block; margin: 0 auto;" controls poster="_static/ftl_order1.png" width="60%" height="auto">
<source src="_static/ftl_order1.mp4" />
<source src="_static/ftl_order1.webm" />
<source src="_static/ftl_order1.theora.ogv" />
</video>
<br>

Expand All @@ -59,8 +57,6 @@ Results:
<br>
<video style="display:block; margin: 0 auto;" controls poster="_static/ftl_order1_periodic.png" width="60%" height="auto">
<source src="_static/ftl_order1_periodic.mp4" />
<source src="_static/ftl_order1_periodic.webm" />
<source src="_static/ftl_order1_periodic.theora.ogv" />
</video>
<br>

Expand All @@ -79,8 +75,6 @@ Results:
<br>
<video style="display:block; margin: 0 auto;" controls poster="_static/ftl_order2.png" width="60%" height="auto">
<source src="_static/ftl_order2.mp4" />
<source src="_static/ftl_order2.webm" />
<source src="_static/ftl_order2.theora.ogv" />
</video>
<br>

Expand All @@ -98,8 +92,6 @@ Results:
<br>
<video style="display:block; margin: 0 auto;" controls poster="_static/ftl_order2_periodic.png" width="60%" height="auto">
<source src="_static/ftl_order2_periodic.mp4" />
<source src="_static/ftl_order2_periodic.webm" />
<source src="_static/ftl_order2_periodic.theora.ogv" />
</video>
<br>

Expand Down
20 changes: 0 additions & 20 deletions doc/source/example_micro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ and can be launched with
<center>
<video style="display:block; margin: 0 auto;" controls poster="_static/micro_social_room_paths.png" width="40%" height="auto">
<source src="_static/micro_social_room_paths.mp4" />
<source src="_static/micro_social_room_paths.webmhd.webm" />
<source src="_static/micro_social_room_paths.oggtheora.ogv" />
</video>
</center>
</td>
Expand All @@ -73,8 +71,6 @@ and can be launched with
<center>
<video style="display:block; margin: 0 auto;" controls poster="_static/micro_social_stadium.png" width="40%" height="auto">
<source src="_static/micro_social_stadium.mp4" />
<source src="_static/micro_social_stadium.webmhd.webm" />
<source src="_static/micro_social_stadium.oggtheora.ogv" />
</video>
</center>
</td>
Expand All @@ -99,8 +95,6 @@ and can be launched with
<center>
<video style="display:block; margin: 0 auto;" controls poster="_static/micro_social_event.png" width="40%" height="auto">
<source src="_static/micro_social_event.mp4" />
<source src="_static/micro_social_event.webmhd.webm" />
<source src="_static/micro_social_event.oggtheora.ogv" />
</video>
</center>
</td>
Expand All @@ -125,8 +119,6 @@ and can be launched with
<center>
<video style="display:block; margin: 0 auto;" controls poster="_static/micro_social_shibuya_crossing.png" width="40%" height="auto">
<source src="_static/micro_social_shibuya_crossing.mp4" />
<source src="_static/micro_social_shibuya_crossing.webmhd.webm" />
<source src="_static/micro_social_shibuya_crossing.oggtheora.ogv" />
</video>
</center>
</td>
Expand All @@ -147,8 +139,6 @@ and can be launched with
<center>
<video style="display:block; margin: 0 auto;" controls poster="_static/micro_social_stairs_0_1.png" width="100%" height="auto">
<source src="_static/micro_social_stairs_0_1.mp4" />
<source src="_static/micro_social_stairs_0_1.webmhd.webm" />
<source src="_static/micro_social_stairs_0_1.oggtheora.ogv" />
</video>
</center>
</td>
Expand Down Expand Up @@ -207,8 +197,6 @@ and can be launched with
<center>
<video style="display:block; margin: 0 auto;" controls poster="_static/micro_granular_room_paths.png" width="40%" height="auto">
<source src="_static/micro_granular_room_paths.mp4" />
<source src="_static/micro_granular_room_paths.webmhd.webm" />
<source src="_static/micro_granular_room_paths.oggtheora.ogv" />
</video>
</center>
</td>
Expand All @@ -228,8 +216,6 @@ and can be launched with
<center>
<video style="display:block; margin: 0 auto;" controls poster="_static/micro_granular_stadium.png" width="40%" height="auto">
<source src="_static/micro_granular_stadium.mp4" />
<source src="_static/micro_granular_stadium.webmhd.webm" />
<source src="_static/micro_granular_stadium.oggtheora.ogv" />
</video>
</center>
</td>
Expand All @@ -254,8 +240,6 @@ and can be launched with
<center>
<video style="display:block; margin: 0 auto;" controls poster="_static/micro_granular_event.png" width="40%" height="auto">
<source src="_static/micro_granular_event.mp4" />
<source src="_static/micro_granular_event.webmhd.webm" />
<source src="_static/micro_granular_event.oggtheora.ogv" />
</video>
</center>
</td>
Expand All @@ -280,8 +264,6 @@ and can be launched with
<center>
<video style="display:block; margin: 0 auto;" controls poster="_static/micro_granular_shibuya_crossing.png" width="40%" height="auto">
<source src="_static/micro_granular_shibuya_crossing.mp4" />
<source src="_static/micro_granular_shibuya_crossing.webmhd.webm" />
<source src="_static/micro_granular_shibuya_crossing.oggtheora.ogv" />
</video>
</center>
</td>
Expand All @@ -302,8 +284,6 @@ and can be launched with
<center>
<video style="display:block; margin: 0 auto;" controls poster="_static/micro_granular_stairs_0_1.png" width="100%" height="auto">
<source src="_static/micro_granular_stairs_0_1.mp4" />
<source src="_static/micro_granular_stairs_0_1.webmhd.webm" />
<source src="_static/micro_granular_stairs_0_1.oggtheora.ogv" />
</video>
</center>
</td>
Expand Down
48 changes: 48 additions & 0 deletions doc/tt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Sphinx v3.0.1 en cours d'exécution
chargement de l'environnement pickled... fait
construction en cours [mo]:cibles pour les fichiers po 0 qui sont périmées
construction [html]:cibles pour les fichiers sources 1 qui sont périmées
mise-à-jour de l'environnement :[la configuration a changé ('numpydoc_xref_aliases')] 11 ajouté, 0 modifié, 0 supprimé
lecture des sources... [ 9%] ca
lecture des sources... [ 18%] comp
lecture des sources... [ 27%] domain
lecture des sources... [ 36%] example_ca
lecture des sources... [ 45%] example_comp
lecture des sources... [ 54%] example_dom
lecture des sources... [ 63%] example_ftl
lecture des sources... [ 72%] example_micro
lecture des sources... [ 81%] ftl
lecture des sources... [ 90%] index
lecture des sources... [100%] micro

recherche des fichiers périmés... aucun résultat
environnement de sérialisation... fait
vérification de la cohérence... fait
document en préparation... fait
écriture... [ 9%] ca
écriture... [ 18%] comp
écriture... [ 27%] domain
écriture... [ 36%] example_ca
écriture... [ 45%] example_comp
écriture... [ 54%] example_dom
écriture... [ 63%] example_ftl
écriture... [ 72%] example_micro
écriture... [ 81%] ftl
écriture... [ 90%] index
écriture... [100%] micro

generating indices... genindex py-modindexfait
coloration syntaxique du code du module...[ 20%] cromosim.ca
coloration syntaxique du code du module...[ 40%] cromosim.comp
coloration syntaxique du code du module...[ 60%] cromosim.domain
coloration syntaxique du code du module...[ 80%] cromosim.ftl
coloration syntaxique du code du module...[100%] cromosim.micro

writing additional pages... searchfait
copie des fichiers statiques... ... fait
copying extra files... fait
dumping search index in English (code: en)... fait
dumping object inventory... fait
build a réussi, 13 warnings.

Les pages HTML sont dans build/html .
19 changes: 14 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from setuptools import setup, find_packages
import os

CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -19,7 +20,7 @@

MAJOR = "2"
MINOR = "0"
PATCH = "0"
PATCH = "2"
VERSION = "{0}.{1}.{2}".format(MAJOR, MINOR, PATCH)

def write_version_py(filename='cromosim/version.py'):
Expand All @@ -29,16 +30,24 @@ def write_version_py(filename='cromosim/version.py'):
finally:
a.close()

README = open("README.rst").readlines()
# read the contents of your README file
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()

#README = open("README.rst").readlines()

write_version_py()

setup(
name = "cromosim",
version = VERSION,
description = README[0],
long_description_content_type = 'text/x-rst',
long_description = "".join(README[1:]),
#description = README[0],
#long_description_content_type = 'text/x-rst',
#long_description = "".join(README[1:]),
long_description=long_description,
long_description_content_type='text/markdown',
author = "Sylvain Faure, Bertrand Maury",
author_email = "[email protected], [email protected]",
url = "http://www.cromosim.fr",
Expand Down

0 comments on commit 9840c0b

Please sign in to comment.