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 methods for handling JSON #33

Merged
merged 7 commits into from
Sep 15, 2023
Merged

Add methods for handling JSON #33

merged 7 commits into from
Sep 15, 2023

Conversation

kaitj
Copy link
Contributor

@kaitj kaitj commented Sep 8, 2023

Proposed changes
Closes #17 by adding in the necessary methods and tests for handling JSON associated fiducials. Also took the opportunity to update some existing docstrings and names of fcsv associated tests.

NOTE: This one should be reviewed and merged after #37, as it has been rebased to account for the coordinate system conventions

Types of changes
What types of changes does your code introduce? Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (if none of the other choices apply)

Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you are unsure about any of the choices, don't hesitate to ask!

  • Changes have been tested to ensure that fix is effective or that a feature works.
  • Changes pass the unit tests
  • Code has been run through the poe quality task
  • I have included necessary documentation or comments (as necessary)
  • Any dependent changes have been merged and published

Notes
All PRs will undergo the unit testing before being reviewed. You may be requested to explain or make additional changes before the PR is accepted.

@kaitj kaitj added the enhancement New feature or request label Sep 8, 2023
@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

Merging #33 (493b886) into main (bc78f40) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##              main       #33    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files            8         9     +1     
  Lines          530       656   +126     
==========================================
+ Hits           530       656   +126     
Components Coverage Δ
afids_utils/afids.py ∅ <ø> (∅)
afids_utils/ext 100.00% <100.00%> (ø)
afids_utils/transforms.py 100.00% <ø> (ø)

) -> tuple[str, str]:
"""Internal function to extract metadata from json files

Note: Slicer version is not currently included in the json file
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: This is perhaps another argument for dropping slicer_version from AfidSet

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I agree - if we end up dropping this, I would prefer to do it in a separate PR

Copy link
Contributor

@tkkuehn tkkuehn left a comment

Choose a reason for hiding this comment

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

A couple of pretty minor things -- this largely looks good

afids_utils/ext/json.py Outdated Show resolved Hide resolved
afids_utils/ext/json.py Outdated Show resolved Hide resolved
afids_utils/ext/json.py Outdated Show resolved Hide resolved
afids_utils/ext/json.py Outdated Show resolved Hide resolved
afids_utils/tests/test_afids.py Outdated Show resolved Hide resolved
afids_utils/tests/test_ext.py Outdated Show resolved Hide resolved
Currently returning the slicer_version as "unknown" as the version is
not currently specified in the .json file outputted from the slicer
markup json.
@kaitj kaitj requested a review from tkkuehn September 15, 2023 15:13
Copy link
Contributor

@tkkuehn tkkuehn left a comment

Choose a reason for hiding this comment

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

One adjustment to the type hints then feel free to merge

afids_utils/ext/json.py Outdated Show resolved Hide resolved
@kaitj kaitj merged commit d5f8447 into afids:main Sep 15, 2023
8 checks passed
@kaitj kaitj deleted the enh/json branch September 15, 2023 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ENH] JSON AFIDs handling
2 participants