Skip to content

Commit 224f5e4

Browse files
fix imports etc
1 parent 18de68f commit 224f5e4

28 files changed

+102
-110
lines changed

.github/workflows/code_style.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Python style
22
on:
33
pull_request:
4-
types: [opened]
4+
types: [ opened ]
55
jobs:
66
qa:
77
name: Quality check
@@ -14,7 +14,7 @@ jobs:
1414
python-version: 3.8
1515
- name: Change __all__ exports for pyflake
1616
run: |
17-
bash .github/scripts/pre_pyflakes.sh
17+
bash .github/scripts/pre_pyflakes.sh
1818
- name: Wemake Python Stylguide
1919
uses: wemake-services/[email protected]
2020
continue-on-error: true

.github/workflows/pypi_install.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Pipy
55
on:
66
workflow_dispatch:
77
release:
8-
types: [created]
8+
types: [ created ]
99

1010
jobs:
1111
build:
@@ -28,5 +28,5 @@ jobs:
2828
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
2929
uses: pypa/gh-action-pypi-publish@master
3030
with:
31-
user: ${{ secrets.token }}
31+
user: ${{ secrets.token }}
3232
password: ${{ secrets.pypi_password }}

.github/workflows/pytest.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Test package
44
on:
55
workflow_dispatch:
66
release:
7-
types: [created]
7+
types: [ created ]
88
pull_request:
99
push:
1010
branches:
@@ -18,8 +18,8 @@ jobs:
1818
strategy:
1919
fail-fast: False
2020
matrix:
21-
python-version: [3.7, 3.8, 3.9]
22-
test: ['coveralls', 'pytest']
21+
python-version: [ 3.7, 3.8, 3.9 ]
22+
test: [ 'coveralls', 'pytest' ]
2323
# Only run coverage / no_database on py3.8
2424
exclude:
2525
- python-version: 3.7

.github/workflows/test_install.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Installation test
33
on:
44
workflow_dispatch:
55
release:
6-
types: [created]
6+
types: [ created ]
77
pull_request:
88
branches:
99
- master
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
python-version: [3.8]
22+
python-version: [ 3.8 ]
2323
steps:
2424
- name: Setup python
2525
uses: actions/setup-python@v2

HISTORY.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
1.0.0 / 2021-12-02
22
------------------
3-
- Add badges to Amstrax and update readme (#23)
4-
- Plugin, context and package structure (#24)
5-
- Fix autoprocessing scripts (#25)
6-
- Delete bootstrax (#26)
7-
- remove notebooks (#27)
8-
- Add documentation
9-
10-
3+
4+
- Add badges to Amstrax and update readme (#23)
5+
- Plugin, context and package structure (#24)
6+
- Fix autoprocessing scripts (#25)
7+
- Delete bootstrax (#26)
8+
- remove notebooks (#27)
9+
- Add documentation
10+
1111
0.1.0 / 2021-12-02
1212
--------------------
13-
- Add testing and restructure amstrax (#13)
13+
14+
- Add testing and restructure amstrax (#13)
1415

1516
0.0.1 / <2021-12-01
1617
--------------------

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,33 @@
11
# Amstrax
2+
23
[![Coverage Status](https://coveralls.io/repos/github/XAMS-nikhef/amstrax/badge.svg?branch=master)](https://coveralls.io/github/XAMS-nikhef/amstrax?branch=master)
34
[![CodeFactor](https://www.codefactor.io/repository/github/xams-nikhef/amstrax/badge)](https://www.codefactor.io/repository/github/xams-nikhef/amstrax)
45
[![PyPI version shields.io](https://img.shields.io/pypi/v/amstrax.svg)](https://pypi.python.org/pypi/amstrax/)
56
[![PyPI downloads](https://img.shields.io/pypi/dm/amstrax.svg)](https://pypistats.org/packages/amstrax)
67
[![DOI](https://zenodo.org/badge/263576054.svg)](https://zenodo.org/badge/latestdoi/263576054)
78

89
## Documentation
10+
911
[![Documentation Status](https://readthedocs.org/projects/amstrax/badge/?version=latest)](https://amstrax.readthedocs.io/en/latest/?badge=latest)
1012

1113
Amsterdam Strax
1214

13-
Amstrax is the analysis framework for XAMS, built on top of the generic [strax framework](https://github.com/AxFoundation/strax).
15+
Amstrax is the analysis framework for XAMS, built on top of the
16+
generic [strax framework](https://github.com/AxFoundation/strax).
1417

1518
# Installation
19+
1620
For installing the package do the regular install-packages-from-github tricks:
21+
1722
```
1823
pip install amstrax
1924
```
25+
2026
All required dependencies will be installed for you.
2127

2228
# Usage
23-
First you'll need to get some data. For this you'll need to either run somewhere where nikhef's /data/xenon/xams is available or have data downloaded.
24-
Either strax processed data or pax raw data is fine.
25-
Once you have data you can try running the Tutorial notebook (although it's in Dutch), just make sure to change the output_folder to where you have data
29+
30+
First you'll need to get some data. For this you'll need to either run somewhere where nikhef's
31+
/data/xenon/xams is available or have data downloaded. Either strax processed data or pax raw data
32+
is fine. Once you have data you can try running the Tutorial notebook (although it's in Dutch), just
33+
make sure to change the output_folder to where you have data

amstrax/SiPMdata.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
from iminuit import Minuit
1+
import matplotlib.pyplot as plt
22
import numpy as np
33
import pandas as pd
4-
5-
from copy import deepcopy
6-
7-
import matplotlib
8-
import matplotlib.pyplot as plt
4+
from IPython.display import clear_output
5+
from iminuit import Minuit
96
from matplotlib.colors import BoundaryNorm
107
from matplotlib.ticker import MaxNLocator
118

12-
from IPython.display import clear_output
13-
149
np.random.seed(12345)
1510
inch = 25.4 # mm
1611

amstrax/__init__.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
__version__ = '0.1.0'
22

3+
from . import auto_processing
34
from . import hitfinder_thresholds
4-
from .hitfinder_thresholds import *
5-
5+
from . import plugins
66
from .common import *
7-
from .itp_map import *
8-
from .rundb import *
7+
from .contexts import *
98
from .hitfinder_thresholds import *
10-
11-
from . import plugins
9+
from .hitfinder_thresholds import *
10+
from .itp_map import *
1211
from .plugins import *
13-
14-
from .contexts import *
15-
from . import auto_processing
12+
from .rundb import *

amstrax/auto_processing/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from . import amstraxer
2-
from . import submit_stbc
3-
42
from . import auto_processing
53
from . import process_run
4+
from . import submit_stbc

amstrax/auto_processing/amstraxer.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
"""
55
import argparse
66
import datetime
7+
import json
78
import logging
8-
import time
99
import os
1010
import os.path as osp
1111
import platform
12-
import psutil
1312
import sys
14-
import json
13+
import time
14+
15+
import psutil
1516

1617

1718
def parse_args():

0 commit comments

Comments
 (0)