Skip to content

Commit 93a7136

Browse files
authored
Merge pull request #296 from stevenhua0320/skpkg-update
skpkg: recut the package using latest skpkg-version
2 parents 6222ee9 + 3a0cba6 commit 93a7136

File tree

102 files changed

+406
-164
lines changed

Some content is hidden

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

102 files changed

+406
-164
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ exclude =
66
__pycache__,
77
build,
88
dist,
9-
doc/source/conf.py
9+
docs/source/conf.py
1010
max-line-length = 115
1111
# Ignore some style 'errors' produced while formatting by 'black'
1212
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings

.github/ISSUE_TEMPLATE/release_checklist.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,33 @@ assignees: ""
1111
- [ ] All PRs/issues attached to the release are merged.
1212
- [ ] All the badges on the README are passing.
1313
- [ ] License information is verified as correct. If you are unsure, please comment below.
14-
- [ ] Locally rendered documentation contains all appropriate pages, including API references (check no modules are
15-
missing), tutorials, and other human-written text is up-to-date with any changes in the code.
16-
- [ ] Installation instructions in the README, documentation, and the website (e.g., diffpy.org) are updated.
14+
- [ ] Locally rendered documentation contains all appropriate pages, tutorials, and other human-written text is up-to-date with any changes in the code.
15+
- [ ] All API references are included. To check this, run `conda install scikit-package` and then `package build api-doc`. Review any edits made by rerendering the docs locally.
16+
- [ ] Installation instructions in the README, documentation, and the website are updated.
1717
- [ ] Successfully run any tutorial examples or do functional testing with the latest Python version.
1818
- [ ] Grammar and writing quality are checked (no typos).
1919
- [ ] 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.
20+
- [ ] Dispatch matrix testing to test the release on all Python versions and systems. If you do not have permission to run this workflow, tag the maintainer and say `@maintainer, please dispatch matrix testing workflow`.
2021

21-
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:
22+
Please tag the maintainer (e.g., @username) in the comment here when you are ready for the PyPI/GitHub release. Include any additional comments necessary, such as version information and details about the pre-release here:
2223

2324
### PyPI/GitHub full-release preparation checklist:
2425

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

30-
Please let @sbillinge know that all checks are done and the package is ready for full release.
31+
Please let the maintainer know that all checks are done and the package is ready for full release.
3132

3233
### conda-forge release preparation checklist:
3334

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

3637
- [ ] Ensure that the full release has appeared on PyPI successfully.
37-
- [ ] New package dependencies listed in `conda.txt` and `test.txt` are added to `meta.yaml` in the feedstock.
38-
- [ ] Close any open issues on the feedstock. Reach out to @bobleesj if you have questions.
39-
- [ ] Tag @sbillinge and @bobleesj for conda-forge release.
38+
- [ ] New package dependencies listed in `conda.txt` and `tests.txt` are added to `meta.yaml` in the feedstock.
39+
- [ ] Close any open issues on the feedstock. Reach out to the maintainer if you have questions.
40+
- [ ] Tag the maintainer for conda-forge release.
4041

4142
### Post-release checklist
4243

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Build and Publish Docs on Dispatch
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
get-python-version:
8+
uses: scikit-package/release-scripts/.github/workflows/_get-python-version-latest.yml@v0
9+
with:
10+
python_version: 0
11+
12+
docs:
13+
uses: scikit-package/release-scripts/.github/workflows/_release-docs.yml@v0
14+
with:
15+
project: diffpy.pdfgui
16+
c_extension: false
17+
headless: false
18+
python_version: ${{ fromJSON(needs.get-python-version.outputs.latest_python_version) }}

.github/workflows/build-wheel-release-upload.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release (GitHub/PyPI) and Deploy Docs
1+
name: Build Wheel, Release on GitHub/PyPI, and Deploy Docs
22

33
on:
44
workflow_dispatch:
@@ -7,7 +7,7 @@ on:
77
- "*" # Trigger on all tags initially, but tag and release privilege are verified in _build-wheel-release-upload.yml
88

99
jobs:
10-
release:
10+
build-release:
1111
uses: scikit-package/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0
1212
with:
1313
project: diffpy.pdfgui
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Matrix and Codecov
2+
3+
on:
4+
# push:
5+
# branches:
6+
# - main
7+
release:
8+
types:
9+
- prereleased
10+
- published
11+
workflow_dispatch:
12+
13+
jobs:
14+
matrix-coverage:
15+
uses: scikit-package/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
16+
with:
17+
project: diffpy.pdfgui
18+
c_extension: false
19+
headless: false
20+
secrets:
21+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/tests-on-pr.yml

Lines changed: 8 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,15 @@
11
name: Tests on PR
22

33
on:
4-
push:
5-
branches:
6-
- main
74
pull_request:
85
workflow_dispatch:
96

