Skip to content

381 apitest hygiene#384

Merged
rozyczko merged 3 commits into
developfrom
381-apitest-hygiene
Jul 24, 2026
Merged

381 apitest hygiene#384
rozyczko merged 3 commits into
developfrom
381-apitest-hygiene

Conversation

@rozyczko

Copy link
Copy Markdown
Member

This pull request includes several improvements and fixes across the codebase, primarily focused on correcting a misspelled method name, improving code clarity and maintainability, and refining documentation and type annotations. The most significant change is the consistent renaming of the reflectity_profile method to reflectivity_profile throughout the code and documentation, which resolves a typo and improves code readability. Additional changes include improvements to material handling in Project, better type handling and documentation, and minor code cleanups.

Method Renaming and Consistency

  • Renamed the method reflectity_profile to reflectivity_profile in calculator_base.py and updated all references throughout the codebase and tutorials to use the correct spelling. This change ensures consistency and prevents confusion or errors due to the previous typo.

Project Material Handling Improvements

  • Refactored material index retrieval in Project by introducing a helper method _get_or_add_material_index, reducing code duplication and improving maintainability. The methods get_index_air, get_index_si, get_index_sio2, and get_index_d2o now use this helper.
  • Minor cleanups in Project: removed a stray pass statement and improved the way the minimizer is serialized to avoid unwanted side effects.

Type and Interface Improvements

  • Changed the ResolutionFunction base class to inherit from ABC (Abstract Base Class), clarifying its intended use as an interface.
  • Improved the add_assemblies method in Model to accept a variable number of BaseAssembly arguments directly, rather than requiring a list, making the API more Pythonic and user-friendly.

Limits Handling and Documentation

  • Enhanced _apply_percentage_limits in limits.py to correctly set bounds for negative parameter values and clarified the docstring. This prevents incorrect bounds when parameter values are negative.

Minor Cleanups and Documentation

  • Removed the unused _flatten_list function from fitting.py to reduce dead code.
  • Improved formatting in documentation and configuration files for clarity, such as in CONTRIBUTING.md and mkdocs.yml.

@rozyczko rozyczko added [scope] bug Bug report or fix (major.minor.PATCH) bugfix Fix to known bug [priority] high Should be prioritized soon labels Jul 22, 2026
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (a472411) to head (81b9f5a).

Files with missing lines Patch % Lines
src/easyreflectometry/project.py 0.00% 13 Missing ⚠️
...etry/sample/elements/materials/material_mixture.py 0.00% 4 Missing ⚠️
src/easyreflectometry/limits.py 0.00% 3 Missing ⚠️
...rc/easyreflectometry/model/resolution_functions.py 0.00% 2 Missing ⚠️
...c/easyreflectometry/calculators/calculator_base.py 0.00% 1 Missing ⚠️
src/easyreflectometry/calculators/factory.py 0.00% 1 Missing ⚠️
src/easyreflectometry/model/model.py 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop    #384   +/-   ##
=======================================
  Coverage     0.00%   0.00%           
=======================================
  Files           42      42           
  Lines         3578    3573    -5     
=======================================
+ Misses        3578    3573    -5     
Flag Coverage Δ
integration 0.00% <0.00%> (ø)
unittests 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/easyreflectometry/fitting.py 0.00% <ø> (ø)
...c/easyreflectometry/calculators/calculator_base.py 0.00% <0.00%> (ø)
src/easyreflectometry/calculators/factory.py 0.00% <0.00%> (ø)
src/easyreflectometry/model/model.py 0.00% <0.00%> (ø)
...rc/easyreflectometry/model/resolution_functions.py 0.00% <0.00%> (ø)
src/easyreflectometry/limits.py 0.00% <0.00%> (ø)
...etry/sample/elements/materials/material_mixture.py 0.00% <0.00%> (ø)
src/easyreflectometry/project.py 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rozyczko
rozyczko merged commit 5e14e7f into develop Jul 24, 2026
54 of 60 checks passed
@rozyczko
rozyczko deleted the 381-apitest-hygiene branch July 24, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fix to known bug [priority] high Should be prioritized soon [scope] bug Bug report or fix (major.minor.PATCH)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant