Rename basefactory populations#990
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #990 +/- ##
===========================================
- Coverage 70.21% 70.18% -0.04%
===========================================
Files 99 100 +1
Lines 18931 18953 +22
===========================================
+ Hits 13293 13302 +9
- Misses 5638 5651 +13 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR renames the former BaseFactory implementation to PopulationFactory and migrates the core implementation from radis/lbl/base.py to radis/lbl/populations.py, updating imports and documentation to match while attempting to preserve backward compatibility.
Changes:
- Updated internal imports/references from
radis.lbl.base/BaseFactorytoradis.lbl.populations/PopulationFactory. - Reworked
radis/lbl/base.pyinto a backward-compatibility shim that forwards topopulations. - Updated tests and documentation to point at the new module/class names.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| radis/test/lbl/test_populations.py | Updates imports/docstrings to reference radis.lbl.populations and PopulationFactory. |
| radis/test/lbl/test_loader.py | Fixes doc references for DatabankLoader location. |
| radis/spectrum/spectrum.py | Updates commented import path to the renamed module. |
| radis/lbl/loader.py | Updates inheritance-chain docs to PopulationFactory. |
| radis/lbl/factory.py | Switches get_wavenumber_range import to populations and updates TODO wording. |
| radis/lbl/calc.py | Switches get_wavenumber_range import to populations. |
| radis/lbl/broadening.py | Updates base class/import from BaseFactory to PopulationFactory. |
| radis/lbl/base.py | Replaces implementation with a deprecation shim forwarding to populations. |
| radis/lbl/bands.py | Updates inheritance-chain docs to PopulationFactory. |
| radis/lbl/init.py | Adds PopulationFactory export and BaseFactory alias for compatibility. |
| radis/api/exomolapi.py | Updates import for linestrength_from_Einstein to new module path. |
| docs/lbl/lbl.rst | Updates docs reference to PopulationFactory.plot_linestrength_hist. |
| docs/dev/_architecture.rst | Updates architecture docs to PopulationFactory (but still has a couple stale method names). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I realized we needed a compatibility shim to handle historical imports (like |
Description
This PR addresses the TODO:
rename base.py and BaseFactory to more explicit populations.py and PopulationFactory ?in LONG TERM TODO #53.The name
PopulationFactorymakes a lot more sense for what this class actually does.Changes made:
radis/lbl/base.pytoradis/lbl/populations.py.BaseFactoryclass toPopulationFactoryglobally.test_base.pytotest_populations.pyand updated all internal imports, references, and docs.from .populations import PopulationFactory as BaseFactory) inradis/lbl/__init__.pyso we don't break existing user code after the update.