Skip to content

Redo the cookie cutter #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ coverage:
target: auto
if_no_uploads: error
if_not_found: success
if_ci_failed: failure
if_ci_failed: error
paths: '!*/tests/.*'

tests:
Expand Down
29 changes: 5 additions & 24 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,32 +1,13 @@
# Configuration of the coverage.py tool for reporting test coverage.

[run]
source =
diffpy.utils
[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__.:
omit =
*/python?.?/*
*/site-packages/nose/*
# ignore _version.py and versioneer.py
.*version.*
*_version.py
# ignore wx directory
*/wx/*


[run]
source =
src/diffpy/utils/
omit =
## exclude debug.py from codecov report
*/tests/debug.py
exclude_lines =
if __name__ == '__main__':
5 changes: 2 additions & 3 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ exclude =
__pycache__,
build,
dist,
versioneer.py,
doc/manual/source/conf.py
doc/source/conf.py
max-line-length = 115
# Ignore some style 'errors' produced while formatting by 'black' (see link below)
# 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
12 changes: 12 additions & 0 deletions .github/workflows/check-news-item.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Check for News

on:
pull_request_target:
branches:
- main

jobs:
check-news-item:
uses: Billingegroup/release-scripts/.github/workflows/_check-news-item.yml@v0
with:
project: diffpy.utils
53 changes: 0 additions & 53 deletions .github/workflows/codecov.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/docs.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/main.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/matrix-and-codecov-on-merge-to-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Codecov and matrix

on:
push:
branches:
- main
release:
types:
- prereleased
- published
workflow_dispatch:

jobs:
coverage-and-matrix:
uses: Billingegroup/release-scripts/.github/workflows/_coverage-and-matrix.yml@v0
with:
project: diffpy.utils
c_extension: false
headless: false
14 changes: 14 additions & 0 deletions .github/workflows/publish-docs-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Build and Deploy Docs

on:
release:
types:
- published
workflow_dispatch:

jobs:
publish-docs-on-release:
uses: Billingegroup/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0
with:
project: diffpy.utils
c_extension: false
16 changes: 16 additions & 0 deletions .github/workflows/tests-on-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Tests on PR

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

jobs:
tests-on-pr:
uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0
with:
project: diffpy.utils
c_extension: false
headless: false
88 changes: 69 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,49 +1,99 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
temp
develop-eggs
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
venv/
*.egg-info/
.installed.cfg
lib
lib64
tags
*.egg
bin/
temp/
tags/
errors.err

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
MANIFEST

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.tox
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# Django stuff:
*.log

# Sphinx documentation
docs/build/
docs/source/generated/

# pytest
.pytest_cache/

# PyBuilder
target/

# Editor files
# mac
.DS_Store
*~

# vim
*.swp
*.swo

# pycharm
.idea/

# VSCode
.vscode/

# Ipython Notebook
.ipynb_checkpoints

# version information
setup.cfg
/src/diffpy/*/version.cfg

# Rever
rever/

# PyCharm
.idea/
Loading