Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Mongodb plus nicegui#34

Merged
sabinem merged 16 commits intodevelopfrom
mongodb-plus-nicegui
Feb 7, 2024
Merged

Mongodb plus nicegui#34
sabinem merged 16 commits intodevelopfrom
mongodb-plus-nicegui

Conversation

@sabinem
Copy link
Contributor

@sabinem sabinem commented Jan 29, 2024

This PR does the following:

Goals:

Reimplement the CLI as GUI

Choices:

Nicegui replaces Streamlit

Nicegui is used and will replace Streamlit

  • a nicegui dashboard is added in the directory odtp/dashboard
  • the streamlit ui is kept and will only be removed once the work has been completed

Move DB logic from CLI to DB functions

  • the db functions have been refactored for the double use by CLI and GUI
  • the new fuctions are in odtp/mongodb/db.py
  • the old functions in odtp/db.py have been kept so far and will only be removed after all adaptations have been completed
  • CLI functions have all be adapted to use the new db functions
  • òdtp/workflow.py and odtp/setup.py are not fully adapted yet

Schema change in Mongo DB

components got new properties:

  • repoLink: url to the git repository
  • versions: list of the dependent version_ids of their versions

versions properties also changed:

  • commitHash: contains commit that was used to build the docker image
  • repoLink: was remove as it is now part of the components
  • versionwas renamed to odtp_version

Status

Nicegui Dashboard

Work in progress:

Done:

  • User Page
  • Digital Twin Page

In Work:

  • Component Page
  • Executions Page

Open Questions:

  • integrate Streamlit-barfi
  • report back from commands that have been started from the gui, so that success or failure will be visible in the gui

@sabinem sabinem changed the title Mongodb plus nicegui Draft: Mongodb plus nicegui Jan 29, 2024
@sabinem sabinem force-pushed the mongodb-plus-nicegui branch 2 times, most recently from 659b1ce to 52a147e Compare February 2, 2024 05:50
{sabine.maennel} added 5 commits February 6, 2024 11:23
BREAKING CHANGE: schema change for components
and versions:

* components store the repoLink and for their versions
the `versions` property is added, that contains a list
of versions

* versions get a `commitHash` property and `version`
is renamed to `odtp_version`

PREPARE FOR GUI: move logic into db functions
so that the logic is captured there and can be
used by both gui and cli

these functions are added in a new folder `mongodb`

the db access uses the `with` statements for the mongo
client because otherwise it is not possible to close
the mongo db connection

Some new db functions and cli commands are added as they will be
useful for the gui

the old db functions are kept so far, so that all other code
will still run: a clean up of the previous db handling will be
done at a later step

fix(mongodb/db.py): remove decorator import
the adaptation is not finished and tested yet
adaptation to the mongo db schema changes in component and version
the session state is stored in the directory `.nicegui`
@sabinem sabinem force-pushed the mongodb-plus-nicegui branch 3 times, most recently from cb1259a to f9610a9 Compare February 6, 2024 15:30
{sabine.maennel} added 2 commits February 7, 2024 06:08
component and version are always added together, so this should
also be done when entering them to the mongodb

add cli command to delete collections

adapt cli command to add component and version
nicegui offeres a better user experience with partial page
update instead of full page loads. Therefore it was decided
to switch from streamlit to nicegui for the UI

add command to start nicegui dashboard
@sabinem sabinem force-pushed the mongodb-plus-nicegui branch from f9610a9 to e60100f Compare February 7, 2024 05:09
{sabine.maennel} added 7 commits February 7, 2024 06:12
I had trouble to install the dev tools such as `black` with pdm
Therefore and because poetry is more standard I would stay with
poetry for now
an a mac with Apple Chip you need to change the default shell
before installing
the changelog should not be part of the Readme as the Readme
relates to the current state of the repo

the changelog is also an important document that should be easy
to find in the project folder
@sabinem sabinem changed the title Draft: Mongodb plus nicegui Mongodb plus nicegui Feb 7, 2024
{sabine.maennel} added 2 commits February 7, 2024 10:42
The UI will be rebuild with Nicegui and replace the Streamlit
UI, but the transition is not complete yet
@sabinem sabinem requested a review from caviri February 7, 2024 10:49
@sabinem sabinem merged commit bc83f28 into develop Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments