Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: GCBM Refactor Idea Draft #206

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

Freeman-kuch
Copy link

@Freeman-kuch Freeman-kuch commented Oct 27, 2022

Pull Request Template

Description

flint-UI has plans to separate the "/upload" endpoint into different endpoints depending on the category of config input. so endpoints like

  • "/gcbm/upload/disturbances"
  • "/gcbm/upload/classifiers"
  • "/gcbm/upload/miscellaneous"
  • "/gcbm/upload/db"
  • "/upload/title" (this sort of is likened to the "/create" endpoint which creates a new simulation and assigns a name to the simulation from user input)
  • A separate endpoint to Run the simulation would also be used instead of "/dynamic"(might get deprecated). The endpoint would just run the simulation after the necessary configs have been set

All these would be used instead of the all-purpose "/upload" and "/dynamic" endpoints

Fixes #205

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

I tested these new features locally using Postman without a Docker container and successfully created a simulation and uploaded the different config files and variables(attributes)
@SanjaySinghRajpoot,
@Namyalg,
@HarshCasper ,
@aornugent ,
@Dabjazz.
...

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • I have tagged the reviewers in a comment below incase my pull request is ready for a review
  • I have signed the commit message to agree to Developer Certificate of Origin (DCO) (to certify that you wrote or otherwise have the right to submit your contribution to the project.) by adding "--signoff" to my git commit command.

radistoubalidis and others added 20 commits October 28, 2022 00:57
* reproduce FLINT.Cloud apis

* example sim report using cml

* Update cml-report.yml

* Update cml-report.yml

* Update cml-report.yml

* Update cml-report.yml

* test if cml is setup right

* add cml script

* changed file paths to not show local directories

* update cml report

* setup GCBM summary

* setup GCBM summary

* setup GCBM summary

* setup GCBM summary

* setup GCBM summary

* setup GCBM summary

* setup GCBM summary

* setup GCBM summary

* update python script

* run model summary

* add sim start and end dates

* delete irrelevant files

* convert annual_summaries.py to py:percent format

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* converts and run annual_summaries.py as notebook usinng jupytext

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (try 4)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (try 5)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (fixed typo on 5, try 6)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (fixed typo on 7)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (try 8)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (try 9)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (try 10)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (try 11)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (try 12)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* check why cml comment is 404 not found

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* uncomment labeling filter

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* adds --uptate option to cml send-comment command

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test cml action with --update

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test cml action with --update

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test action with GITHUB_SHA var

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test action with GITHUB_SHA var (fix typo)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test cml action without --pr option

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* run workflow only on labels

* reproduce FLINT.Cloud apis

* example sim report using cml

* Update cml-report.yml

* Update cml-report.yml

* Update cml-report.yml

* Update cml-report.yml

* test if cml is setup right

* add cml script

* changed file paths to not show local directories

* update cml report

* setup GCBM summary

* setup GCBM summary

* setup GCBM summary

* setup GCBM summary

* setup GCBM summary

* setup GCBM summary

* setup GCBM summary

* setup GCBM summary

* update python script

* run model summary

* add sim start and end dates

* delete irrelevant files

* convert annual_summaries.py to py:percent format

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* converts and run annual_summaries.py as notebook usinng jupytext

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (try 4)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (try 5)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (fixed typo on 5, try 6)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (fixed typo on 7)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (try 8)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (try 9)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (try 10)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (try 11)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test if action works with jupytext (try 12)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* check why cml comment is 404 not found

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* uncomment labeling filter

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* adds --uptate option to cml send-comment command

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test cml action with --update

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test cml action with --update

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test action with GITHUB_SHA var

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test action with GITHUB_SHA var (fix typo)

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* test cml action without --pr option

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>

* run workflow only on labels

* fix lint

Signed-off-by: radis toubalidis <rtoumpalidis@gmail.com>
Co-authored-by: HarshCasper <erbeusgriffincasper@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
…oja-global#181)

* refactor: moved get_config_templates, get_modules_cbm_config, get_provider_config to preprocess.py file

