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 <[email protected]>

* converts and run annual_summaries.py as notebook usinng jupytext

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext (try 4)

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext (try 5)

Signed-off-by: radis toubalidis <[email protected]>

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

Signed-off-by: radis toubalidis <[email protected]>

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

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext (try 8)

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext (try 9)

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext (try 10)

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext (try 11)

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext (try 12)

Signed-off-by: radis toubalidis <[email protected]>

* check why cml comment is 404 not found

Signed-off-by: radis toubalidis <[email protected]>

* uncomment labeling filter

Signed-off-by: radis toubalidis <[email protected]>

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

Signed-off-by: radis toubalidis <[email protected]>

* test cml action with --update

Signed-off-by: radis toubalidis <[email protected]>

* test cml action with --update

Signed-off-by: radis toubalidis <[email protected]>

* test action with GITHUB_SHA var

Signed-off-by: radis toubalidis <[email protected]>

* test action with GITHUB_SHA var (fix typo)

Signed-off-by: radis toubalidis <[email protected]>

* test cml action without --pr option

Signed-off-by: radis toubalidis <[email protected]>

* 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 <[email protected]>

* converts and run annual_summaries.py as notebook usinng jupytext

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext (try 4)

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext (try 5)

Signed-off-by: radis toubalidis <[email protected]>

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

Signed-off-by: radis toubalidis <[email protected]>

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

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext (try 8)

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext (try 9)

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext (try 10)

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext (try 11)

Signed-off-by: radis toubalidis <[email protected]>

* test if action works with jupytext (try 12)

Signed-off-by: radis toubalidis <[email protected]>

* check why cml comment is 404 not found

Signed-off-by: radis toubalidis <[email protected]>

* uncomment labeling filter

Signed-off-by: radis toubalidis <[email protected]>

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

Signed-off-by: radis toubalidis <[email protected]>

* test cml action with --update

Signed-off-by: radis toubalidis <[email protected]>

* test cml action with --update

Signed-off-by: radis toubalidis <[email protected]>

* test action with GITHUB_SHA var

Signed-off-by: radis toubalidis <[email protected]>

* test action with GITHUB_SHA var (fix typo)

Signed-off-by: radis toubalidis <[email protected]>

* test cml action without --pr option

Signed-off-by: radis toubalidis <[email protected]>

* run workflow only on labels

* fix lint

Signed-off-by: radis toubalidis <[email protected]>
Co-authored-by: HarshCasper <[email protected]>
Signed-off-by: Freeman <[email protected]>
…oja-global#181)

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

Signed-off-by: khanjasir90 <[email protected]>

* app.py and preprocess.py linted

Signed-off-by: khanjasir90 <[email protected]>

Signed-off-by: khanjasir90 <[email protected]>
Signed-off-by: Freeman <[email protected]>
…cs (moja-global#164)

* feat: added fluro and GCBM dev docs

Signed-off-by: SanjaySinghRajpoot <[email protected]>

* chores: furo added to requirements

Signed-off-by: SanjaySinghRajpoot <[email protected]>

* chores: restructed Deployment docs

Signed-off-by: SanjaySinghRajpoot <[email protected]>

Signed-off-by: SanjaySinghRajpoot <[email protected]>
Signed-off-by: Freeman <[email protected]>
* feat: autoapi implemented

* chore: autoapi added to requirements

Signed-off-by: SanjaySinghRajpoot <[email protected]>

* CI fix

Signed-off-by: SanjaySinghRajpoot <[email protected]>

Signed-off-by: SanjaySinghRajpoot <[email protected]>
Signed-off-by: Freeman <[email protected]>
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 <[email protected]>

Signed-off-by: Amit <[email protected]>
Co-authored-by: Namya LG <[email protected]>
Signed-off-by: Freeman <[email protected]>
…lobal#185)

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

Signed-off-by: khanjasir90 <[email protected]>

* feat: updated endpoint with specified changes and some constraints

Signed-off-by: khanjasir90 <[email protected]>

* feat: formatted code with black

Signed-off-by: khanjasir90 <[email protected]>

* updated minor typos

Signed-off-by: khanjasir90 <[email protected]>

Signed-off-by: khanjasir90 <[email protected]>
Co-authored-by: Namya LG <[email protected]>
Signed-off-by: Freeman <[email protected]>
* feat: updated curl cmds

Signed-off-by: SanjaySinghRajpoot <[email protected]>

* db added and doc formated

Signed-off-by: SanjaySinghRajpoot <[email protected]>

* example text fixed

Signed-off-by: SanjaySinghRajpoot <[email protected]>

Signed-off-by: SanjaySinghRajpoot <[email protected]>
Signed-off-by: Freeman <[email protected]>
…of rest api gcbm (moja-global#195)

Signed-off-by: olalekan temitayo <[email protected]>

Signed-off-by: olalekan temitayo <[email protected]>
Signed-off-by: Freeman <[email protected]>
* 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 <[email protected]>
Signed-off-by: Freeman <[email protected]>
Signed-off-by: olalekan temitayo <[email protected]>

Signed-off-by: olalekan temitayo <[email protected]>
Signed-off-by: Freeman <[email protected]>
Signed-off-by: Clinton Mekwunye <[email protected]>

Signed-off-by: Clinton Mekwunye <[email protected]>
Signed-off-by: Freeman <[email protected]>
@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