Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
77f4e58
added configs for vscode and any jetbrains IDEs to .gitignore
8bitsam Jun 11, 2024
49fbc23
Added relevant IDE config files to .gitignore
8bitsam Jun 11, 2024
64da5cc
Add pyproject.toml with black config
8bitsam Jul 16, 2024
7ee6461
Run black
8bitsam Jul 16, 2024
18944da
Run black on full package
8bitsam Jul 16, 2024
ff5140d
Add flake8 config
8bitsam Jul 16, 2024
7d76d7d
flake8 fixes
8bitsam Jul 16, 2024
db1e936
add further error catching to test_num_datasets
8bitsam Jul 16, 2024
0f75ef0
Merge pull request #31 from 8bitsam/black
sbillinge Jul 16, 2024
3577bf0
pre-commit fixes
8bitsam Jul 16, 2024
b634598
stages uncommented
8bitsam Jul 16, 2024
f0920e8
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Jul 16, 2024
0921249
more pep8 fixes
8bitsam Jul 16, 2024
545cc0a
black fixes
8bitsam Jul 16, 2024
dcd0ee8
pre-commit keep imports same to not break package
8bitsam Jul 16, 2024
794324c
fix __init__.py as was broken by pre-commit bot
8bitsam Jul 16, 2024
74a0d1c
further pre-commit fixes
8bitsam Jul 16, 2024
fe5b5b0
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Jul 16, 2024
c9f5cd6
exclude __init__.py from pre-commit as it breaks imports
8bitsam Jul 16, 2024
0efa6e0
minor fixes
8bitsam Jul 16, 2024
ce3dea4
Exclude meta.yaml since hook not properly checking jinja2
8bitsam Jul 16, 2024
ccf5fb5
Merge pull request #32 from 8bitsam/precommit
sbillinge Jul 16, 2024
04f7267
Added src directory with Python code
8bitsam Jul 22, 2024
af811e8
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Jul 22, 2024
772a01e
Merge pull request #34 from 8bitsam/cookie-src
sbillinge Jul 22, 2024
1181ff6
Added C++ extensions libpdffit2 and pdffit2module
8bitsam Jul 22, 2024
5c7a025
Merge pull request #35 from 8bitsam/cookie-src
sbillinge Jul 22, 2024
3d438cc
Add relevant files for building with updated requirements
8bitsam Jul 22, 2024
7aa2db9
Add C++ requirements to environment.yml
8bitsam Jul 22, 2024
c767c62
pre-commit fixes in setup.py
8bitsam Jul 22, 2024
cb7c2ef
add diffpy.structure requirement
8bitsam Jul 22, 2024
6c0a454
Merge pull request #37 from 8bitsam/cookie-build
sbillinge Jul 22, 2024
f76d0ef
add build files
8bitsam Jul 22, 2024
0a6c179
update C++ include paths
8bitsam Jul 22, 2024
f1068f2
comment edits
8bitsam Jul 22, 2024
44d0dfe
Merge pull request #38 from 8bitsam/cookie-build
sbillinge Jul 23, 2024
d3a2283
Remove duplicate code files
8bitsam Jul 23, 2024
c6d6cff
Update init py files
8bitsam Jul 23, 2024
055ccd0
add six to requirements
8bitsam Jul 23, 2024
e77515d
run.py without pytest
8bitsam Jul 23, 2024
29d68a2
add other vars in version.py
8bitsam Jul 23, 2024
7f6ca7c
pre-commit fixes
8bitsam Jul 23, 2024
26776a3
isort fix
8bitsam Jul 23, 2024
c3d87da
Merge pull request #39 from 8bitsam/cookie-test
sbillinge Jul 23, 2024
3490497
Add cookiecutter doc files
8bitsam Jul 23, 2024
30ffb87
Add epydoc from uncookiecut version
8bitsam Jul 23, 2024
43f0406
Added workflow files
8bitsam Jul 23, 2024
b1dcb4d
update testing in main.yml
8bitsam Jul 23, 2024
57ac92a
pre-commit fixes
8bitsam Jul 23, 2024
200318c
use editable mode w/ main.yml
8bitsam Jul 23, 2024
86a074c
Merge pull request #42 from 8bitsam/cookie-wkfls
sbillinge Jul 23, 2024
1f5b929
Merge pull request #40 from 8bitsam/cookie-doc
sbillinge Jul 24, 2024
d020dbb
added AUTHORS.rst
8bitsam Jul 24, 2024
806a9b2
Added CHANGELOG.rst
8bitsam Jul 24, 2024
eb86630
Added code of conduct
8bitsam Jul 24, 2024
04c9200
Added LICENSE.rst
8bitsam Jul 24, 2024
880acae
Added isort config
8bitsam Jul 24, 2024
a09972c
Added news directory w/ template
8bitsam Jul 24, 2024
ee4dbba
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Jul 24, 2024
9fa82c9
Move examples/ and devutils/ to src/
8bitsam Jul 24, 2024
a354607
update codecov.yml
8bitsam Jul 24, 2024
66d4eb9
update coveragerc
8bitsam Jul 24, 2024
9ad618b
update MANIFEST.in
8bitsam Jul 24, 2024
b8e6a4d
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Jul 24, 2024
93107b1
remove "-e" from pip installation - fixed with MANIFEST.in change
8bitsam Jul 24, 2024
8337426
move makesdist to main repo dir to match diffpy.utils
8bitsam Jul 24, 2024
bcb722c
MANIFEST.in devuitls fix
8bitsam Jul 24, 2024
13c2150
Update AUTHORS.rst
sbillinge Jul 25, 2024
b52e7b4
columbia copyright updated to 2024
sbillinge Jul 25, 2024
ec98080
Merge pull request #43 from 8bitsam/cookie-add-files
sbillinge Jul 25, 2024
7750f1a
Move examples/ to doc/
8bitsam Jul 25, 2024
3506000
Removed .idea directory
8bitsam Jul 25, 2024
305c325
Removed build.yaml
8bitsam Jul 25, 2024
de29675
Removed travis.yml
8bitsam Jul 25, 2024
b51f396
Removed AUTHORS.txt
8bitsam Jul 25, 2024
3f0bcc2
Removed CHANGELOG.md
8bitsam Jul 25, 2024
9daab27
Removed LICENSE.txt
8bitsam Jul 25, 2024
abe80bf
Merge pull request #47 from 8bitsam/cookie-mod-files-v2
sbillinge Jul 26, 2024
7e97245
Merge pull request #49 from 8bitsam/cookie-del-files-v3
sbillinge Jul 26, 2024
b00d64b
news
sbillinge Jul 26, 2024
50c92e5
remove travis badge
sbillinge Jul 26, 2024
5f1a558
Merge pull request #50 from sbillinge/news
sbillinge Jul 26, 2024
04bfea0
run auto_api - build API
8bitsam Jul 26, 2024
a7be96b
remove duplicate epydoc/ folder in doc/
8bitsam Jul 26, 2024
0f460fd
prevent autodoc warning
8bitsam Jul 26, 2024
856d6d2
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Jul 26, 2024
79fd7d0
modify README.rst to be like cookiecutter
8bitsam Jul 26, 2024
d59c6ec
cite paper instead of repo
8bitsam Jul 26, 2024
a701551
fix citation in LICENSE.rst
8bitsam Jul 26, 2024
ee1d9c3
Merge pull request #52 from 8bitsam/cookie-readme
sbillinge Jul 27, 2024
d6c6713
make docs.yml run on "cookie" branch (temp)
8bitsam Jul 27, 2024
93d5839
make docs.yml run on PRs
8bitsam Jul 27, 2024
1fc8abd
only use diffpy.utils.rst docs API file
8bitsam Jul 27, 2024
7425a8a
give appropriate perms to docs.yml
8bitsam Jul 27, 2024
a0770f0
use correct license in docs
8bitsam Jul 27, 2024
1fb7ed3
Update PAT in docs.yml
sbillinge Jul 27, 2024
50f6211
add title to license
8bitsam Jul 27, 2024
27cd30f
minor doc api file reformatting
8bitsam Jul 27, 2024
b52720a
Merge remote-tracking branch 'origin/cookie-api-build' into cookie-ap…
8bitsam Jul 27, 2024
9d77b5e
Update try reverting permissions in docs.yml
sbillinge Jul 27, 2024
cdda602
remove on pr in docs.yml
sbillinge Jul 27, 2024
e42b9f6
Merge pull request #51 from 8bitsam/cookie-api-build
sbillinge Jul 27, 2024
26b9e2e
multi-platform testing
8bitsam Jul 27, 2024
b97db66
test on multiple python versions
8bitsam Jul 27, 2024
5bf577b
update miniconda installation step
8bitsam Jul 27, 2024
40594b8
add specific version and conda to environment.yml
8bitsam Jul 27, 2024
384f7dd
remove rever.xsh
8bitsam Jul 27, 2024
b746b47
change environment.yml python version to range
8bitsam Jul 27, 2024
b4878cb
remove mac support
8bitsam Jul 27, 2024
3459ee7
Merge pull request #53 from 8bitsam/cookie-test-platforms
sbillinge Jul 28, 2024
e496c0f
Merge pull request #54 from 8bitsam/cookie-rever
sbillinge Jul 28, 2024
5ed4cda
Add macos test
Sparks29032 Jul 30, 2024
dbb35a0
Update main.yml
Sparks29032 Jul 30, 2024
e764aad
Update environment.yml
Sparks29032 Jul 30, 2024
b8cb8e7
Update main.yml
Sparks29032 Jul 30, 2024
9e20621
Update build.txt
Sparks29032 Jul 30, 2024
8a5f205
Merge pull request #60 from Sparks29032/cookie
sbillinge Jul 30, 2024
5789b7d
don't test on push into cookie any more, linting coveragerc
sbillinge Jul 31, 2024
01906bb
Merge pull request #62 from sbillinge/workflows
sbillinge Jul 31, 2024
79b93f5
Small edit
Sparks29032 Jul 31, 2024
5db7cf6
remove unnecessary setuptools stuff
8bitsam Jul 31, 2024
82a55da
Merge pull request #63 from Sparks29032/patch-1
sbillinge Jul 31, 2024
5291599
Merge pull request #64 from 8bitsam/cookie
sbillinge Jul 31, 2024
76545d0
Match cookiecutter
Sparks29032 Jul 31, 2024
7ca10bc
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Jul 31, 2024
334ab8d
Flake8
Sparks29032 Jul 31, 2024
09d65b5
Merge pull request #65 from Sparks29032/cookie
sbillinge Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,37 @@
# codecov can find this file anywhere in the repo, so we don't need to clutter
# the root folder.
#comment: false

