Skip to content

Conversation

@Sparks29032
Copy link
Collaborator

Closes #210.

The --smear-pdf option first converts the PDF to an RDF before applying the smear. The --smear option does not do such transformation. If both are enabled, the --smear-pdf option takes precedence.

@codecov
Copy link

codecov bot commented Jun 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.44%. Comparing base (ea41b24) to head (69d45ee).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #220      +/-   ##
==========================================
+ Coverage   97.36%   97.44%   +0.08%     
==========================================
  Files          20       20              
  Lines         947      978      +31     
==========================================
+ Hits          922      953      +31     
  Misses         25       25              
Files with missing lines Coverage Δ
tests/test_morphapp.py 99.26% <100.00%> (+0.21%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sbillinge
Copy link
Contributor

@Sparks29032 I am afraid this one has a conflict.

@Sparks29032
Copy link
Collaborator Author

@Sparks29032 I am afraid this one has a conflict.

Ah, probably from me fixing a typo on another PR. Should be resolved now.

[
"--smear",
"100",
"--smear-pdf",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This code block also tests the default behavior if a user inputs both morphs. The pdf smear takes precedence.

@sbillinge sbillinge merged commit a8f53ae into diffpy:main Jun 24, 2025
5 checks passed
@sbillinge
Copy link
Contributor

I am merging this. I had one comment which is to please make all new tests as pytest tests, not unittest tests. We would gradually over time like to migrate back to pytest tests entirely, but at least, let's not make new unittest tests.

@Sparks29032
Copy link
Collaborator Author

Sparks29032 commented Jun 24, 2025

Thanks for merging! I thought these tests were already migrated from unittest to Pytest in #83. These tests seem to follow the Pytest documentation.

@sbillinge
Copy link
Contributor

Thanks for merging! I thought these tests were already migrated from unittest to Pytest in #83. These tests seem to follow the Pytest documentation.

maybe I didn't check well enough. It looked as if it was indented and part of a class and not a standalone function.

@Sparks29032
Copy link
Collaborator Author

Sparks29032 commented Jun 24, 2025

They are classes, but I thought this is supported and encouraged by https://docs.pytest.org/en/stable/getting-started.html. I think I need the python tests presentation lol.

@sbillinge
Copy link
Contributor

They are classes, but I thought this is supported and encouraged by https://docs.pytest.org/en/stable/getting-started.html. I think I need the python tests presentation lol.

Ah, I see. I don't really see any benefit unless tests are sharing a bunch of code or marks, but mostly I just assumed they were unittest tests (which are typically the only tests we write in classes.....)

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.

Remove PDF-dependence on smear morph

2 participants