Skip to content

Commit

Permalink
Proposal to use pre-commit for continuous integration
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx committed Nov 10, 2023
1 parent 8da6757 commit 7729c13
Show file tree
Hide file tree
Showing 196 changed files with 14,596 additions and 12,280 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
# Isolate binary files in case the auto-detection algorithm fails and
# marks them as text files (which could brick them).
*.{png,jpg,jpeg,gif,webp,woff,woff2} binary

38 changes: 0 additions & 38 deletions .github/scripts/pre_pyflakes.sh

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/code_style.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
args: [--safe, --line-length=100, --preview]
- id: black-jupyter
args: [--safe, --line-length=100, --preview]
language_version: python3.9

- repo: https://github.com/pycqa/docformatter
rev: v1.7.5
hooks:
- id: docformatter

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
additional_dependencies: [
types-PyYAML, types-tqdm, types-pytz,
types-requests, types-setuptools,
]

- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8

ci:
autoupdate_schedule: weekly
88 changes: 44 additions & 44 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ Patch:
Notes:
- No lineage changes

Full Changelog:
Full Changelog:
- https://github.com/XENONnT/straxen/compare/v1.7.0...v1.7.1

New Contributors
Expand All @@ -310,19 +310,19 @@ New Contributors
1.7.0 / 2022-05-11
---------------------
Minor:
- Fix detector sync (#1033)
- Numbafy function (#1015)
- Fixing binomial (#991)
- Patched wrong setting (#1014)
- Partitioned tpc (#1027)
- Fix detector sync (#1033)
- Numbafy function (#1015)
- Fixing binomial (#991)
- Patched wrong setting (#1014)
- Partitioned tpc (#1027)

Patch:
- Update requirements-tests.txt (#1021)
- Update requirements-tests.txt (#1021)
- remove deprecated function (#1023)
- Warn when context not from cutax (#1020)
- Add 'electron_diffusion_cte' variable from CMT (#1025)
- Start testing with PluginTestingSuite, fix #881 (#1022)
- add dict type correction (#1028)
- Warn when context not from cutax (#1020)
- Add 'electron_diffusion_cte' variable from CMT (#1025)
- Start testing with PluginTestingSuite, fix #881 (#1022)
- add dict type correction (#1028)

Notes:
- Lineage changes for event_area_per_channel, event_pattern_fit, peak_classification_bayes, detector_time_offsets, event_sync_nv
Expand Down Expand Up @@ -401,12 +401,12 @@ Notes:
1.4.0 / 2022-03-02
------------------
Minor:
- Update corrected areas (#931) and Update event_processing.py (#937)
- Update corrected areas (#931) and Update event_processing.py (#937)
- Fix bug veto positions (#940)
- S1 aft map & CMT tweaks (#916) and initialize plugin without setup() method (#953)
- S1 aft map & CMT tweaks (#916) and initialize plugin without setup() method (#953)

Patch
- Documentation building (#934)
- Documentation building (#934)
- Development (#951)

Notes:
Expand All @@ -428,7 +428,7 @@ Patch

Testing
- Enable holoviews testing py3.10 (#914)
- make coverage configuration (#926)
- make coverage configuration (#926)

Notes:
- The lineage of the aqmon processing-chain changed
Expand Down Expand Up @@ -527,7 +527,7 @@ fixes/tests:
- Pin documentation requirements (#862)
- Add read the docs config (#861)
- Pymongo requirement should be <4.0 (#852)

notes:
- Bug for `peaklets-uhfusstvab` due to (#875)
- No lineage changes
Expand All @@ -540,42 +540,42 @@ major:

* Update CorrectedAreas (instead of EnergyEstimates) (#817)
* S2 pattern fit (#780)
* Exclude S1 as triggering peak (#779)
* Two manual boundaries (updated 11/24/2021) (#775)
* Exclude S1 as triggering peak (#779)
* Two manual boundaries (updated 11/24/2021) (#775)
* Add main peaks' shadow for event shadow (#770)
* Events synchronize (#761)
* Implement peak-level shadow and event-level shadow refactor (#753)
* Implement peak-level shadow and event-level shadow refactor (#753)
* use channel tight coincidence level (#745)

minor / patches:

* Normalized line endings (#833)
* Fix codefactor issues (#832)
* Another try at codefactor (#831)
* Another try at codefactor (#831)
* URLConfig take protocol for nested keys (#826)
* Rename tight coincidence (#825)
* Rename tight coincidence (#825)
* Move URLConfig cache to global dictionary (#822)
* Remove codefactor (#818)
* Performance update for binomial test (#783)
* Remove codefactor (#818)
* Performance update for binomial test (#783)
* URLConfig not in strax (#781)
* Add refactor event building cut (#778)
* Add refactor event building cut (#778)
* whipe online monitor data (#777)
* Cache dependencies (#772)
* Update definition array_valued (#757)
* Cache dependencies (#772)
* Update definition array_valued (#757)

fixes/tests:

* Add test for filter_kwargs (#837)
* Fix nv testing data (#830)
* Unittest for DAQreader (#828)
* Fix nv testing data (#830)
* Unittest for DAQreader (#828)
* Fix broken matplotlib/minianalyses (#815)
* Itp test (#813)
* Loose packaging requirement (#810)
* can we disable codefactor please (#809)
* Fix #781 (#808)
* Matplotlib changed requirements (#805)
* Pin pymongo (#801)
* Bump wfsim tests (#773)
* Loose packaging requirement (#810)
* can we disable codefactor please (#809)
* Fix #781 (#808)
* Matplotlib changed requirements (#805)
* Pin pymongo (#801)
* Bump wfsim tests (#773)
* Patch peaks merging (#767)

notes:
Expand Down Expand Up @@ -624,7 +624,7 @@ minor / patches:
- Refactor straxen tests (#703)
- WFSim registry as argument for simulations context (#713)
- Update S1 AFT map in event pattern fit (#697)
- Refactor s2 correction (#704)
- Refactor s2 correction (#704)

fixes/tests:
- Set default drift time as nan (#700)
Expand Down Expand Up @@ -665,7 +665,7 @@ major / minor:


patches and fixes:

- Use read by index and check for NaNs (#661)
- Add small feature for printing versions of git (#665)
- Fix minianalyses from apply_selection (#666)
Expand All @@ -683,17 +683,17 @@ patches and fixes:
1.0.0 / 2021-09-01
-------------------
major / minor:

- merge s2 without s1 (#645)
- First nVeto monitor plugin (#634)
- Peak event veto tagging (#618)
- Fix peaklet area bias (#601)
- Add lone hit information to merged S2s. (#623)


patches and fixes:
- Fix n_hits of peaks (#646)

- Fix n_hits of peaks (#646)
- Update requirements for strax (#644)
- Modifications of nT simulation context (#602)
- Straxer for other packages (#595)
Expand Down Expand Up @@ -960,7 +960,7 @@ patches and fixes:
- Nveto changes (#319)
- travis test at pinned environments (#335)
- Maintance and fixes on Bootstrax and ajax (#337, 96a2858, 84fda21, b09ea49, 1e577d9, 59cfd7d, 46ad1a3, 968a1dc)
- Some fixes and changes for the passive event display + Plotting tests (#338, 1d1b5b2, 93c7e18, 331b543, 055aa55, 1ce04ff)
- Some fixes and changes for the passive event display + Plotting tests (#338, 1d1b5b2, 93c7e18, 331b543, 055aa55, 1ce04ff)
- Listen to utilix, remove depricated function from straxen #340


Expand Down Expand Up @@ -1073,7 +1073,7 @@ patches and fixes:
- Added back-up URLs for the mongoDB (#213)
- Updated data cleaning/handling with ajax and bootstrax (#182, #191, #196, #202, #206)
- Updated documentation and doc-strings (#189, #192 and #198)
- Updated bin scripts like straxer (#204)
- Updated bin scripts like straxer (#204)
- Updated PMT gains (#208)
- Renamed high energy plugins (#200)
- Bugifx in nveto-plugins (#183, #209)
Expand Down Expand Up @@ -1252,12 +1252,12 @@ patches and fixes:
0.3.2 / 2019-11-13
------------------
- Pulse counting bugfixes (#30)
- Bootstrax:
- Bootstrax:
- Setup fix (#27)
- Add correct (epoch-based) run start time (#29)
- Support compressor config (#29)
- Avoid platform-specific tempfile things (#28)
- Placeholder electron lifetime (#25)
- Placeholder electron lifetime (#25)


0.3.1 / 2019-09-25
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Streaming analysis for XENON(nT)
[![PyPI version shields.io](https://img.shields.io/pypi/v/straxen.svg)](https://pypi.python.org/pypi/straxen/)
[![Readthedocs Badge](https://readthedocs.org/projects/straxen/badge/?version=latest)](https://straxen.readthedocs.io/en/latest/?badge=latest)
[![CodeFactor](https://www.codefactor.io/repository/github/xenonnt/straxen/badge)](https://www.codefactor.io/repository/github/xenonnt/straxen)

[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/XENONnT/straxen/master.svg)](https://results.pre-commit.ci/latest/github/XENONnT/straxen/master)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5576262.svg)](https://doi.org/10.5281/zenodo.5576262)

[Straxen](https://straxen.readthedocs.io) is the analysis framework for XENONnT, built on top of the generic [strax framework](https://github.com/AxFoundation/strax). Currently it is configured for analyzing XENONnT and XENON1T data.
Expand Down
Loading

0 comments on commit 7729c13

Please sign in to comment.