-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow use of xedocs context configs (#1125)
* Adds option to context creation function that loads config from xedocs * Adds context method that applies configs from xedocs * update docs Co-authored-by: Yossi Mosbacher <joe.mosbacher>
- Loading branch information
1 parent
379e63a
commit 07f90c3
Showing
5 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Xedocs context configs | ||
====================== | ||
|
||
The xedocs package manages a versioned collection of context configs. | ||
This is useful for applying a predefined set of configs to the context in a reproducible way. | ||
Straxen registers a context method `context.apply_xedocs_configs` which can be used to load and apply | ||
the configs from a given version. Example: | ||
|
||
.. code-block:: python | ||
import straxen | ||
st = straxen.contexts.xenonnt() | ||
st.apply_xedocs_configs('v9') | ||
The straxen context builder function `straxen.contexts.xenonnt` also accepts a `xedocs_version` argument, | ||
if passed, straxen will attempt to load all configs from the given version from the xedocs context_configs database. | ||
Example: | ||
|
||
.. code-block:: python | ||
import straxen | ||
st = straxen.contexts.xenonnt(xedocs_version='v9') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ git+https://github.com/XENONnT/ax_env | |
wfsim==1.0.2 | ||
nbmake | ||
pytest-xdist | ||
xedocs==0.2.4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters