No project description provided
Project description
eflips-eval
Part of the eFLIPS/simBA list of projects.
This repository contains code to evaluate an eflips/simBA simulation. It provides the eflips.eval
package, 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 theEvent
orVehicle
classes.eflips.eval.output
contains functions to prepare and visualize simulation output data. That means these functions all access theEvent
orVehicle
classes.- within each package, there is a
prepare
and avisualize
module. Theprepare
module contains functions to prepare the data, thevisualize
module contains functions to visualize the data. The functions must conform tp a naming convention, in which for theeflips.eval.input.preapre.foo()
, there must also exist aeflips.eval.input.visualize.foo()
method and vice versa. However, when the exact same data can be visualized in multiple ways, there can also be aeflips.eval.input.visualize.foo_scatter()
and aeflips.eval.input.visualize.foo_hist()
method. - the signature of a
prepare
method is alwaysprepare(identifier(s), session) -> pd.DataFrame
, whereidentifier(s)
is a single or tuple ofint
s identifying a specific database object andsession
is asqlalchemy.orm.session.Session
object that is used to access the database. - the signature of a
visualize
method is alwaysvisualize(df: pd.DataFrame, **kwargs) -> plotly.graph_objects.Figure
, wheredf
is the DataFrame that is to be visualized andkwargs
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file eflips_eval-1.5.4.tar.gz
.
File metadata
- Download URL: eflips_eval-1.5.4.tar.gz
- Upload date:
- Size: 29.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d633fa189c12dc5bd265bfef69362b0fb9808de261443fcde8123a804d91b4c |
|
MD5 | ec3051a641832b5400058bee94f59ab9 |
|
BLAKE2b-256 | b1b812a605870d0da80ac27b2d7f7042dd15053a92c40d3df737304bd140a24e |
File details
Details for the file eflips_eval-1.5.4-py3-none-any.whl
.
File metadata
- Download URL: eflips_eval-1.5.4-py3-none-any.whl
- Upload date:
- Size: 43.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f4ca6bfa110bd18575d3144a7bd47b74af9dade5065a75d42f6105a5d57685c |
|
MD5 | d774d317f0c8cb56b9878e9b51838249 |
|
BLAKE2b-256 | 01f027c719d1a1b0742a8d977244707799f4700bc3cc361c1d60374035b6ec4e |