Skip to content

refactor and feat: Add parsing ability for NOMAD datafiles and breakout tests in test_pdf.py into respective files - #207

Merged
sbillinge merged 7 commits into
diffpy:mainfrom
cadenmyers13:test-refactor
Aug 14, 2026
Merged

refactor and feat: Add parsing ability for NOMAD datafiles and breakout tests in test_pdf.py into respective files#207
sbillinge merged 7 commits into
diffpy:mainfrom
cadenmyers13:test-refactor

Conversation

@cadenmyers13

Copy link
Copy Markdown
Contributor

closes #206

All testing for the pdf module was in a singular function called test_pdf.py. This breaks out the test into their respective files. I Also reorganized where some deprecated functions were located within the file to help with removal of these tests later.

Comment thread tests/test_pdfparser.py
# free-text instrument comment.
# Expected: The comment yields the neutron scattering type
# and the qmax, qdamp, and qbroad resolution parameters.
(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Below is the only new thing added. Everything else is just reorganization.

@@ -0,0 +1,15 @@
# 5000

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Also new testdata file

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.05882% with 95 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.40%. Comparing base (a9eae82) to head (4d7cbfd).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
tests/test_pdfcontribution.py 39.02% 50 Missing ⚠️
tests/test_pdfgenerator.py 16.66% 45 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #207       +/-   ##
===========================================
+ Coverage   71.63%   82.40%   +10.77%     
===========================================
  Files          25       27        +2     
  Lines        3437     4103      +666     
===========================================
+ Hits         2462     3381      +919     
+ Misses        975      722      -253     
Files with missing lines Coverage Δ
tests/test_constraint.py 98.30% <100.00%> (+1.33%) ⬆️
tests/test_fitrecipe.py 99.86% <100.00%> (+0.09%) ⬆️
tests/test_parameterset.py 96.96% <100.00%> (+2.23%) ⬆️
tests/test_pdfparser.py 100.00% <100.00%> (ø)
tests/test_profile.py 99.55% <100.00%> (+0.21%) ⬆️
tests/test_recipeorganizer.py 99.53% <100.00%> (-0.16%) ⬇️
tests/test_pdfgenerator.py 16.66% <16.66%> (ø)
tests/test_pdfcontribution.py 39.02% <39.02%> (ø)

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cadenmyers13

Copy link
Copy Markdown
Contributor Author

@sbillinge ready for review. Shall we do a patch release? This is essentially a bug fix

@sbillinge
sbillinge merged commit 1784d8d into diffpy:main Aug 14, 2026
7 checks passed
@cadenmyers13
cadenmyers13 deleted the test-refactor branch August 14, 2026 19:58
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.

fix: New PDFParser cannot parse PDF data from the NOMAD pdf file

2 participants