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

BHBC-2160: Decorate DWCA Occurrences with Decimal Lat/Long #919

Merged
merged 19 commits into from
Jan 26, 2023
Merged

Conversation

KjartanE
Copy link
Contributor

Overview

Links to Jira tickets

Description of relevant changes

  • {List all relevant changes, in particular anything that will help the reviewers test/verify this PR}

PR Checklist

A list of items that are good to consider when making any changes.

Note: this list is not exhaustive, and not all items are always applicable.

Code

  • New files/classes/functions have appropriately descriptive names and comment blocks to describe their use/behaviour
  • I have avoided duplicating code when possible, moving re-usable pieces into functions
  • I have avoided hard-coding values where possible and moved any re-usable constants to a constants file
  • My code is as flat as possible (avoids deeply nested if/else blocks, promise chains, etc)
  • My code changes account for null/undefined values and handle errors appropriately
  • My code uses types/interfaces to help describe values/parameters/etc, help ensure type safety, and improve readability

Style

  • My code follows the established style conventions
  • My code uses native material-ui components/icons/conventions when possible

Documentation

  • I have commented my code sufficiently, such that an unfamiliar developer could understand my code
  • I have added/updated README's and related documentation, as needed

Tests

  • I have added/updated unit tests for any code I've added/updated
  • I have added/updated the Postman requests/tests to account for any API endpoints I've added/updated

Linting/Formatting

  • I have run the linter and fixed any issues, as needed
    See the lint commands in package.json
  • I have run the formatter and fixed any issues, as needed
    See the format commands in package.json

SonarCloud

  • I have addressed all SonarCloud Bugs, Vulnerabilities, Security Hotspots, and Code Smells

@codecov
Copy link

codecov bot commented Jan 21, 2023

Codecov Report

Merging #919 (af1d5d9) into dev (c2ddb87) will increase coverage by 0.03%.
The diff coverage is 75.51%.

@@            Coverage Diff             @@
##              dev     #919      +/-   ##
==========================================
+ Coverage   65.67%   65.71%   +0.03%     
==========================================
  Files         351      351              
  Lines       11287    11324      +37     
  Branches     1952     1966      +14     
==========================================
+ Hits         7413     7441      +28     
- Misses       3479     3480       +1     
- Partials      395      403       +8     
Impacted Files Coverage Δ
api/src/repositories/occurrence-repository.ts 82.00% <ø> (ø)
app/src/utils/spatial-utils.tsx 18.51% <0.00%> (-0.35%) ⬇️
api/src/utils/spatial-utils.ts 69.44% <46.15%> (-5.56%) ⬇️
api/src/services/dwc-service.ts 89.79% <96.55%> (+4.08%) ⬆️
api/src/services/validation-service.ts 81.98% <100.00%> (+0.24%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@curtisupshall curtisupshall left a comment

Choose a reason for hiding this comment

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

Couple of comments but looks great! +1 for project + survey seeder 😊🙌

api/src/services/dwc-service.ts Outdated Show resolved Hide resolved
api/src/services/dwc-service.ts Show resolved Hide resolved
api/src/utils/spatial-utils.ts Outdated Show resolved Hide resolved
api/src/repositories/occurrence-repository.ts Outdated Show resolved Hide resolved
api/src/services/dwc-service.ts Outdated Show resolved Hide resolved
curtisupshall
curtisupshall previously approved these changes Jan 25, 2023
Copy link
Contributor

@curtisupshall curtisupshall left a comment

Choose a reason for hiding this comment

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

🥺

@anissa-agahchen
Copy link
Contributor

In testing locally, I see that the object is decorating correctly and will display correctly.

However on refresh, I get:
Screenshot 2023-01-25 at 12 12 19 PM
Screenshot 2023-01-25 at 12 12 26 PM

@anissa-agahchen
Copy link
Contributor

In testing locally, I see that the object is decorating correctly and will display correctly.

However on refresh, I get: Screenshot 2023-01-25 at 12 12 19 PM Screenshot 2023-01-25 at 12 12 26 PM

On further testing, it's because I had a record that didn't have either lat long or UTM ... will need to account for that in the back end

@KjartanE
Copy link
Contributor Author

In testing locally, I see that the object is decorating correctly and will display correctly.
However on refresh, I get: Screenshot 2023-01-25 at 12 12 19 PM Screenshot 2023-01-25 at 12 12 26 PM

On further testing, it's because I had a record that didn't have either lat long or UTM ... will need to account for that in the back end

Thank you, I figured if I covered possible outcome with the decoration this error would not happen. But to avoid possible bad states and to handle this error, I added extra check for the Lat, Long values before they are used to display a data point.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@KjartanE KjartanE merged commit 7e95183 into dev Jan 26, 2023
@KjartanE KjartanE deleted the BHBC-2160 branch January 26, 2023 22:00
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.

4 participants