Skip to content

Add data manager#23

Merged
mmaelicke merged 9 commits intomainfrom
add-data-manager
Mar 2, 2022
Merged

Add data manager#23
mmaelicke merged 9 commits intomainfrom
add-data-manager

Conversation

@mmaelicke
Copy link
Member

The DataManager is a wrapper around all data sources used by RUINSapp. It can be configures by any Config class and organizes or caches all data sources using a DataSource inherited class. This makes the read and filter interface available on all sources, no matter where they are stored.
Using the Config to instantiate a data manager can in principle enable different profiles, or even an interaction with the frontend, although not implemented nor desired at the current stage.

Example

from ruins import core

# create default config
conf = core.Config()

# create a data manager from this
dm = core.DataManager(**conf)

Of course, the data manager can also be used without the config, ie. to open it in debug mode:

# using conf with conf.debug=False and overwrite it
dm = core.DataManager(**conf, debug=True)

Review and merge after #18 was merged successfully.
Closes #12

@mmaelicke mmaelicke added this to the Implement data storage API milestone Feb 25, 2022
@mmaelicke mmaelicke requested review from AlexDo1 and lucfr February 25, 2022 05:57
@codecov
Copy link

codecov bot commented Feb 25, 2022

Codecov Report

Merging #23 (29593a0) into main (7d117cf) will increase coverage by 13.54%.
The diff coverage is 75.51%.

Impacted file tree graph

@@            Coverage Diff             @@
##            main      #23       +/-   ##
==========================================
+ Coverage   7.92%   21.47%   +13.54%     
==========================================
  Files          4        5        +1     
  Lines        391      489       +98     
==========================================
+ Hits          31      105       +74     
- Misses       360      384       +24     
Impacted Files Coverage Δ
ruins/core/data_manager.py 75.51% <75.51%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d117cf...29593a0. Read the comment docs.

@mmaelicke mmaelicke marked this pull request as ready for review March 1, 2022 08:04
@mmaelicke mmaelicke merged commit 07fffc2 into main Mar 2, 2022
@mmaelicke mmaelicke deleted the add-data-manager branch March 2, 2022 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

create main data manager class

1 participant