Skip to content

Commit

Permalink
Merge branch 'master' into update_som
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisSanchez25 authored Jan 24, 2025
2 parents ab1e46f + 0c44889 commit 3dd82ed
Show file tree
Hide file tree
Showing 73 changed files with 690 additions and 1,452 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.0.1
current_version = 3.0.2
files = straxen/__init__.py
commit = True
tag = True
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/pypi_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup python
uses: actions/[email protected]
with:
python-version: '3.9'
python-version: "3.10"

- name: Checkout repo
uses: actions/checkout@v4
Expand All @@ -28,8 +28,6 @@ jobs:

- name: Publish a Python distribution to PyPI
# Do the publishing
# Might want to add but does not work on workflow_dispatch :
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: ${{ secrets.token }}
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ jobs:
strategy:
fail-fast: False
matrix:
python-version: [ "3.9", "3.10" ]
test: [ 'coveralls', 'pytest', 'pytest_no_database' ]
python-version: ["3.10", "3.11"]
test: ["coveralls", "pytest", "pytest_no_database"]
# Drop some not crucial tests for python 3.10 and 3.11
exclude:
- python-version: "3.11"
test: coveralls
- python-version: "3.10"
test: pytest_no_database
- python-version: "3.11"
test: pytest_no_database

Expand All @@ -62,6 +60,7 @@ jobs:
pip install pytest hypothesis coverage coveralls
pip install git+https://github.com/XENONnT/base_environment.git --force-reinstall
pip install git+https://github.com/AxFoundation/strax.git --force-reinstall
pip install .
- name: Start MongoDB
uses: supercharge/[email protected]
Expand Down Expand Up @@ -103,6 +102,7 @@ jobs:
run: |
coverage run --source=straxen -m pytest --durations 0
coverage report
- name: Coveralls
# Make the coverage report and upload
env:
Expand All @@ -128,5 +128,6 @@ jobs:
bash .github/scripts/create_pre_apply_function.sh $HOME
coverage run --append --source=straxen -m pytest -v
coveralls --service=github
- name: goodbye
run: echo "tests done, bye bye"
run: echo 'tests done, bye bye'
2 changes: 1 addition & 1 deletion .github/workflows/test_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ 3.9 ]
python-version: ["3.10"]
steps:
- name: Setup python
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ build:
apt_packages:
- graphviz
tools:
python: "3.9"
python: "3.10"

python:
install:
Expand Down
9 changes: 9 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
3.0.2 / 2025-01-13
-------------------
* Collect SOM dtype at one place by @dachengx in https://github.com/XENONnT/straxen/pull/1511
* Stop support for list of "take" protocol by @dachengx in https://github.com/XENONnT/straxen/pull/1517
* Add `stage` flag for `RucioRemoteBackend` by @dachengx in https://github.com/XENONnT/straxen/pull/1520

**Full Changelog**: https://github.com/XENONnT/straxen/compare/v3.0.1...v3.0.2


3.0.1 / 2024-12-27
-------------------
* Fix run_doc for led plugin by @GiovanniVolta in https://github.com/XENONnT/straxen/pull/1462
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def __getattr__(cls, name):
# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {"https://docs.python.org/": None}
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}


def setup(app):
Expand Down
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool]
[tool.poetry]
name = "straxen"
version = "3.0.1"
version = "3.0.2"
description = "Streaming analysis for XENON"
readme = "README.md"
authors = [
Expand All @@ -11,8 +11,9 @@ classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Physics",
Expand All @@ -29,8 +30,8 @@ straxen_print_versions = "straxen.scripts.straxen_print_versions:main"
straxer = "straxen.scripts.straxer:main"

[tool.poetry.dependencies]
python = ">=3.9,<3.13"
strax = ">=2.0.3"
python = ">=3.10,<3.13"
strax = ">=2.0.5"
bokeh = "*"
commentjson = "*"
gitpython = "*"
Expand All @@ -47,7 +48,7 @@ mistune = "==0.8.4"
pymongo = "*"
requests = "*"
utilix = ">=0.11.0"
xedocs = "*"
xedocs = ">=0.2.32"
commonmark = { version = "0.9.1", optional = true }
nbsphinx = { version = "0.8.9", optional = true }
recommonmark = { version = "0.7.1", optional = true }
Expand Down
6 changes: 1 addition & 5 deletions straxen/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# mypy: disable-error-code="no-redef"
__version__ = "3.0.1"
__version__ = "3.0.2"

from utilix import uconfig
from .common import *

# contexts.py below
from .corrections_services import *
from .get_corrections import *

from .itp_map import *
from .matplotlib_utils import *
from .mini_analysis import *
Expand Down
1 change: 0 additions & 1 deletion straxen/analyses/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from . import daq_waveforms
from . import event_display
from . import holoviews_waveform_display
from . import posrec_comparison
from . import pulse_plots
from . import quick_checks
from . import records_matrix
Expand Down
2 changes: 1 addition & 1 deletion straxen/analyses/bokeh_waveform_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ def _make_event_title(event, run_id, width=1600):
"""
start = event["time"]
date = np.datetime_as_string(start.astype("<M8[ns]"), unit="s")
start_ns = start - (start // 10**9) * 10**9
start_ns = start - (start // straxen.units.s) * straxen.units.s
end = strax.endtime(event)
end_ns = end - start + start_ns
event_number = event["event_number"]
Expand Down
152 changes: 0 additions & 152 deletions straxen/analyses/posrec_comparison.py

This file was deleted.

4 changes: 2 additions & 2 deletions straxen/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def open_resource(file_name: str, fmt="text"):


@export
def get_resource(x: str, fmt="text"):
def get_resource(x: str, fmt="text", readable=False):
"""
Get the resource from an online source to be opened here. We will
sequentially try the following:
Expand Down Expand Up @@ -209,7 +209,7 @@ def get_resource(x: str, fmt="text"):
elif straxen.uconfig is not None:
downloader = utilix.mongo_storage.MongoDownloader()
if x in downloader.list_files():
path = downloader.download_single(x)
path = downloader.download_single(x, human_readable_file_name=readable)
return open_resource(path, fmt=fmt)
# 4. load from URL
if "://" in x:
Expand Down
Loading

0 comments on commit 3dd82ed

Please sign in to comment.