Skip to content
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

V2 clean state #64

Open
wants to merge 73 commits into
base: v2
Choose a base branch
from
Open

Conversation

krisvanneste
Copy link
Collaborator

Claudio,

Here is a branch with a first version of a ssp_clear_state function.
It resets some global variables caching information in different submodules. Optionally, config.options can be cleared and config can be reset to the default values.
More testing is still needed (involving multiple runs with different data/settings).
Can you have a look and improve it?

Also, remove vendored `versioneer.py`
Also add "2" suffix to all console scripts.
This allows for actually using "sourcespec2"
modules instead of "sourcespec" modules.
TODO: not yet used in the rest of the code
Also, split the code into multiple submodules.
claudiodsf and others added 17 commits January 10, 2025 09:20
This commit changes the ssp_exit function to accept a string as an error
message. If the status is a string, it is used as an error message and
the exit status is set to 1 (failure). The function now also accepts an
extra_message parameter, which is printed to stderr before exiting.

If the program is not running from the command line and the status
corresponds to an error, the function raises a RuntimeError exception.
…ards.

Added 'header_key' argument to _parse_asdf_headers function, and allowed 'tag' argument to be list.
Improved error catching when trying to deserialize header values in _parse_asdf_headers function.
Most important change is log message when no ASDF tag is specified.
Clear state from possible previous run at beginning of ssp_run function.
@claudiodsf claudiodsf changed the base branch from main to v2 January 10, 2025 13:05
@claudiodsf
Copy link
Member

Thanks Kris!

I'll look into that later today or early next week.

Could you please send me by email the latest version of your working notebook example?

P.S. I changed the destination branch of this PR from main to v2 😉

@krisvanneste
Copy link
Collaborator Author

P.S. I changed the destination branch of this PR from main to v2 😉

Sorry, that's causing the conflicts of course. Github presented me with a PR proposal and I clicked on it...

@krisvanneste
Copy link
Collaborator Author

Could you please send me by email the latest version of your working notebook example?

OK, I will clean up some stuff first.
Shall I send it by mail or in this thread?

@krisvanneste
Copy link
Collaborator Author

Could you please send me by email the latest version of your working notebook example?

OK, I will clean up some stuff first. Shall I send it by mail or in this thread?

What is the name of the notebook I sent you earlier?

@claudiodsf
Copy link
Member

I think it was run_ssp_from_asdf.ipynb.

Maybe we can iterate by mail on the notebook (and the required data)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants