Skip to content

Commit

Permalink
Merge pull request #156 from yucongalicechen/recut2
Browse files Browse the repository at this point in the history
fix: re-cookiecut to follow new group standard
  • Loading branch information
sbillinge authored Jan 29, 2025
2 parents 8ef887c + d3c9eee commit 983a7b0
Show file tree
Hide file tree
Showing 19 changed files with 570 additions and 201 deletions.
8 changes: 4 additions & 4 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
coverage:
status:
project: # more options at https://docs.codecov.com/docs/commit-status
project: # more options at https://docs.codecov.com/docs/commit-status
default:
target: auto # use the coverage from the base commit, fail if coverage is lower
threshold: 0% # allow the coverage to drop by
threshold: 0% # allow the coverage to drop by

comment:
layout: " diff, flags, files"
behavior: default
require_changes: false
require_base: false # [true :: must have a base report to post]
require_head: false # [true :: must have a head report to post]
require_base: false # [true :: must have a base report to post]
require_head: false # [true :: must have a head report to post]
hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage]
4 changes: 3 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# As of now, flake8 does not natively support configuration via pyproject.toml
# https://github.com/microsoft/vscode-flake8/issues/135
[flake8]
exclude =
.git,
__pycache__,
build,
dist,
doc/source/conf.py
max-line-length = 115
max-line-length = 79
# 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
29 changes: 20 additions & 9 deletions .github/ISSUE_TEMPLATE/release_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,41 @@ labels: "release"
assignees: ""
---

### PyPI/GitHub release checklist:
### PyPI/GitHub rc-release preparation checklist:

- [ ] All PRs/issues attached to the release are merged.
- [ ] All the badges on the README are passing.
- [ ] License information is verified as correct. If you are unsure, please comment below.
- [ ] Locally rendered documentation contains all appropriate pages, including API references (check no modules are
missing), tutorials, and other human written text is up-to-date with any changes in the code.
- [ ] Installation instructions in the README, documentation and on the website (e.g., diffpy.org) are updated.
missing), tutorials, and other human-written text is up-to-date with any changes in the code.
- [ ] Installation instructions in the README, documentation, and the website (e.g., diffpy.org) are updated.
- [ ] Successfully run any tutorial examples or do functional testing with the latest Python version.
- [ ] Grammar and writing quality are checked (no typos).
- [ ] Install `pip install build twine`, run `python -m build` and `twine check dist/*` to ensure that the package can be built and is correctly formatted for PyPI release.

Please mention @sbillinge here when you are ready for PyPI/GitHub release. Include any additional comments necessary, such as
version information and details about the pre-release here:
Please mention @sbillinge here when you are ready for PyPI/GitHub release. Include any additional comments necessary, such as version information and details about the pre-release here:

### conda-forge release checklist:
### PyPI/GitHub full-release preparation checklist:

- [ ] Create a new conda environment and install the rc from PyPI (`pip install <package-name>==??`)
- [ ] License information on PyPI is correct.
- [ ] Docs are deployed successfully to `https://www.diffpy.org/<package-name>`.
- [ ] Successfully run all tests, tutorial examples or do functional testing.

Please let @sbillinge know that all checks are done and the package is ready for full release.

### conda-forge release preparation checklist:

<!-- After @sbillinge releases the PyPI package, please check the following when creating a PR for conda-forge release.-->

- [ ] Ensure that the full release has appeared on PyPI successfully.
- [ ] New package dependencies listed in `conda.txt` and `test.txt` are added to `meta.yaml` in the feedstock.
- [ ] All relevant issues in the feedstock are addressed in the release PR.
- [ ] Close any open issues on the feedstock. Reach out to @bobleesj if you have questions.
- [ ] Tag @sbillinge and @bobleesj for conda-forge release.

### Post-release checklist

<!-- Before closing this issue, please complete the following: -->

- [ ] Run tutorial examples and conduct functional testing using the installation guide in the README. Attach screenshots/results as comments.
- [ ] Documentation (README, tutorials, API references, and websites) is deployed without broken links or missing figures.
- [ ] Run tutorial examples and conduct functional testing using the installation guide in the README. Attach screenshots/results as comments.
- [ ] Documentation (README, tutorials, API references, and websites) is deployed without broken links or missing figures.
4 changes: 3 additions & 1 deletion .github/workflows/build-wheel-release-upload.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release (GitHub/PyPI)
name: Release (GitHub/PyPI) and Deploy Docs

on:
workflow_dispatch:
Expand All @@ -11,6 +11,8 @@ jobs:
uses: Billingegroup/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0
with:
project: diffpy.labpdfproc
c_extension: false
github_admin_username: sbillinge
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/matrix-and-codecov-on-merge-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
workflow_dispatch:

jobs:
coverage:
matrix-coverage:
defaults:
run:
shell: bash -l {0}
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/publish-docs-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Deploy Documentation on Release

on:
workflow_dispatch:

jobs:
docs:
uses: Billingegroup/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0
with:
project: diffpy.labpdfproc
c_extension: false
headless: false
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,3 @@ target/

# Ipython Notebook
.ipynb_checkpoints

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

# Rever
rever/
3 changes: 2 additions & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[settings]
line_length = 115
# Keep import statement below line_length character limit
line_length = 79
multi_line_output = 3
include_trailing_comma = True
18 changes: 16 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,13 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
("index", "diffpy.labpdfproc.tex", "diffpy.labpdfproc Documentation", ab_authors, "manual"),
(
"index",
"diffpy.labpdfproc.tex",
"diffpy.labpdfproc Documentation",
ab_authors,
"manual",
),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -249,7 +255,15 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [("index", "diffpy.labpdfproc", "diffpy.labpdfproc Documentation", ab_authors, 1)]
man_pages = [
(
"index",
"diffpy.labpdfproc",
"diffpy.labpdfproc Documentation",
ab_authors,
1,
)
]

# If true, show URL addresses after external links.
# man_show_urls = False
Expand Down
23 changes: 23 additions & 0 deletions news/recut.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* no news: modified .github, .pre-commit-config.yaml and related files to follow new practice for commit and issues.

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ignore-words = ".codespell/ignore_words.txt"
skip = "*.cif"

[tool.black]
line-length = 115
line-length = 79
include = '\.pyi?$'
exclude = '''
/(
Expand Down
3 changes: 2 additions & 1 deletion src/diffpy/labpdfproc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
#
##############################################################################

"""Tools for processing x-ray powder diffraction data from laboratory sources."""
"""Tools for processing x-ray powder diffraction data
from laboratory sources."""

# package version
from diffpy.labpdfproc.version import __version__
Expand Down
Loading

0 comments on commit 983a7b0

Please sign in to comment.