107
jobs:
11-
validate:
12-
defaults:
13-
run:
14-
shell: bash -l {0}
15-
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-
python-version: 3.13
29-
30-
- name: Conda config
31-
run: >-
32-
conda config --set always_yes yes
33-
--set changeps1 no
34-
35-
- name: Install diffpy.pdfgui and requirements
36-
run: |
37-
conda install --file requirements/test.txt
38-
conda install wxpython diffpy.utils matplotlib-base
39-
pip install diffpy.pdffit2==1.5.0rc1
40-
python -m pip install . --no-deps
41-
42-
- name: Start Xvfb
43-
run: |
44-
sudo apt-get install -y xvfb
45-
export DISPLAY=:99
46-
Xvfb :99 -screen 0 1024x768x16 &
47-
48-
- name: Validate diffpy.pdfgui
49-
run: |
50-
export DISPLAY=:99
51-
pytest --cov
52-
coverage report -m
53-
codecov
54-
55-
- name: Upload coverage to Codecov
56-
uses: codecov/codecov-action@v4
57-
with:
58-
verbose: true
59-
fail_ci_if_error: true
60-
token: ${{ secrets.CODECOV_TOKEN }}
8+
tests-on-pr:
9+
uses: scikit-package/release-scripts/.github/workflows/_tests-on-pr.yml@v0
10+
with:
11+
project: diffpy.pdfgui
12+
c_extension: false
13+
headless: false
14+
secrets:
15+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.isort.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[settings]
2+
# Keep import statement below line_length character limit
23
line_length = 115
34
multi_line_output = 3
45
include_trailing_comma = True

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ python:
1010
- requirements: requirements/docs.txt
1111

1212
sphinx:
13-
configuration: doc/source/conf.py
13+
configuration: docs/source/conf.py

CODE-OF-CONDUCT.rst

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
=====================================
2+
Contributor Covenant Code of Conduct
3+
=====================================
4+
5+
Our Pledge
6+
----------
7+
8+
We as members, contributors, and leaders pledge to make participation in our
9+
community a harassment-free experience for everyone, regardless of age, body
10+
size, visible or invisible disability, ethnicity, sex characteristics, gender
11+
identity and expression, level of experience, education, socioeconomic status,
12+
nationality, personal appearance, race, caste, color, religion, or sexual
13+
identity and orientation.
14+
15+
We pledge to act and interact in ways that contribute to an open, welcoming,
16+
diverse, inclusive, and healthy community.
17+
18+
Our Standards
19+
-------------
20+
21+
Examples of behavior that contributes to a positive environment for our
22+
community include:
23+
24+
* Demonstrating empathy and kindness toward other people
25+
* Being respectful of differing opinions, viewpoints, and experiences
26+
* Giving and gracefully accepting constructive feedback
27+
* Accepting responsibility and apologizing to those affected by our mistakes,
28+
and learning from the experience
29+
* Focusing on what is best not just for us as individuals, but for the overall
30+
community
31+
32+
Examples of unacceptable behavior include:
33+
34+
* The use of sexualized language or imagery, and sexual attention or advances of
35+
any kind
36+
* Trolling, insulting or derogatory comments, and personal or political attacks
37+
* Public or private harassment
38+
* Publishing others' private information, such as a physical or email address,
39+
without their explicit permission
40+
* Other conduct which could reasonably be considered inappropriate in a
41+
professional setting
42+
43+
Enforcement Responsibilities
44+
----------------------------
45+
46+
Community leaders are responsible for clarifying and enforcing our standards of
47+
acceptable behavior and will take appropriate and fair corrective action in
48+
response to any behavior that they deem inappropriate, threatening, offensive,
49+
or harmful.
50+
51+
Community leaders have the right and responsibility to remove, edit, or reject
52+
comments, commits, code, wiki edits, issues, and other contributions that are
53+
not aligned to this Code of Conduct, and will communicate reasons for moderation
54+
decisions when appropriate.
55+
56+
Scope
57+
-----
58+
59+
This Code of Conduct applies within all community spaces, and also applies when
60+
an individual is officially representing the community in public spaces.
61+
Examples of representing our community include using an official email address,
62+
posting via an official social media account, or acting as an appointed
63+
representative at an online or offline event.
64+
65+
Enforcement
66+
-----------
67+
68+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
69+
reported to the community leaders responsible for enforcement at
70+
sbillinge@ucsb.edu. All complaints will be reviewed and investigated promptly and fairly.
71+
72+
All community leaders are obligated to respect the privacy and security of the
73+
reporter of any incident.
74+
75+
Enforcement Guidelines
76+
----------------------
77+
78+
Community leaders will follow these Community Impact Guidelines in determining
79+
the consequences for any action they deem in violation of this Code of Conduct:
80+
81+
1. Correction
82+
****************
83+
84+
**Community Impact**: Use of inappropriate language or other behavior deemed
85+
unprofessional or unwelcome in the community.
86+
87+
**Consequence**: A private, written warning from community leaders, providing
88+
clarity around the nature of the violation and an explanation of why the
89+
behavior was inappropriate. A public apology may be requested.
90+
91+
2. Warning
92+
*************
93+
94+
**Community Impact**: A violation through a single incident or series of
95+
actions.
96+
97+
**Consequence**: A warning with consequences for continued behavior. No
98+
interaction with the people involved, including unsolicited interaction with
99+
those enforcing the Code of Conduct, for a specified period of time. This
100+
includes avoiding interactions in community spaces as well as external channels
101+
like social media. Violating these terms may lead to a temporary or permanent
102+
ban.
103+
104+
3. Temporary Ban
105+
******************
106+
107+
**Community Impact**: A serious violation of community standards, including
108+
sustained inappropriate behavior.
109+
110+
**Consequence**: A temporary ban from any sort of interaction or public
111+
communication with the community for a specified period of time. No public or
112+
private interaction with the people involved, including unsolicited interaction
113+
with those enforcing the Code of Conduct, is allowed during this period.
114+
Violating these terms may lead to a permanent ban.
115+
116+
4. Permanent Ban
117+
******************
118+
119+
**Community Impact**: Demonstrating a pattern of violation of community
120+
standards, including sustained inappropriate behavior, harassment of an
121+
individual, or aggression toward or disparagement of classes of individuals.
122+
123+
**Consequence**: A permanent ban from any sort of public interaction within the
124+
community.
125+
126+
Attribution
127+
-----------
128+
129+
This Code of Conduct is adapted from the `Contributor Covenant <https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>`_.
130+
131+
Community Impact Guidelines were inspired by `Mozilla's code of conduct enforcement ladder <https://github.com/mozilla/inclusion>`_.
132+
133+
For answers to common questions about this code of conduct, see the `FAQ <https://www.contributor-covenant.org/faq>`_. `Translations are available <https://www.contributor-covenant.org/translations>`_