Signed-off-by: khanjasir90 <khanmohdjasir@gmail.com>

* app.py and preprocess.py linted

Signed-off-by: khanjasir90 <khanmohdjasir@gmail.com>

Signed-off-by: khanjasir90 <khanmohdjasir@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
…cs (moja-global#164)

* feat: added fluro and GCBM dev docs

Signed-off-by: SanjaySinghRajpoot <iamsanjayrajpoot@gmail.com>

* chores: furo added to requirements

Signed-off-by: SanjaySinghRajpoot <iamsanjayrajpoot@gmail.com>

* chores: restructed Deployment docs

Signed-off-by: SanjaySinghRajpoot <iamsanjayrajpoot@gmail.com>

Signed-off-by: SanjaySinghRajpoot <iamsanjayrajpoot@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
* feat: autoapi implemented

* chore: autoapi added to requirements

Signed-off-by: SanjaySinghRajpoot <iamsanjayrajpoot@gmail.com>

* CI fix

Signed-off-by: SanjaySinghRajpoot <iamsanjayrajpoot@gmail.com>

Signed-off-by: SanjaySinghRajpoot <iamsanjayrajpoot@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
docs: Add expected response codes on sucess to the GCBM docs

Adds response codes to the GCBM curl documentation. Also changes
the format of the document to be more navigable.

Signed-off-by: Amit <amitkulkarni2028@gmail.com>

Signed-off-by: Amit <amitkulkarni2028@gmail.com>
Co-authored-by: Namya LG <53875297+Namyalg@users.noreply.github.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
…lobal#185)

* feat: added endpoint to return .json for the input .tiff file

Signed-off-by: khanjasir90 <khanmohdjasir@gmail.com>

* feat: updated endpoint with specified changes and some constraints

Signed-off-by: khanjasir90 <khanmohdjasir@gmail.com>

* feat: formatted code with black

Signed-off-by: khanjasir90 <khanmohdjasir@gmail.com>

* updated minor typos

Signed-off-by: khanjasir90 <khanmohdjasir@gmail.com>

Signed-off-by: khanjasir90 <khanmohdjasir@gmail.com>
Co-authored-by: Namya LG <53875297+Namyalg@users.noreply.github.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
* feat: updated curl cmds

Signed-off-by: SanjaySinghRajpoot <iamsanjayrajpoot@gmail.com>

* db added and doc formated

Signed-off-by: SanjaySinghRajpoot <iamsanjayrajpoot@gmail.com>

* example text fixed

Signed-off-by: SanjaySinghRajpoot <iamsanjayrajpoot@gmail.com>

Signed-off-by: SanjaySinghRajpoot <iamsanjayrajpoot@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
…of rest api gcbm (moja-global#195)

Signed-off-by: olalekan temitayo <olalekantemitayo7@gmail.com>

Signed-off-by: olalekan temitayo <olalekantemitayo7@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* changed the endpoint name

* Update app.py

* Update README.md

Co-authored-by: Harsh Mishra <erbeusgriffincasper@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
Signed-off-by: olalekan temitayo <olalekantemitayo7@gmail.com>

Signed-off-by: olalekan temitayo <olalekantemitayo7@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
Signed-off-by: Clinton Mekwunye <mekwunyeclinton22@gmail.com>

Signed-off-by: Clinton Mekwunye <mekwunyeclinton22@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
@aornugent
Copy link
Contributor

@Namyalg - do you have time to read through this PR?

@Freeman-kuch - I've taken a quick look and it seems to be structured in a nicely modular way. You'll need to add more documentation to help us understand your design choices.

Thanks for the contribution!

This was referenced Dec 20, 2022
Copy link
Member

@Namyalg Namyalg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The design is modular and is in line with what we had discussed. I see @Freeman-kuch has extended Ankita's implementation.
With respect to the file preprocess.py , can we eliminate the assignment of hardcoded values? If we are to use this for a new set of inputs is there a way of generalising the values?

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.

GCBM Refactor idea Draft
10 participants