fixes:
- ".*/site-packages/::src/"

codecov:
notify:
require_ci_to_pass: no

coverage:
status:
patch:
default:
target: '70'
if_no_uploads: error
if_not_found: success
if_ci_failed: failure
project:
default: false
library:
target: auto
if_no_uploads: error
if_not_found: success
if_ci_failed: error
paths: '!*/tests/.*'

tests:
target: 97.9%
paths: '*/tests/.*'
if_not_found: success

flags:
tests:
paths:
- tests/
28 changes: 16 additions & 12 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
# Configuration of the coverage.py tool for reporting test coverage.

[run]
source =
diffpy.pdffit2
omit =
# exclude debug.py from codecov report
*/tests/debug.py
[report]
omit =
*/python?.?/*
*/site-packages/nose/*
# ignore _version.py and versioneer.py
.*version.*
*_version.py
# RE patterns for lines to be excluded from consideration.
exclude_lines =
## Have to re-enable the standard pragma
# Have to re-enable the standard pragma
pragma: no cover
## Don't complain if tests don't hit defensive assertion code:
# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError
^[ ]*assert False

## Don't complain if non-runnable code isn't run:
# Don't complain if non-runnable code isn't run:
^[ ]*@unittest.skip\b
^[ ]{4}unittest.main()
if __name__ == .__main__.:


[run]
omit =
## exclude debug.py from codecov report
*/tests/debug.py
if __name__ == '__main__':
11 changes: 11 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[flake8]
exclude =
.git,
__pycache__,
build,
dist,
doc/source/conf.py
max-line-length = 115
# Ignore some style 'errors' produced while formatting by 'black'
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings
extend-ignore = E203
67 changes: 0 additions & 67 deletions .github/workflows/build.yaml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build Documentation

on:
push:
branches:
- main
- cookie # to be removed during merge to main
release:

jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: build
auto-update-conda: true

- name: install requirements
run: >-
conda install -n build -c conda-forge
--file requirements/build.txt
--file requirements/run.txt
--file requirements/docs.txt
--quiet --yes

- name: install the package
run: python -m pip install . --no-deps

- name: build documents
run: make -C doc html

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/build/html
66 changes: 66 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI

on:
push:
branches:
- main
- CI
pull_request:
workflow_dispatch:

jobs:
miniconda:
name: Miniconda ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
steps:
- name: check out diffpy.pdffit2
uses: actions/checkout@v3
with:
repository: diffpy/diffpy.pdffit2
path: .
fetch-depth: 0 # avoid shallow clone with no tags

- name: initialize miniconda
# this uses a marketplace action that sets up miniconda in a way that makes
# it easier to use. I tried setting it up without this and it was a pain
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: test
# environment.yml file is needed by this action. Because I don't want
# maintain this but rather maintain the requirements files it just has
# basic things in it like conda and pip
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false

- name: install diffpy.pdffit2 requirements
shell: bash -l {0}
run: |
conda config --set always_yes yes --set changeps1 no
conda config --add channels conda-forge
conda activate test
conda install --file requirements/build.txt
conda install --file requirements/run.txt
conda install --file requirements/test.txt
pip install .
- name: Validate diffpy.pdffit2
shell: bash -l {0}
run: |
conda activate test
coverage run src/diffpy/pdffit2/tests/run.py
coverage report -m
codecov

# Use this after migrating to pytest
# - name: Validate diffpy.pdffit2
# shell: bash -l {0}
# run: |
# conda activate test
# coverage run -m pytest -vv -s
# coverage report -m
# codecov
19 changes: 19 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: pre-commit

on:
pull_request:
push:
workflow_dispatch:

jobs:
pre-commit:
# pull requests are a duplicate of a branch push if within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/action@v3.0.0
with:
extra_args: --all-files
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ lib64
tags
errors.err

# IDE configs
.idea
.vscode

# Installer logs
pip-log.txt
MANIFEST
Expand Down
4 changes: 4 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[settings]
line_length = 115
multi_line_output = 3
include_trailing_comma = True
45 changes: 45 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
default_language_version:
python: python3
ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit hooks
autofix_prs: true
autoupdate_branch: 'pre-commit-autoupdate'
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: monthly
skip: [no-commit-to-branch]
submodules: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
exclude: ^conda-recipe/meta\.yaml$
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: '\.(rst|txt)$'
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black", "--order-by-type"]
exclude: ^src/diffpy/pdffit2/__init__\.py$
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: no-commit-to-branch
name: Prevent Commit to Main Branch
args: ["--branch", "main"]
stages: [pre-commit]
Loading