-
Notifications
You must be signed in to change notification settings - Fork 2
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
Re-write Topas curve IO #39
Conversation
The choice of "name" is particularly bad due to the way the new file name is chosen, which tries to strip the old timestamp from the name, as it was previously the file name. |
Also, since files have multiple interactions, it seems poor to name it off of the interaction string |
Windows is being annoying... Something about a PermissionError... I'll figure it out in the morning |
This pull request introduces 3 alerts when merging 4fb3942 into b6ddfbe - view on LGTM.com new alerts:
Comment posted by LGTM.com |
Okay, looks like the permission error was only as a result of @p770193 any chance you could pull it down and run tests locally on your windows box? I can also use the lab machines if needed. |
Updates to lists of differences above:
The default "Name" is now the same as the "Kind", meaning it is OPA or MIXER{n}, again, not sold on these names, but wanted something easyto get where I wanted it. |
May not be done, not really sure, could use a set of fresh eyes at the very least (either my own after sleep or someone elses)
Anywho, Differences introduced herein (that I can remember off the top of my head:
No longer uses "kind" as a given parameter with meaning, instead getting that from the second line of the file
No meaning to the order/number of files given, all curves in the files given are read in and linked together by the new
read_all
classmethod. This is used byread
_read_file
is used to read a particular file, but does not link it to it's subcurve (it does fill out thesource_setpoints
, thoughExtra information encoded into the curve objects. There is currently no good way to enforce that this information is present if somebody tries to make a "TopasCurve" from scratch. This is not reccomended usage.
saving does not keep all files, the
full
kwarg does nothing at this point.full
.old_filepaths
anymore, as all information to write the crv is in the objectSince it's not reading the
old_filepaths
, any curves that are in the same file are no longer there...old_filepaths
back and doing some fancyness.add_cuves
and accept an iterable or a file path, or True to look for the old file. Would not be too hard, and I tried to program with something like this in mind, but did take a shortcut or two that would have to be a bit more flexible for this approach.I would like to use the
fmt
from the curves/dependents themselves, but that system is not yet where I want itName field is different, but only becouse I was lazy/not sure if file name is what we want to use for the name field.
Uses
np.DataSource
for all that remote/compressed file goodness likefrom_
methods in WTMotor Names are not in these files... and I didn't want to keep using hard coded names
ini
files, which we could parse, but I'm hesitant to require something extratidy_headers
headers. I'm fairly confident it won't affect actual usage in WinTopas, though it may affect some UI elements when switching curves.