README.rst

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
:target: https://anaconda.org/conda-forge/diffpy.pdfgui
2626

2727
.. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff
28+
:target: https://github.com/diffpy/diffpy.pdfgui/pulls
2829

2930
.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.pdfgui
3031
:target: https://pypi.org/project/diffpy.pdfgui/
@@ -35,8 +36,7 @@
3536
.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue
3637
:target: https://github.com/diffpy/diffpy.pdfgui/issues
3738

38-
Graphical user interface program for structure refinements to the atomic
39-
pair distribution function.
39+
Graphical user interface program for structure refinements to the atomic pair distribution function.
4040

4141
For users who do not have the expertise or necessity for command
4242
line analysis, PDFgui is a convenient and easy to use graphical front
@@ -74,19 +74,35 @@ The preferred method is to use `Miniconda Python
7474
<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html>`_
7575
and install from the "conda-forge" channel of Conda packages.
7676

77-
Add the "conda-forge" channel by running the following command in a terminal: ::
77+
To add "conda-forge" to the conda channels, run the following in a terminal. ::
7878

7979
conda config --add channels conda-forge
8080

81-
Create a new environment named ``diffpy.pdfgui_env`` and install ``diffpy.pdfgui``: ::
81+
We want to install our packages in a suitable conda environment.
82+
The following creates and activates a new environment named ``diffpy.pdfgui_env`` ::
8283

8384
conda create -n diffpy.pdfgui_env diffpy.pdfgui
85+
conda activate diffpy.pdfgui_env
8486

85-
Activate the environment: ::
87+
The output should print the latest version displayed on the badges above.
8688

87-
conda activate diffpy.pdfgui_env
89+
If the above does not work, you can use ``pip`` to download and install the latest release from
90+
`Python Package Index <https://pypi.python.org>`_.
91+
To install using ``pip`` into your ``diffpy.pdfgui_env`` environment, type ::
92+
93+
pip install diffpy.pdfgui
94+
95+
If you prefer to install from sources, after installing the dependencies, obtain the source archive from
96+
`GitHub <https://github.com/diffpy/diffpy.pdfgui/>`_. Once installed, ``cd`` into your ``diffpy.pdfgui`` directory
97+
and run the following ::
98+
99+
pip install .
100+
101+
This package also provides command-line utilities. To check the software has been installed correctly, type ::
102+
103+
diffpy.pdfgui --version
88104

89-
Confirm that the installation was successful: ::
105+
You can also type the following command to verify the installation. ::
90106

91107
python -c "import diffpy.pdfgui; print(diffpy.pdfgui.__version__)"
92108

@@ -162,12 +178,12 @@ trying to commit again.
162178

163179
Improvements and fixes are always appreciated.
164180

165-
Before contributing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.pdfgui/blob/main/CODE_OF_CONDUCT.rst>`_.
181+
Before contributing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.pdfgui/blob/main/CODE-OF-CONDUCT.rst>`_.
166182

167183
Contact
168184
-------
169185

170-
For more information on diffpy.pdfgui please visit the project `web-page <https://diffpy.github.io/>`_ or email Simon Billinge at sb2896@columbia.edu.
186+
For more information on diffpy.pdfgui please visit the project `web-page <https://diffpy.github.io/>`_ or email the maintainers ``Simon Billinge(sbillinge@ucsb.edu)``.
171187

172188
Acknowledgements
173189
----------------

0 commit comments

Comments
 (0)