Skip to main content

Tests Code style: black

eflips-depot


Part of the eFLIPS/simBA list of projects.


eFLIPS has been developed within several research projects at the Department of Methods of Product Development and Mechatronics at the Technische Universität Berlin (see https://www.tu.berlin/mpm/forschung/projekte/eflips).

With eFLIPS, electric fleets and depots can be simulated, planned and designed. This repository contains only the planning and design tool for depots.

eflips_overview

The repository contains an example for the simulation and planning of an elecric bus depot, which is based on the dissertation by Dr.-Ing. Enrico Lauth (see https://depositonce.tu-berlin.de/items/f47662f7-c9ae-4fbf-9e9c-bcd307b73aa7).

Installation

  1. Clone this git repository (or download a specific release)

    git clone git@github.com:mpm-tu-berlin/eflips-depot.git
    
  2. Install the packages listed in poetry.lock and pyproject.toml into your Python environment. Notes:

    • The suggested Python version os 3.11.*, it may work with other versions, but this is not tested.
    • Using the poetry package manager is recommended. It can be installed accoring to the instructions listed here.

    macOS

    poetry env use 3.11
    poetry install
    

    Windows

    If you are using Windows, you have to provide the full path to the desired Python executable, e.g.:

    poetry env use C:\Users\user\AppData\Local\Programs\Python\Python311\python.exe
    poetry install
    
  3. To start a simulation, an existing eFLIPS-Model database is requires. Once you have that, you can run the script bin/example.py

Usage

Please refer to the Documentation section of this Readme for information on how to use eFLIPS-Depot.

The API of eFLIPS-Depot can be accessed via eFLIPS.depot.api. A usage example can be found in the script bus_depot/user_example.py.

Testing


NOTE: Be aware that the tests will clear the database specified in the DATABASE_URL environment variable. Make sure that you are not using a database that you want to keep.


Testing is done using the pytest framework with tests located in the testsdirectory. To run the tests, execute the following command in the root directory of the repository:

   export PYTHONPATH=tests:. # To make sure that the tests can find the eflips package
   export DATABASE_URL=postgis://postgres:postgres@localhost:5432/postgres # Or whatever your database URL is
   export DJANGO_SETTINGS_MODULE=tests.api.djangosettings # To make sure that the tests use the correct settings
   pytest

Documentation

Documentation is available on Read the Docs.

To locally create the documentaiton from the docstrings in the code using sphinx-autoapi, you can create the documentation execute the following command in the root directory of the repository:

   cd docs/
   sphinx-build -b html . _build

Development

We utilize the GitHub Flow branching structure. This means that the main branch is always deployable and that all development happens in feature branches. The feature branches are merged into main via pull requests.

We use black for code formatting. You can use pre-commit to ensure the code is formatted correctly before committing. You are also free to use other methods to format the code, but please ensure that the code is formatted correctly before committing.

Please make sure that your poetry.lock and pyproject.toml files are consistent before committing. You can use poetry check to check this. This is also checked by pre-commit.

License

This project is licensed under the AGPLv3 license - see the LICENSE file for details.

Funding Notice

This code was developed as part of the project eBus2030+ funded by the Federal German Ministry for Digital and Transport (BMDV) under grant number 03EMF0402.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eflips_depot-4.18.5.tar.gz (228.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eflips_depot-4.18.5-py3-none-any.whl (242.7 kB view details)

Uploaded Python 3

File details

Details for the file eflips_depot-4.18.5.tar.gz.

File metadata

  • Download URL: eflips_depot-4.18.5.tar.gz
  • Upload date:
  • Size: 228.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for eflips_depot-4.18.5.tar.gz
Algorithm Hash digest
SHA256 32b3e6787514b8654291fb34a3b1741a95b1297fd5aaed1f7223dd12a72adcbd
MD5 4cfa9e3b1ca6938c6be359e72284b687
BLAKE2b-256 7bcbae828db7c19f26db167fd7447edaf1f3a041e09984c19e601c85a2b3b256

See more details on using hashes here.

Provenance

The following attestation bundles were made for eflips_depot-4.18.5.tar.gz:

Publisher: release.yml on mpm-tu-berlin/eflips-depot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eflips_depot-4.18.5-py3-none-any.whl.

File metadata

  • Download URL: eflips_depot-4.18.5-py3-none-any.whl
  • Upload date:
  • Size: 242.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for eflips_depot-4.18.5-py3-none-any.whl
Algorithm Hash digest
SHA256 429092849a42c76c9cef1a1fefb10d8a9f9a4f66b99c13d5f9ec58f2eea4b171
MD5 d6bdcffd289cd650b09202036615893d
BLAKE2b-256 dae0e163f83970c21b4638a31f640c02df0bb06a6861535e2bf1ad392d7c8e21

See more details on using hashes here.

Provenance

The following attestation bundles were made for eflips_depot-4.18.5-py3-none-any.whl:

Publisher: release.yml on mpm-tu-berlin/eflips-depot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

4.19.0

2 files

This release

4.18.5 This release

2 files

4.18.4

2 files

4.18.3

2 files

4.18.2

2 files

4.18.1

2 files

4.18.0

2 files

4.17.2

2 files

4.17.1

2 files

4.17.0

2 files

4.16.3

2 files

4.16.2

2 files

4.16.1

2 files

4.16.0

2 files

4.15.13

2 files

4.15.12

2 files

4.15.11

2 files

4.15.10

2 files

4.15.9

2 files

4.15.8

2 files

4.15.7

2 files

4.15.6

2 files

4.15.5

2 files

4.15.4

2 files

4.15.3

2 files

4.15.2

2 files

4.15.1

2 files

4.15.0

2 files

4.14.3

2 files

4.14.2

2 files

4.14.1

2 files

4.14.0

2 files

4.13.5

2 files

4.13.4

2 files

4.13.3

2 files

4.13.2

2 files

4.13.1

2 files

4.13.0

2 files

4.12.2

2 files

4.12.1

2 files

4.12.0

2 files

4.11.0

2 files

4.10.0

2 files

4.9.1

2 files

4.9.0

2 files

4.8.0

2 files

4.7.1

2 files

4.7.0

2 files

4.6.9

2 files

4.6.8

2 files

4.6.7

2 files

4.6.6

2 files

4.6.5

2 files

4.6.4

2 files

4.6.3

2 files

4.6.2

2 files

4.6.1

2 files

4.6.0

2 files

4.5.0

2 files

4.4.3

2 files

4.4.2

2 files

4.4.1

2 files

4.4.0

2 files

4.3.19

2 files

4.3.18

2 files

4.3.17

2 files

4.3.16

2 files

4.3.15

2 files

4.3.14

2 files

4.3.13

2 files

4.3.12

2 files

4.3.11

2 files

4.3.10

2 files

4.3.9

2 files

4.3.8

2 files

4.3.7

2 files

4.3.6

2 files

4.3.5

2 files

4.3.4

2 files

4.3.3

2 files

4.3.2

2 files

4.3.1

2 files

4.3.0

2 files

4.2.2

2 files

4.2.1

2 files

4.2.0

2 files

4.1.6

2 files

4.1.5

2 files

4.1.4

2 files

4.1.3

2 files

4.1.2

2 files

4.1.1

2 files

4.1.0

2 files

4.0.2

2 files

4.0.1

2 files

4.0.0

2 files

3.2.7

2 files

3.2.6

2 files

3.2.5

2 files

3.2.4

2 files

3.2.3

2 files

3.2.2

2 files

3.2.1

2 files

3.2.0

2 files

3.1.5

2 files

3.0.5

2 files

3.0.4

2 files

3.0.3

2 files

3.0.2

2 files

3.0.1

2 files

3.0.0

2 files

2.0.0

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page