Skip to content

Commit ee8dd92

Browse files
sbillingecadenmyers13pre-commit-ci[bot]Tieqiong
authored
Cookie (#179)
* copy .github directory * nest inside .github * update for pdfgui * test tests (#131) * pin numpy to 1.x for now * add environment.yml * test tests * trigger * try again with requirements * try again with requirements * now update test reqs * try and handle xwindow display issue * try using xfvb action * refactor xvfb action commands * source activate? * different tack, generate error and work on test? * again * again * chatgpt method * supress running qc of meta.yaml in conda-forge by renaming * try new pyproject.toml * again2 * forgot to install diffpy.pdfgui! * back to setup.py * copyright fixes (#134) * Flake8v1 (#137) * move modules to top * remove extra #s * line length and extra #s * extra #s * modules to top * replace lambda function and line length * add # noqa: E501 * modules to top * fix lambda func * Flake8v2 (#138) * fix not in * fix lambda functions * remove # * remove lambda func * modules to top * mod to top * line length and import and #s * fix line length and #s * comment unused var, fix imports and #s * modules to top and inline comment fix * def functions within function to pass tests * move functions outside of class * Flake8v4 (#140) * capitalize Trustees * Exception on errorwrapper * wx.PyObjectError in except * ValueError and Exception * Exception * remove import * pre-commit errors in comments (#141) * wx12 and bonlengthdialog (#142) * wx12 and bonlengthdialog * devutils/makedist import order * news (#143) * cookiecutter: untracked files (#149) * untracked files * [pre-commit.ci] auto fixes from pre-commit hooks * update LICENSE.rst * update AUTHORS.rst and remove AUTHORS.txt * tipping our hat * Remove BSD 3-Clause, leaving Columbia copyright * remove README from requirements * replace requirements * adding wxpython back * adding back freezegun --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Simon Billinge <[email protected]> * Files in doc directory (#157) * move images to _static * move files in .../doc/manual into doc/source * move .gitignore file * move rest of files to doc/ * move makefile from doc/source to doc/ * remove Makefile from doc/source * update Makefile in doc * add rest of cookiecutter files into doc/source * add make.bat file * moving .py files into doc/manual * move files into manual * moving images into manual * add TUTORIAL.rst * convert .txt to .rst in TUTORIAL * fix formating * formating * formating * reference formating * move TUTORIAL.rst to manual * move tutorial.rst from manual to source * rm extra tutorial.rst * add tutorial section to index.rst * index.rst formating * files (#158) * Replace Caden's PR (#160) Minor copyright fixes and news update * try workflow for testing (#161) * workflow for testing * test unittest * try Xvfb * try to remove no test ran line * [pre-commit.ci] auto fixes from pre-commit hooks * try to remove no test ran line * try pytest --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * remove unused files (#166) * update requirements/run.txt (#165) * update requirements/run.txt, include right package * use matplotlib-base * remove dependency tests (#169) * fix deprecation warning when test (#170) * fix pkg_resources deprecation warning * use __name__ * daemon deprecation * rst file changes (#171) * Use the original license * other file changes * add a bit more in readme * remove epydoc (#173) * build doc (#174) * build doc * pre commit * Apply the new workflow (#168) * Apply the new workflow * remove prerelease from docs workflow * rename to main --------- Co-authored-by: Caden Myers <[email protected]> Co-authored-by: Caden Myers <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Tieqiong <[email protected]>
1 parent a45149c commit ee8dd92

File tree

201 files changed

+2470
-1094
lines changed

Some content is hidden

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

201 files changed

+2470
-1094
lines changed

Diff for: .codecov.yml

+34-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,34 @@
1-
fixes:
2-
- ".*/site-packages/::src/"
1+
# codecov can find this file anywhere in the repo, so we don't need to clutter
2+
# the root folder.
3+
#comment: false
4+
5+
codecov:
6+
notify:
7+
require_ci_to_pass: no
8+
9+
coverage:
10+
status:
11+
patch:
12+
default:
13+
target: '70'
14+
if_no_uploads: error
15+
if_not_found: success
16+
if_ci_failed: failure
17+
project:
18+
default: false
19+
library:
20+
target: auto
21+
if_no_uploads: error
22+
if_not_found: success
23+
if_ci_failed: error
24+
paths: '!*/tests/.*'
25+
26+
tests:
27+
target: 97.9%
28+
paths: '*/tests/.*'
29+
if_not_found: success
30+
31+
flags:
32+
tests:
33+
paths:
34+
- tests/

Diff for: .coveragerc

+11-20
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
1-
# Configuration of the coverage.py tool for reporting test coverage.
2-
3-
[report]
4-
# RE patterns for lines to be excluded from consideration.
5-
exclude_lines =
6-
## Have to re-enable the standard pragma
7-
pragma: no cover
8-
## Don't complain if tests don't hit defensive assertion code:
9-
raise AssertionError
10-
raise NotImplementedError
11-
^[ ]*assert False
12-
13-
## Don't complain if non-runnable code isn't run:
14-
^[ ]*@unittest.skip\b
15-
^[ ]{4}unittest.main()
16-
if __name__ == .__main__.:
17-
18-
191
[run]
2+
source =
3+
diffpy.pdfgui
4+
[report]
205
omit =
21-
## exclude debug.py from codecov report
22-
*/tests/debug.py
6+
*/python?.?/*
7+
*/site-packages/nose/*
8+
# ignore _version.py and versioneer.py
9+
.*version.*
10+
*_version.py
11+
12+
exclude_lines =
13+
if __name__ == '__main__':

Diff for: .gitattributes

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
/.gitattributes export-ignore
2-
/.gitignore export-ignore
3-
/.travis.yml export-ignore
4-
/conda-recipe/ export-ignore
5-
/devutils export-ignore
6-
.gitarchive.cfg export-subst
7-
*.bat text eol=crlf
1+
diffpy.pdfgui/_version.py export-subst

Diff for: .github/workflows/codecov.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Gather coverage report and upload to codecov
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
release:
8+
types:
9+
- prereleased
10+
- published
11+
workflow_dispatch:
12+
13+
defaults:
14+
run:
15+
shell: bash -l {0}
16+
17+
jobs:
18+
coverage:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check out diffpy.pdfgui
22+
uses: actions/checkout@v4
23+
24+
- name: Initialize miniconda
25+
uses: conda-incubator/setup-miniconda@v3
26+
with:
27+
activate-environment: test
28+
auto-update-conda: true
29+
environment-file: environment.yml
30+
auto-activate-base: false
31+
32+
- name: Conda config
33+
run: >-
34+
conda config --set always_yes yes
35+
--set changeps1 no
36+
37+
- name: Install diffpy.pdfgui and requirements
38+
run: |
39+
conda install --file requirements/run.txt
40+
conda install --file requirements/test.txt
41+
python -m pip install -r requirements/pip.txt
42+
python -m pip install . --no-deps
43+
44+
- name: Install Xvfb
45+
run: sudo apt-get install -y xvfb
46+
47+
- name: Start Xvfb
48+
run: |
49+
export DISPLAY=:99
50+
Xvfb :99 -screen 0 1024x768x16 &
51+
52+
- name: Validate diffpy.pdfgui
53+
run: |
54+
export DISPLAY=:99
55+
coverage run -m pytest -vv -s
56+
coverage report -m
57+
codecov
58+
59+
- name: Upload coverage to Codecov
60+
uses: codecov/codecov-action@v4
61+
env:
62+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Diff for: .github/workflows/docs.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and Deploy Documentation
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
workflow_dispatch:
8+
9+
defaults:
10+
run:
11+
shell: bash -l {0}
12+
13+
jobs:
14+
docs:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out diffpy.pdfgui
18+
uses: actions/checkout@v4
19+
20+
- name: Initialize miniconda
21+
uses: conda-incubator/setup-miniconda@v3
22+
with:
23+
activate-environment: build
24+
auto-update-conda: true
25+
environment-file: environment.yml
26+
auto-activate-base: false
27+
28+
- name: Conda config
29+
run: >-
30+
conda config --set always_yes yes
31+
--set changeps1 no
32+
33+
- name: Install diffpy.pdfgui and build requirements
34+
run: |
35+
conda install --file requirements/build.txt
36+
conda install --file requirements/run.txt
37+
conda install --file requirements/docs.txt
38+
python -m pip install -r requirements/pip.txt
39+
python -m pip install . --no-deps
40+
41+
- name: build documents
42+
run: make -C doc html
43+
44+
- name: Deploy
45+
uses: peaceiris/actions-gh-pages@v4
46+
with:
47+
github_token: ${{ secrets.GITHUB_TOKEN }}
48+
publish_dir: ./doc/build/html

Diff for: .github/workflows/main.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
10+
defaults:
11+
run:
12+
shell: bash -l {0}
13+
14+
jobs:
15+
validate:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out diffpy.pdfgui
19+
uses: actions/checkout@v4
20+
21+
- name: Initialize miniconda
22+
uses: conda-incubator/setup-miniconda@v3
23+
with:
24+
activate-environment: test
25+
auto-update-conda: true
26+
environment-file: environment.yml
27+
auto-activate-base: false
28+
29+
- name: Conda config
30+
run: >-
31+
conda config --set always_yes yes
32+
--set changeps1 no
33+
34+
- name: Install diffpy.pdfgui and requirements
35+
run: |
36+
conda install --file requirements/run.txt
37+
conda install --file requirements/test.txt
38+
python -m pip install -r requirements/pip.txt
39+
python -m pip install . --no-deps
40+
41+
- name: Install Xvfb
42+
run: sudo apt-get install -y xvfb
43+
44+
- name: Start Xvfb
45+
run: |
46+
export DISPLAY=:99
47+
Xvfb :99 -screen 0 1024x768x16 &
48+
49+
- name: Validate diffpy.pdfgui
50+
run: |
51+
export DISPLAY=:99
52+
python -m pytest

Diff for: .gitignore

+72-17
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,99 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
13
*.py[cod]
4+
*$py.class
25

36
# C extensions
47
*.so
58

6-
# Packages
7-
*.egg
8-
*.egg-info
9-
dist
10-
build
11-
eggs
12-
parts
13-
bin
14-
var
15-
sdist
16-
temp
17-
develop-eggs
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
venv/
24+
*.egg-info/
1825
.installed.cfg
19-
lib
20-
lib64
21-
tags
26+
*.egg
27+
bin/
28+
temp/
29+
tags/
2230
errors.err
23-
.idea
31+
32+
# PyInstaller
33+
# Usually these files are written by a python script from a template
34+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
35+
*.manifest
36+
*.spec
2437

2538
# Installer logs
2639
pip-log.txt
40+
pip-delete-this-directory.txt
2741
MANIFEST
2842

2943
# Unit test / coverage reports
44+
htmlcov/
45+
.tox/
3046
.coverage
31-
.tox
47+
.coverage.*
48+
.cache
3249
nosetests.xml
50+
coverage.xml
51+
*,cover
52+
.hypothesis/
3353

3454
# Translations
3555
*.mo
56+
*.pot
3657

3758
# Mr Developer
3859
.mr.developer.cfg
3960
.project
4061
.pydevproject
4162

63+
# Django stuff:
64+
*.log
65+
66+
# Sphinx documentation
67+
docs/build/
68+
docs/source/generated/
69+
70+
# pytest
71+
.pytest_cache/
72+
73+
# PyBuilder
74+
target/
75+
76+
# Editor files
77+
# mac
78+
.DS_Store
79+
*~
80+
81+
# vim
82+
*.swp
83+
*.swo
84+
85+
# pycharm
86+
.idea/
87+
88+
# VSCode
89+
.vscode/
90+
91+
# Ipython Notebook
92+
.ipynb_checkpoints
93+
4294
# version information
4395
setup.cfg
4496
/src/diffpy/*/version.cfg
97+
98+
# Rever
99+
rever/

Diff for: .isort.cfg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[settings]
2+
line_length = 115
3+
multi_line_output = 3
4+
include_trailing_comma = True

0 commit comments

Comments
 (0)