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

Add Sign Field to Observation Subcounts #1354

Merged
merged 10 commits into from
Sep 10, 2024
Merged

Add Sign Field to Observation Subcounts #1354

merged 10 commits into from
Sep 10, 2024

Conversation

mauberti-bc
Copy link
Collaborator

Links to Jira Tickets

  • N/A

Description of Changes

  • Adds "observation_subcount_sign" to the observations table (the database field was added in an previous migration)
  • Includes "sign" as a supported column in the observation CSV validator

Testing Notes

  • Should be able to import observations from a csv file with a "Sign" column, and add observations with a sign value manually.

Copy link

codecov bot commented Aug 28, 2024

Codecov Report

Attention: Patch coverage is 31.53153% with 76 lines in your changes missing coverage. Please review.

Project coverage is 48.34%. Comparing base (407efe1) to head (d96dbf4).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
api/src/services/observation-service.ts 5.66% 50 Missing ⚠️
...ies/observation-subcount-environment-repository.ts 0.00% 8 Missing ⚠️
.../observations-table/ObservationsTableContainer.tsx 0.00% 6 Missing ⚠️
.../grid-column-definitions/GridColumnDefinitions.tsx 16.66% 5 Missing ⚠️
...rvices/observation-subcount-environment-service.ts 0.00% 4 Missing ⚠️
api/src/paths/reference/search/environment.ts 0.00% 1 Missing ⚠️
api/src/utils/xlsx-utils/worksheet-utils.ts 50.00% 1 Missing ⚠️
...tions/sampling-sites/SamplingSiteListContainer.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1354      +/-   ##
==========================================
+ Coverage   46.32%   48.34%   +2.02%     
==========================================
  Files         762      763       +1     
  Lines       20410    20498      +88     
  Branches     3121     3134      +13     
==========================================
+ Hits         9454     9909     +455     
- Misses      10378    10437      +59     
+ Partials      578      152     -426     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mauberti-bc mauberti-bc added the Ready For Review PR is ready for review label Aug 28, 2024
@NickPhura NickPhura marked this pull request as ready for review September 6, 2024 19:12
@NickPhura
Copy link
Collaborator

@mauberti-bc Minor: Is there a description for the observation sign column?
In GridColumnDefinitions.tsx -> ObservationSubcountSignColDef

@mauberti-bc
Copy link
Collaborator Author

@mauberti-bc Minor: Is there a description for the observation sign column? In GridColumnDefinitions.tsx -> ObservationSubcountSignColDef

Good catch: "The observed evidence of the species"

Add manual observation environment column validation.
Fix sql bug preventing any quantitatitve environments from being returned in the search results.
Fix missing openapi quantitative field.
Fix frontend quantitative type.
@NickPhura
Copy link
Collaborator

@mauberti-bc

Added backend validation for the sign field when importing a csv.

Added some missing backend validation for manual observation records (we weren't validating environment columns before).

I also fixed a bug that prevented quantitative environment fields from being returned in the search (when adding columns to the observation table).

I believe everything is working as expected, but if you have time to give it a quick manual test as well, that would be valuable.

@mauberti-bc
Copy link
Collaborator Author

@mauberti-bc

Added backend validation for the sign field when importing a csv.

Added some missing backend validation for manual observation records (we weren't validating environment columns before).

I also fixed a bug that prevented quantitative environment fields from being returned in the search (when adding columns to the observation table).

I believe everything is working as expected, but if you have time to give it a quick manual test as well, that would be valuable.

Awesome. I'll test it now

Copy link

Copy link
Collaborator

@NickPhura NickPhura left a comment

Choose a reason for hiding this comment

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

🦌

@mauberti-bc mauberti-bc merged commit 0d0f2f2 into dev Sep 10, 2024
21 of 22 checks passed
@mauberti-bc mauberti-bc deleted the observation-sign branch September 10, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants