-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent import paths for sibling classes across rail* repos #23
Comments
Do you have any other examples of this?
…-e
On Jul 7, 2023, at 3:22 PM, Alex Malz ***@***.***> wrote:
Related to #19 <#19>, there are inconsistencies among import locations for analogous functionality between the rail repositories. For example, rail_pzflow defines the FlowHandle in src/rail/tools/flow_handle.py but the other DataHandle subclasses in rail_base are in src/rail/core/data.py. This issue is for establishing consistent locations for analogous subclasses of the same parent class that will be present in the standalone repos, either the way we already do for src/rail/creation/engines and src/rail/estimation/algos (and the same for evaluation once #14 <#14> is completed) or another way that's compatible with the namespace setup.
—
Reply to this email directly, view it on GitHub <#23>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADRIGIURHTDH6A4PVYTDEG3XPCD3BANCNFSM6AAAAAA2CLDLJU>.
You are receiving this because you are subscribed to this thread.
|
|
On Jul 14, 2023, at 11:44 AM, Alex Malz ***@***.***> wrote:
rail_astro_tools/src/rail/tools/utilPhotometry.py (whose contents I'd expect to find in src/rail/core/photometry_utils.py)
Ok
rail_bpz/src/rail/bpz/utils.py (with actual content that may or may not belong in rail_bpz/src/rail/estimation/algos/_bpz_utils.py, although the self-import I don't understand is a hint that it's related to namespace magic and might not be subject to this issue at all)
It’s a trick to for the search path, it should probably stay where it is.
rail_fsps/src/rail/added_examples/sed_gen_fsps-demo.ipynb (which I think can straightforwardly be moved to rail/examples/creation_examples/sed_gen_fsps-demo.ipynb as per LSSTDESC/rail#48 <LSSTDESC/rail#48>)
Ok
rail_fsps/src/rail/creation/sed_generation/generator.py (which is an analogue to Creator so would should be at the same level as rail_base/src/rail/creation/engine.py and suggests that the contents of rail_base/src/rail/creation/engine.py should be split into separate modules; also, it would be more consistent if the current generator.py were called sed_generator.py)
I think the creation stuff is getting a bit confused at this point.
rail_fsps/src/rail/creation/sed_generator.py (which belongs in src/rail/engines; also, it would be more consistent if the current sed_generator.py were called fsps_gen.py or something like that)
Ok, modulo sorting out the creation stuff
rail_pzflow/src/rail/tools/flow_handle.py (I'm not totally clear on why rail_base's ModelDict/ModelHandle aren't sufficient for this, but if we anticipate standalones to have to define their own DataHandles, we should group them in rail_base/src/rail/core/handles, starting with the current DataHandle subclasses in rail_base/src/rail/core/data.py.)
This isn’t going to work. The handle needs to be able to read the data, hence the FlowHandle has to live here, or else the core stuff will depend on PZFlow.
… —
Reply to this email directly, view it on GitHub <#23 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADRIGIVJ7BHT6OJMWC74D7TXQGHPDANCNFSM6AAAAAA2CLDLJU>.
You are receiving this because you commented.
|
Ok, it looks like the this has all been address in other PRs. |
To recap, it looks like the status is as follows (and please correct me if I'm wrong here):
The remaining items are related to extensibility of the code to more underlying algos so their necessity largely depends on how likely we think it is that these will come up again as the railiverse expands.
|
I'm sorry, but it looks to me like both of these changes would be highly disruptive and I'm not seeing that we would gain much. Perhaps someone else can weigh in. |
To wit, 1) I don't see a problem with having a number of rail_xxx/src/rail/xxx/utils.py files that set specific things for specific packages. |
My two cents: -Do we really see lots of custom data handles being a big issue? I did not expect a huge number of those, so the flow_handle thing seems a bit like overkill to me, particularly from a cost/benefit analysis standpoint. -For the bpz_utils, I think this is fairly unique to BPZ, it was done this way because the existing code handled file I/O with paths relative to an environment variable base path, and doing it this way was minimally disruptive to that existing code. So, I think it will not be a common occurrence in the future, and we can just let this one instance sit as-is and not worry about it too much. |
I am moving this out of the v1 tracker since we have decided not to make this change before v1 |
Related to #19, there are inconsistencies among import locations for analogous functionality between the rail repositories. For example,
rail_pzflow
defines theFlowHandle
insrc/rail/tools/flow_handle.py
but the otherDataHandle
subclasses inrail_base
are insrc/rail/core/data.py
. This issue is for establishing consistent locations for analogous subclasses of the same parent class that will be present in the standalone repos, either the way we already do forsrc/rail/creation/engines
andsrc/rail/estimation/algos
(and the same for evaluation once #14 is completed) or another way that's compatible with the namespace setup.The text was updated successfully, but these errors were encountered: