-
Notifications
You must be signed in to change notification settings - Fork 19
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
Initial rearranging of files #57
Conversation
Ok, @mhasself , can you check this out? I split the imports of No attempt in this PR to reconcile the metadata / Hardware split. |
Thanks -- taking a look. I'm inclined to put Context and basically all sotoddb stuff into core, not io. The functionality in those modules is intended to support abstraction, even if in some cases there is self-i/o built in (such as the built-in methods for reading/writing each database type). I tend to see the io module as the place to implement various loaders -- the ones that use MPI and the ones that don't, for example. But the abstraction provided by Context and the supporting databases is more universal. I think simple.py is the only bit that clearly belongs in io. Does that make sense? |
Not sure how deep we want to make this hierarchy, but how do you feel about:
While we're at it, let's rename all the SomethingDB to SomethingDb... e.g. I think I've been convinced that camel case for acronyms is the smart thing to do when one speaks almost entirely in acronyms, TodDbLol. I guess this would mean
|
Ok, now I'm confused about the policy... I think originally we had:
An AxisManager class (for example) can be constructed and used without touching disk. A Context is essentially an interface to files on disk. You can't even construct a Context without reading files. Made-up example: imagine we had a class which was used throughout sotodlib that represented detector beams. The constructor of this class took the path to a potentially large file on disk and loaded the file during construction. Does this class belong in core or io? If you answered "core", then I guess that means that "io" is really only for code doing I/O of time ordered data. Is that your intention? Side note: I just realized that the top-level g3_core.py should go in "core" as well, since it is a container. Remember, this PR is just trying to get existing files into the right place, and then we can work on the code itself. |
I'll rebase on master and resolve conflicts once we sort this out. It sounds like you want to make all of the existing |
Right... I think some objects, such as framework engine classes like the context databases, have simple formats on disk that can be included in the class even if the class is considered "core"... (Actually I think Context should be constructable without a filename, it's a bug that it isn't.) Yes, I suppose I am thinking of io primarily as the place where our diverse set of TOD loading routines will live. Since our format will inevitably evolve, and since we're dealing with multiple large datasets (if you include TOD sims), we can't get away with just one function that does everything. We will need routines that can load each iteration of our data format. I think some metadata I/O stuff will live in io too (such as the HDF5 business implemented in sotoddb.simple). |
the proposed layout in #53. Only delete files that were obviously empty or never used. No changes or cleanup to the code here, just moving things around and changing imports so that unit tests pass.
Ok, I just moved context.py into |
@mhasself , I think this is ready for review. Again, this PR is just moving existing files around. Then we can open separate PRs for changing those files. |
This imports ResultSet and the metadata *Db directly to core.metadata, renaming the *DB classes as *Db. The more stuff-on-disk code in sotodlib.simple is imported as io.metadata.simple. This has been tested on simons1 with the SO sim and ACT Uranus demo code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks. I have added a commit that moves around (and renames) the sotoddb imports a little. Please take a look at that before merging!
If testing, might require the "pre-integration-tweaks" branch of sotoddb.
Ok, those import changes look fine to me, and let's get this merged so that we can move on to the bulk of the other issues. |
Not yet ready for review or merge, still need to fix all the imports. Working on rearranging existing files and only deleting things which were obviously abandoned. The actual code modifications will be in a later PR.