Skip to content

fix: Type error in GCBM API causes (fatal) - main(306) - Value too large. error. #197

Open
Freeman-kuch wants to merge 14 commits into
moja-global:masterfrom
Freeman-kuch:fix/main_306
Open

fix: Type error in GCBM API causes (fatal) - main(306) - Value too large. error. #197
Freeman-kuch wants to merge 14 commits into
moja-global:masterfrom
Freeman-kuch:fix/main_306

Conversation

@Freeman-kuch
Copy link
Copy Markdown

Pull Request Template

Description

When /dynamic endpoint is visited during simulation, it raises Type error in GCBM API causes (fatal) - main(306) - Value too large. error with config files

Fixes #136

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I tested locally using Postman and added the necessary config files in GCBM_New_Demo_Run. The simulation did run and didn't raise further errors.

fix

...

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.

dictionary["layer_type"] = "GridLayer"
dictionary["layer_data"] = "Int16"
dictionary["nodata"] = nodatam[1]
dictionary["nodata"] = 32767
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Namyalg @Janvi-Thakkar @SanjaySinghRajpoot @YashKandalkar - what do you think of this solution?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think, as a temporary fix, we can probably go ahead with this

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We might also need a comment explaining this temporary solution, so that other contributors know why the hard coded value is there.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Freeman-kuch - can you please add documentation to this patch? Using a hard coded number is not a good long term solution, but it will do for now.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@aornugent I'm not so sure i understand what you mean about adding documentation, can you help out ?

Copy link
Copy Markdown
Contributor

@aornugent aornugent Dec 20, 2022

Choose a reason for hiding this comment

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

I mean leaving a comment in the code to explain your change. Without documentation it's hard for others to understand why this value is set.

Maybe something like:

# FIXME: hard coded nodata value is a temporary solution, 
but should instead come from the input data source. 

@aornugent aornugent requested a review from Namyalg October 16, 2022 02:58
Copy link
Copy Markdown
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.

Yes, I think we can add a comment and add the link to the issue, so the problem becomes clear

Copy link
Copy Markdown
Member

@HarshCasper HarshCasper left a comment

Choose a reason for hiding this comment

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

Please run black and flake8 on your code and fix all formatting/style issues.

@Freeman-kuch
Copy link
Copy Markdown
Author

Freeman-kuch commented Oct 16, 2022

Please run black and flake8 on your code and fix all formatting/style issues.

I did Run both and no issue was raised

khanjasir90 and others added 11 commits October 20, 2022 13:00
…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: olalekan temitayo <olalekantemitayo7@gmail.com>

Signed-off-by: olalekan temitayo <olalekantemitayo7@gmail.com>
Signed-off-by: Freeman <freemanoparaocha@gmail.com>
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.

Type error in GCBM API causes (fatal) - main(306) - Value too large. error.

9 participants