Skip to content

Commit ad597ce

Browse files
authored
Merge pull request #123 from sbillinge/cr2
PDFmorph cookiecuttered! passing tests.
2 parents fdc32c9 + 4d2c128 commit ad597ce

Some content is hidden

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

49 files changed

+1118
-1006
lines changed

Diff for: .codecov.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ coverage:
2020
target: auto
2121
if_no_uploads: error
2222
if_not_found: success
23-
if_ci_failed: failure
23+
if_ci_failed: error
2424
paths: '!*/tests/.*'
2525

2626
tests:

Diff for: .coveragerc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[run]
22
source =
3-
src/diffpy/pdfmorph/
3+
diffpy.pdfmorph
44
[report]
55
omit =
66
*/python?.?/*

Diff for: .flake8

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ exclude =
77
doc/source/conf.py
88
max-line-length = 115
99
# Ignore some style 'errors' produced while formatting by 'black'
10-
ignore = W503
10+
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings
11+
extend-ignore = E203

Diff for: .gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
diffpy.pdfmorph/_version.py export-subst

Diff for: .github/workflows/docs.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
- main
77
release:
88

9-
109
jobs:
1110
test:
1211
runs-on: ubuntu-latest
@@ -35,10 +34,10 @@ jobs:
3534
run: python -m pip install . --no-deps
3635

3736
- name: build documents
38-
run: make -C doc/manual html
37+
run: make -C doc html
3938

4039
- name: Deploy
4140
uses: peaceiris/actions-gh-pages@v4
4241
with:
4342
github_token: ${{ secrets.GITHUB_TOKEN }}
44-
publish_dir: ./doc/manual/build/html
43+
publish_dir: ./doc/build/html

Diff for: .github/workflows/main.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- CI
78
pull_request:
89
workflow_dispatch:
910

@@ -19,9 +20,8 @@ jobs:
1920
uses: actions/checkout@v3
2021
with:
2122
repository: diffpy/diffpy.pdfmorph
22-
# for bookkeeping have diffpy.pdfmorph at the same level as everything else in the
23-
# directory tree
2423
path: .
24+
fetch-depth: 0 # avoid shallow clone with no tags
2525

2626
- name: initialize miniconda
2727
# this uses a marketplace action that sets up miniconda in a way that makes
@@ -36,7 +36,7 @@ jobs:
3636
python-version: 3
3737
auto-activate-base: false
3838

39-
- name: install pdfmorph requirements
39+
- name: install diffpy.pdfmorph requirements
4040
shell: bash -l {0}
4141
run: |
4242
conda config --set always_yes yes --set changeps1 no
@@ -45,12 +45,10 @@ jobs:
4545
conda install --file requirements/run.txt
4646
conda install --file requirements/test.txt
4747
pip install .
48-
49-
- name: Validate pdfmorph
48+
- name: Validate diffpy.pdfmorph
5049
shell: bash -l {0}
5150
run: |
5251
conda activate test
53-
pdfmorph --help # Check run on command line
54-
python -m coverage run run_tests.py # use `python -m` to search for modules within env
52+
coverage run -m pytest -vv -s
5553
coverage report -m
5654
codecov

Diff for: .github/workflows/pre-commit.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
workflow_dispatch:
7+
8+
jobs:
9+
pre-commit:
10+
# pull requests are a duplicate of a branch push if within the same repo.
11+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
12+
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-python@v4
17+
- uses: pre-commit/[email protected]
18+
with:
19+
extra_args: --all-files

Diff for: .gitignore

+32-29
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,14 @@ lib64/
2020
parts/
2121
sdist/
2222
var/
23+
venv/
2324
*.egg-info/
2425
.installed.cfg
2526
*.egg
27+
bin/
28+
temp/
29+
tags/
30+
errors.err
2631

2732
# PyInstaller
2833
# Usually these files are written by a python script from a template
@@ -33,6 +38,7 @@ var/
3338
# Installer logs
3439
pip-log.txt
3540
pip-delete-this-directory.txt
41+
MANIFEST
3642

3743
# Unit test / coverage reports
3844
htmlcov/
@@ -49,48 +55,45 @@ coverage.xml
4955
*.mo
5056
*.pot
5157

58+
# Mr Developer
59+
.mr.developer.cfg
60+
.project
61+
.pydevproject
62+
5263
# Django stuff:
5364
*.log
54-
local_settings.py
55-
56-
# Flask stuff:
57-
instance/
58-
.webassets-cache
59-
60-
# Scrapy stuff:
61-
.scrapy
6265

6366
# Sphinx documentation
64-
docs/_build/
67+
docs/build/
68+
docs/source/generated/
69+
70+
# pytest
71+
.pytest_cache/
6572

6673
# PyBuilder
6774
target/
6875

69-
# IPython Notebook
70-
.ipynb_checkpoints
71-
72-
# pyenv
73-
.python-version
76+
# Editor files
77+
# mac
78+
.DS_Store
79+
*~
7480

75-
# celery beat schedule file
76-
celerybeat-schedule
81+
# vim
82+
*.swp
83+
*.swo
7784

78-
# dotenv
79-
.env
85+
# pycharm
86+
.idea/
8087

81-
# virtualenv
82-
venv/
83-
ENV/
88+
# VSCode
89+
.vscode/
8490

85-
# Spyder project settings
86-
.spyderproject
91+
# Ipython Notebook
92+
.ipynb_checkpoints
8793

88-
# Rope project settings
89-
.ropeproject
94+
# version information
95+
setup.cfg
96+
/src/diffpy/*/version.cfg
9097

91-
# pycharm
92-
.idea/
93-
# Mac
94-
.DS_Store
9598
# Rever
9699
rever/

Diff for: .pre-commit-config.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,27 @@ ci:
1111
submodules: false
1212
repos:
1313
- repo: https://github.com/pre-commit/pre-commit-hooks
14-
rev: v4.4.0
14+
rev: v4.6.0
1515
hooks:
1616
- id: check-yaml
1717
- id: end-of-file-fixer
1818
- id: trailing-whitespace
1919
exclude: '\.(rst|txt)$'
20-
- repo: https://github.com/ambv/black
21-
rev: 23.3.0
20+
- repo: https://github.com/psf/black
21+
rev: 24.4.2
2222
hooks:
2323
- id: black
2424
- repo: https://github.com/pycqa/flake8
25-
rev: 6.1.0
25+
rev: 7.0.0
2626
hooks:
2727
- id: flake8
2828
- repo: https://github.com/pycqa/isort
29-
rev: 5.12.0
29+
rev: 5.13.2
3030
hooks:
3131
- id: isort
3232
args: ["--profile", "black"]
3333
- repo: https://github.com/kynan/nbstripout
34-
rev: 0.6.1
34+
rev: 0.7.1
3535
hooks:
3636
- id: nbstripout
3737
- repo: https://github.com/pre-commit/pre-commit-hooks

Diff for: AUTHORS.rst

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
Authors
2-
====================
2+
=======
33

4-
Christopher L. Farrow, Christopher James Wright, Pavol Juhas,
5-
Chia-Hao (Timothy) Liu, Timur Davis, S. Matthew Román, Simon J.L.
6-
Billinge
4+
Billinge Group and community contibutors.
75

86
Contributors
97
------------
10-
For a list of contributors, visit
8+
9+
For a list of contributors, visit
1110
https://github.com/diffpy/diffpy.pdfmorph/graphs/contributors

Diff for: CHANGELOG.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
==========================
1+
=============
22
Release Notes
3-
==========================
3+
=============
44

55
.. current developments
66

0 commit comments

Comments
 (0)