Skip to content

Commit ba25aed

Browse files
authored
Merge pull request #31 from jennmald/pre-commit
Apply pre-commit to chxtools repository
2 parents 04a3a27 + 8a523c2 commit ba25aed

60 files changed

Lines changed: 3457 additions & 2358 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ docs/_build/
8181
*.tiff
8282
*.tif
8383

84-
#generated documntation files
84+
#generated documentation files
8585
doc/resource/api/generated/
8686

8787
# Enaml

.pre-commit-config.yaml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
ci:
2+
autoupdate_commit_msg: "chore(deps): update pre-commit hooks"
3+
autofix_commit_msg: "style: pre-commit fixes"
4+
autoupdate_schedule: "quarterly"
5+
6+
exclude: "^({{cookiecutter\\.project_name}}|hooks/pre_gen_project.py$)"
7+
8+
repos:
9+
- repo: https://github.com/pre-commit/pre-commit-hooks
10+
rev: "v6.0.0"
11+
hooks:
12+
- id: check-added-large-files
13+
- id: check-case-conflict
14+
- id: check-merge-conflict
15+
- id: check-symlinks
16+
- id: check-yaml
17+
- id: debug-statements
18+
- id: end-of-file-fixer
19+
- id: mixed-line-ending
20+
- id: name-tests-test
21+
args: ["--pytest-test-first"]
22+
- id: requirements-txt-fixer
23+
- id: trailing-whitespace
24+
25+
- repo: https://github.com/adamchainz/blacken-docs
26+
rev: "1.20.0"
27+
hooks:
28+
- id: blacken-docs
29+
additional_dependencies: [black==24.*]
30+
31+
- repo: https://github.com/astral-sh/ruff-pre-commit
32+
rev: "v0.15.6"
33+
hooks:
34+
- id: ruff-check
35+
args: ["--fix", "--show-fixes"]
36+
- id: ruff-format
37+
38+
- repo: https://github.com/pre-commit/pygrep-hooks
39+
rev: "v1.10.0"
40+
hooks:
41+
- id: rst-backticks
42+
- id: rst-directive-colons
43+
- id: rst-inline-touching-normal
44+
45+
- repo: https://github.com/pre-commit/mirrors-mypy
46+
rev: "v1.19.1"
47+
hooks:
48+
- id: mypy
49+
files: "(src|tests|noxfile.py)"
50+
args: []
51+
additional_dependencies:
52+
- click
53+
- markdown-it-py
54+
- pytest
55+
- nox
56+
- orjson
57+
- repo-review>=0.10.6
58+
- rich
59+
- tomli>=2.0.2
60+
- types-PyYAML
61+
62+
- repo: https://github.com/rbubley/mirrors-prettier
63+
rev: "v3.8.1"
64+
hooks:
65+
- id: prettier
66+
types_or: [yaml, markdown, html, css, scss, javascript, json]
67+
args: [--prose-wrap=always]
68+
69+
- repo: https://github.com/crate-ci/typos
70+
rev: "v1.44.0"
71+
hooks:
72+
- id: typos
73+
exclude: ^Gemfile\.lock$
74+
75+
- repo: local
76+
hooks:
77+
- id: disallow-caps
78+
name: Disallow improper capitalization
79+
language: pygrep
80+
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest|RST|PyLint
81+
exclude: (.pre-commit-config.yaml|docs/pages/guides/style\.md)$
82+
- id: disallow-words
83+
name: Disallow certain words
84+
language: pygrep
85+
entry: "[Ff]alsey"
86+
exclude: .pre-commit-config.yaml$
87+
- id: disallow-bad-permalinks
88+
name: Disallow _ in permalinks
89+
language: pygrep
90+
entry: "^permalink:.*_.*"
91+
- id: cog
92+
name: Cog the pages
93+
language: python
94+
entry: cog -P -r -I ./helpers
95+
files: "^docs/pages/guides/(packaging_compiled|docs|tasks|gha_basic).md|^copier.yml|^docs/_includes/pyproject.md"
96+
additional_dependencies: [cogapp, cookiecutter, tomlkit]

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2424
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2525
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2626
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
chxtools
2-
========
3-
4-
Repository for data collection and analysis scripts that are useful at the
5-
CHX beamline at NSLS-II (11-id).
1+
# chxtools
62

3+
Repository for data collection and analysis scripts that are useful at the CHX
4+
beamline at NSLS-II (11-id).
Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
%Photon Photoel.
2-
%Energy Absorb.
3-
1.000E-03 1.567E+03
4-
1.500E-03 5.333E+02
5-
1.839E-03 3.071E+02
6-
1.839E-03 3.191E+03
7-
2.000E-03 2.775E+03
8-
3.000E-03 9.767E+02
9-
4.000E-03 4.514E+02
10-
5.000E-03 2.438E+02
11-
6.000E-03 1.458E+02
12-
7.000E-03 9.388E+01
13-
8.000E-03 6.379E+01
14-
9.000E-03 4.521E+01
15-
1.000E-02 3.315E+01
16-
1.100E-02 2.499E+01
17-
1.200E-02 1.928E+01
18-
1.300E-02 1.517E+01
19-
1.400E-02 1.213E+01
20-
1.500E-02 9.848E+00
21-
1.600E-02 8.096E+00
22-
1.700E-02 6.730E+00
23-
1.800E-02 5.651E+00
24-
1.900E-02 4.787E+00
25-
2.000E-02 4.089E+00
26-
2.100E-02 3.518E+00
27-
2.200E-02 3.048E+00
28-
2.300E-02 2.656E+00
29-
2.400E-02 2.328E+00
30-
2.500E-02 2.051E+00
31-
2.600E-02 1.815E+00
32-
2.700E-02 1.614E+00
33-
2.800E-02 1.440E+00
34-
2.900E-02 1.291E+00
35-
3.000E-02 1.161E+00
1+
%Photon Photoel.
2+
%Energy Absorb.
3+
1.000E-03 1.567E+03
4+
1.500E-03 5.333E+02
5+
1.839E-03 3.071E+02
6+
1.839E-03 3.191E+03
7+
2.000E-03 2.775E+03
8+
3.000E-03 9.767E+02
9+
4.000E-03 4.514E+02
10+
5.000E-03 2.438E+02
11+
6.000E-03 1.458E+02
12+
7.000E-03 9.388E+01
13+
8.000E-03 6.379E+01
14+
9.000E-03 4.521E+01
15+
1.000E-02 3.315E+01
16+
1.100E-02 2.499E+01
17+
1.200E-02 1.928E+01
18+
1.300E-02 1.517E+01
19+
1.400E-02 1.213E+01
20+
1.500E-02 9.848E+00
21+
1.600E-02 8.096E+00
22+
1.700E-02 6.730E+00
23+
1.800E-02 5.651E+00
24+
1.900E-02 4.787E+00
25+
2.000E-02 4.089E+00
26+
2.100E-02 3.518E+00
27+
2.200E-02 3.048E+00
28+
2.300E-02 2.656E+00
29+
2.400E-02 2.328E+00
30+
2.500E-02 2.051E+00
31+
2.600E-02 1.815E+00
32+
2.700E-02 1.614E+00
33+
2.800E-02 1.440E+00
34+
2.900E-02 1.291E+00
35+
3.000E-02 1.161E+00

chxtools/X-ray_database/id_CHX_IVU20_01162017.dat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
% data from measurements 01/16/17
22
% manually taken for center of undulator cone
3-
% K colkumn is a placeholder!
4-
% ID gap [mm] K E_1 [keV]
3+
% K colkumn is a placeholder!
4+
% ID gap [mm] K E_1 [keV]
55
5.20 1.0 1.3782
66
5.40 1.0 1.4504
77
5.60 1.0 1.525
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
% data from measurements 03/18/16
2-
% K colkumn is a placeholder!
3-
% ID gap [mm] K E_1 [keV]
2+
% K colkumn is a placeholder!
3+
% ID gap [mm] K E_1 [keV]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
% data from measurements 03/22/16
2-
% K colkumn is a placeholder!
3-
% ID gap [mm] K E_1 [keV]
2+
% K colkumn is a placeholder!
3+
% ID gap [mm] K E_1 [keV]

chxtools/X-ray_database/id_CHX_IVU20_05272017.dat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% data from measurements 05/27/17
2-
% K colkumn is a placeholder!
3-
% ID gap [mm] K E_1 [keV]
2+
% K colkumn is a placeholder!
3+
% ID gap [mm] K E_1 [keV]
44
5.199965 1.0 1.378589094103352
55
5.400622 1.0 1.4505010580342685
66
5.600828 1.0 1.5248993303989322

chxtools/X-ray_database/id_CHX_IVU20_06062016.dat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% data from measurements 06/06/16
2-
% K colkumn is a placeholder!
3-
% ID gap [mm] K E_1 [keV]
2+
% K colkumn is a placeholder!
3+
% ID gap [mm] K E_1 [keV]
44
5.199418 1.0 1.3673620139594027
55
5.400744 1.0 1.4390290269467232
66
5.600851 1.0 1.5129974379749154

0 commit comments

Comments
 (0)