Skip to content

Always attempt to assign coordinates when decoding#24

Merged
JamesMcClung merged 4 commits intopsc-code:mainfrom
JamesMcClung:always-assign-coordinates
Apr 14, 2025
Merged

Always attempt to assign coordinates when decoding#24
JamesMcClung merged 4 commits intopsc-code:mainfrom
JamesMcClung:always-assign-coordinates

Conversation

@JamesMcClung
Copy link
Collaborator

Previously, length had to be passed to decode_psc for coordinates to be assigned, even if the dataset had a length attribute. Now, decode_psc will always attempt to assign coordinates, and an error is thrown if no length (or corner) was given or present.

Also, ignore RET504, which came up after the above change. I don't like RET504 for 2 reasons:

  1. naming quantities improves code readability
  2. even if the variable isn't used now, it might be in the future, and the diff is nicer this way

before, even if length was present, it had to be manually passed to get coords
I don't like RET504 for 2 reasons:
1. naming quantities improves code readability
2. even if the variable isn't used now, it might be in the future, and the diff is nicer this way
@codecov
Copy link

codecov bot commented Apr 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
src/pscpy/psc.py 98.24% <100.00%> (+0.16%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JamesMcClung JamesMcClung merged commit 88a4c74 into psc-code:main Apr 14, 2025
4 checks passed
@JamesMcClung JamesMcClung deleted the always-assign-coordinates branch April 14, 2025 14:47
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