Skip to content

Explicitly check for "EN" at end of .ori files#533

Open
jdbuhler wants to merge 2 commits intocositools:developfrom
McKelvey-Engineering-CSE:sh_ori_fix
Open

Explicitly check for "EN" at end of .ori files#533
jdbuhler wants to merge 2 commits intocositools:developfrom
McKelvey-Engineering-CSE:sh_ori_fix

Conversation

@jdbuhler
Copy link
Contributor

@jdbuhler jdbuhler commented Mar 21, 2026

MEGAlib .ori files end with the tag "EN" on a line by itself. This tag is removed when the file is read in. Recently, we discovered that some .ori files in cosipy were missing that terminal EN; those files were fixed, but we still need to properly detect the missing EN.

This patch chooses to reject files without the terminal EN, rather than attempt to work around them, because trying to "do the right thing" would need to handle all sorts of cases. For example, there might be multiple lines of garbage at the end of the file.

This PR is intended to supersede #516.

Since I was editing this file anyway, I also included a one-line fix for issue #527 with a suitable test case.

  an error otherwise
* Fix for issue cositools#527 -- undefined var in get_exposure
@codecov
Copy link

codecov bot commented Mar 21, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.74%. Comparing base (0d7d6d6) to head (3c220e3).

Files with missing lines Patch % Lines
cosipy/spacecraftfile/spacecraft_file.py 85.71% 1 Missing ⚠️
Files with missing lines Coverage Δ
cosipy/spacecraftfile/spacecraft_file.py 84.23% <85.71%> (+0.50%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant