-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from Tieqiong/cookierelease
cookie release
- Loading branch information
Showing
120 changed files
with
15,725 additions
and
13,322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,34 @@ | ||
fixes: | ||
- ".*/site-packages/::src/" | ||
# codecov can find this file anywhere in the repo, so we don't need to clutter | ||
# the root folder. | ||
#comment: false | ||
|
||
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,13 @@ | ||
# Configuration of the coverage.py tool for reporting test coverage. | ||
|
||
[report] | ||
# RE patterns for lines to be excluded from consideration. | ||
exclude_lines = | ||
## Have to re-enable the standard pragma | ||
pragma: no cover | ||
## 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: | ||
^[ ]*@unittest.skip\b | ||
^[ ]{4}unittest.main() | ||
if __name__ == .__main__.: | ||
|
||
|
||
[run] | ||
source = | ||
diffpy.structure | ||
[report] | ||
omit = | ||
## Exclude from codecov report: | ||
*/tests/debug.py | ||
*/apps/*.py | ||
# TODO remove in version 3.1 | ||
*/applications/*.py | ||
*/python?.?/* | ||
*/site-packages/nose/* | ||
# ignore _version.py and versioneer.py | ||
.*version.* | ||
*_version.py | ||
|
||
exclude_lines = | ||
if __name__ == '__main__': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1 @@ | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.travis.yml export-ignore | ||
/conda-recipe/ export-ignore | ||
/devutils export-ignore | ||
/doc export-ignore | ||
.gitarchive.cfg export-subst | ||
*.bat text eol=crlf | ||
diffpy.structure/_version.py export-subst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Build Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- CI | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
miniconda: | ||
name: Miniconda ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
steps: | ||
- name: check out diffpy.structure | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: diffpy/diffpy.structure | ||
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@v2 | ||
with: | ||
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: 3 | ||
auto-activate-base: false | ||
|
||
- name: install diffpy.structure 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/run.txt | ||
conda install --file requirements/test.txt | ||
pip install . | ||
- name: Validate diffpy.structure | ||
shell: bash -l {0} | ||
run: | | ||
conda activate test | ||
coverage run -m pytest -vv -s | ||
coverage report -m | ||
codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
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 | ||
- 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"] | ||
- 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] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.