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

[api] Add range of amounts (min, max) for feature per PU [MRXN23-444] #1551

Merged

Conversation

yulia-bel
Copy link
Contributor

@yulia-bel yulia-bel commented Oct 16, 2023

Add range of amounts (min, max) for feature

Overview

This PR adds 2 new columns to (apiDB).features table to store min and and amount values.
As agreed before, service (in GeoFeaturesServices) will retrieve values from (geoDB)puvspr_calculations table by featureId and save them to (apiDB).features table. the serviced will be reused for all feature types..

Tests updated accordingly and to be reviewed when implementing https://vizzuality.atlassian.net/browse/MRXN23-460 (currently null values are being saved)

Designs

Link to the related design prototypes (if applicable)

Testing instructions

Please explain how to test the PR: ID of a dataset, steps to reach the feature, etc.

Feature relevant tickets

Link to the related task manager tickets


Checklist before submitting

  • Meaningful commits and code rebased on develop.
  • If this PR adds feature that should be tested for regressions when
    deploying to staging/production, please add brief testing instructions
    to the deploy checklist (docs/deployment-checklist.md)
  • Update CHANGELOG file

@vercel
Copy link

vercel bot commented Oct 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marxan ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 20, 2023 9:04am

@yulia-bel yulia-bel force-pushed the feature/api/MRXN23-444-range-of-amount-for-feature-per-pu branch from b5ca654 to 9f2dcc1 Compare October 16, 2023 15:52
Copy link
Member

@hotzevzl hotzevzl left a comment

Choose a reason for hiding this comment

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

thanks @yulia-bel! just some performance notes to make sure things work smoothly irrespective(ish) of how many puvspr_records are in a given instance, for how many distinct feature_ids, and of how many features we want to set min/max for at once (through the new GeoFeaturesService.saveAmountRangeForFeatures() method)

@yulia-bel yulia-bel force-pushed the feature/api/MRXN23-444-range-of-amount-for-feature-per-pu branch from 0f1db02 to 7172b6a Compare October 19, 2023 11:04
@hotzevzl hotzevzl merged commit 29122bd into develop Oct 20, 2023
61 checks passed
@hotzevzl hotzevzl deleted the feature/api/MRXN23-444-range-of-amount-for-feature-per-pu branch October 20, 2023 09:05
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