8000 refactor: public names for the helpers other modules import by rafatahmed · Pull Request #328 · rafatahmed/Flahax · GitHub
[go: up one dir, main page]

Skip to content

refactor: public names for the helpers other modules import - #328

Merged
rafatahmed merged 2 commits into
mainfrom
refactor/public-helper-names
Nov 26, 2026
Merged

rafatahmed merged 2 commits into
mainfrom
refactor/public-helper-names

Conversation

@rafatahmed
Copy link
Copy Markdown
Owner

Closes #327.

Sixteen helpers that other modules imported through a leading underscore are renamed without it, each kept in its own module: canonical_result.digest and package_sources; engine.recipe_report, diagnose, charge_report, provenance and lstsq; ph_adjustment.blend_recipe and judge_candidate; stock_evidence.check_record, required_text and within_bound; evaluated_remedies.weighed_recommendation; joint_problem.profile_doses; product_conversion.check_materials; ratio_products.product_sources. The ones without a docstring gain a one-line one (the repo requires it on public functions).

  • A pure rename: no logic, output or error changes. Nothing is newly exported from flahax; the API reference is unchanged.
  • The rename is scoped to each owner module and its real importers: names such as _text, _sources and _report also exist as unrelated private functions elsewhere and are untouched. 34 files; tests that import or patch the old names are re-pointed with no assertion changed.

Left private on purpose: the 20 underscore names that only tests import (for example engine._fit_within, engine._simplify, grower_sheet._reagent_card, mix_results._nutrient_rows, ph_adjustment._couple, irrigation_ec._ec_from_state). Making those tests use public interfaces is a separate, larger change.

Verification: the nitrogen snapshot (48 files) and the batch and mix snapshot (31 files) from main are identical (64-hex hashes masked). Every runnable test module passes; test_grower_outputs, test_mix_cli, test_ph_inputs and test_grower_journey were run test by test. test_file_headers fails the same 434 cases as main on Windows. Not run locally: the slow ratio modules and the pre-push script (over 5 minutes). No chemistry changed, so the PHREEQC fixture is not re-captured.

digest, package_sources, recipe_report, diagnose, charge_report, provenance, lstsq,
blend_recipe, judge_candidate, check_record, required_text, within_bound,
weighed_recommendation, profile_doses, check_materials and product_sources keep
their module and their code; they gain docstrings where they had none.
@rafatahmed rafatahmed added the enhancement New feature or request label Nov 26, 2026
@rafatahmed rafatahmed self-assigned this Nov 26, 2026
@read-the-docs-community
Copy link
Copy Markdown

Documentation build overview

📚 Flahax | 🛠️ Build #36180455 | 📁 Comparing 7069da8 against latest (0c708be)

  🔍 Preview build  

1 file changed
± changelog.html

@codecov
codecov Bot commented Nov 26, 2026 •
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0c708be) to head (7069da8).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #328   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          148       148           
  Lines        17464     17464           
  Branches      3539      3539           
=========================================
  Hits         17464     17464           
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@rafatahmed
rafatahmed marked this pull request as ready for review November 26, 2026 14:49
@rafatahmed
rafatahmed merged commit 17c6a41 into main Nov 26, 2026
29 checks passed
@rafatahmed
rafatahmed deleted the refactor/public-helper-names branch November 26, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet
3FFA

Development

Successfully merging this pull request may close these issues.

Give the helpers that other modules import public names

1 participant

0