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

fix: unit tests and slight refactor #877

Merged
merged 9 commits into from
Apr 4, 2024
Merged

Conversation

kaloster
Copy link
Contributor

@kaloster kaloster commented Apr 4, 2024

Added 2 unit tests:

test_uns_no_metadata_get - for dataset without uns array or spatial
test_uns_metadata_get - for dataset with uns array and spatial

Slight refactor to extract metadata helper functions to a dedicated utils file

Copy link

codecov bot commented Apr 4, 2024

Codecov Report

Attention: Patch coverage is 94.87179% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 77.27%. Comparing base (ffd7281) to head (b095100).

Files Patch % Lines
server/common/utils/uns.py 93.10% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #877      +/-   ##
==========================================
+ Coverage   76.58%   77.27%   +0.69%     
==========================================
  Files          88       90       +2     
  Lines        7020     7024       +4     
==========================================
+ Hits         5376     5428      +52     
+ Misses       1644     1596      -48     
Flag Coverage Δ
frontend 77.27% <94.87%> (+0.69%) ⬆️
javascript 77.27% <94.87%> (+0.69%) ⬆️
unitTest 77.27% <94.87%> (+0.69%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@kaloster kaloster marked this pull request as ready for review April 4, 2024 12:41
@kaloster kaloster requested a review from tihuan April 4, 2024 12:42
Copy link
Contributor

@tihuan tihuan left a comment

Choose a reason for hiding this comment

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

Thanks so much for adding the tests, Ronen! Some discussion comments PTAL thank you!

server/tests/__init__.py Show resolved Hide resolved
server/tests/unit/common/apis/test_api_v3.py Outdated Show resolved Hide resolved
Copy link
Contributor

@tihuan tihuan left a comment

Choose a reason for hiding this comment

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

Fantastic work, @kaloster 🙏 🔥 !! Thanks so much for the thorough tests!!

@kaloster kaloster merged commit 2a3b298 into main Apr 4, 2024
7 checks passed
@kaloster kaloster deleted the kaloster/test-spatial-response branch April 4, 2024 19:02
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