Skip to main content

Unit Tests Code style: black

eflips-eval


Part of the eFLIPS/simBA list of projects.


This repository contains code to evaluate an eflips/simBA simulation. It provides the eflips.evalpackage, which contains functions to prepare (database -> pandas DataFrame) and visualize (pandas DataFrame -> plotly) simulation results.

It is organized hierarchically as follows:

  • eflips.eval.input contains functions to prepare and visualize simulation input data. That means it does not access any data from the Event or Vehicle classes.
  • eflips.eval.output contains functions to prepare and visualize simulation output data. That means these functions all access the Event or Vehicle classes.
  • within each package, there is a prepare and a visualize module. The prepare module contains functions to prepare the data, the visualize module contains functions to visualize the data. The functions must conform tp a naming convention, in which for the eflips.eval.input.preapre.foo(), there must also exist a eflips.eval.input.visualize.foo() method and vice versa. However, when the exact same data can be visualized in multiple ways, there can also be a eflips.eval.input.visualize.foo_scatter() and a eflips.eval.input.visualize.foo_hist() method.
  • the signature of a prepare method is always prepare(identifier(s), session) -> pd.DataFrame, where identifier(s) is a single or tuple of ints identifying a specific database object and session is a sqlalchemy.orm.session.Session object that is used to access the database.
  • the signature of a visualize method is always visualize(df: pd.DataFrame, **kwargs) -> plotly.graph_objects.Figure, where df is the DataFrame that is to be visualized and kwargs are additional arguments that can be used to customize the visualization. it does however create a legend (if necessary) and sets axis labels.
  • a visualize function does not make assumptions about the size of the viewport and does not set the title of the plot.
  • The resulting plots should be in english, with proper names (e.g. "Distance [km]" instead of total_dist) for the values that would be shown to the user.

Installation

TODO

Usage

TODO

Testing

TODO

Documentation

The documentation is generated using sphinx. To generate the documentation, execute the following command in the root directory of the repository:

sphinx-build doc/ doc/_build -W

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 utilize the semantic versioning scheme for versioning.

Dependencies are managed using poetry. To install the dependencies, execute the following command in the root directory of the repository:

poetry install

We use black for code formatting. You can use black . to format the code.

We use MyPy for static type checking. You can use mypy --strict --explicit-package-bases eflips/ to run MyPy on the code.

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.

You can use pre-commit to ensure that MyPy, Black, and Poetry are run before committing. To install pre-commit, execute the following command in the root directory of the repository:

We recommend utilizing linters such as PyLint for static code analysis (but not doing everything it says blindly).

Usage Example

In examples an example script can be found that generates a report.

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.

Metadata

Release files for eflips-eval 1.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eflips-eval 1.9.1
File Size Uploaded
eflips_eval-1.9.1.tar.gz 41.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eflips-eval 1.9.1
File Interpreter ABI Platform
eflips_eval-1.9.1-py3-none-any.whl Python 3 none any Details

Total release size: 86.8 kB

Release files / eflips_eval-1.9.1.tar.gz

Download URL eflips_eval-1.9.1.tar.gz
Size 41.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b7b1cbf4c7b7965a6bddcde1db3ae4f4bba2bf5a4e1712670678949d62e91d6c
BLAKE2b-256 checksum
How to use checksums
f4afcdee45d3f769e8a7f9fb37c1c77852ea96ec178acd5dedbf6df58a799cf2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / eflips_eval-1.9.1-py3-none-any.whl

Download URL eflips_eval-1.9.1-py3-none-any.whl
Size 45.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7ad330a5009f83554a13343a79bff8780684248e21acbdec6476d203f7dd41c
BLAKE2b-256 checksum
How to use checksums
2e8c3b175d3e469dac66077dd6454e0f8ea27503a5e283ddf5559d39ccd0dd18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.9.1 This release

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.8

2 release files

1.7.7

2 release files

1.7.6

2 release files

1.7.5

2 release files

1.7.4

2 release files

1.7.3

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.7

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.2

2 release 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