Skip to content

Commit f790680

Browse files
committed
skpkg: scikit-update the package.
1 parent e88eb06 commit f790680

26 files changed

+402
-258
lines changed

.flake8

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
# As of now, flake8 does not natively support configuration via pyproject.toml
2+
# https://github.com/microsoft/vscode-flake8/issues/135
13
[flake8]
24
exclude =
35
.git,
46
__pycache__,
57
build,
68
dist,
7-
doc/source/conf.py
9+
docs/source/conf.py
810
max-line-length = 115
911
# Ignore some style 'errors' produced while formatting by 'black'
1012
# 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Please let the maintainer know that all checks are done and the package is ready
3434
<!-- After the maintainer releases the PyPI package, please check the following when creating a PR for conda-forge release.-->
3535

3636
- [ ] 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.
37+
- [ ] New package dependencies listed in `conda.txt` and `tests.txt` are added to `meta.yaml` in the feedstock.
3838
- [ ] Close any open issues on the feedstock. Reach out to the maintainer if you have questions.
3939
- [ ] Tag the maintainer for conda-forge release.
4040

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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.pdffit2

.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+
sb2896@columbia.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>`_

LICENSE.rst

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,26 @@ For more information please visit the project web-page:
2121
or email Prof. Simon Billinge at sb2896@columbia.edu
2222

2323
Redistribution and use in source and binary forms, with or without
24-
modification, are permitted provided that the following conditions
25-
are met:
26-
27-
* Redistributions of source code must retain the above copyright
28-
notice, this list of conditions and the following disclaimer.
29-
30-
* Redistributions in binary form must reproduce the above copyright
31-
notice, this list of conditions and the following disclaimer in the
32-
documentation and/or other materials provided with the distribution.
33-
34-
* Neither the name of the copyright holder nor the names of its
35-
contributors may be used to endorse or promote products derived from
36-
this software without specific prior written permission.
37-
38-
THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS". COPYRIGHT HOLDER
39-
EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, EITHER
40-
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
41-
WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS, ADEQUACY OR SUITABILITY
42-
FOR A PARTICULAR PURPOSE, AND ANY WARRANTIES OF FREEDOM FROM
43-
INFRINGEMENT OF ANY DOMESTIC OR FOREIGN PATENT, COPYRIGHTS, TRADE
44-
SECRETS OR OTHER PROPRIETARY RIGHTS OF ANY PARTY. IN NO EVENT SHALL
45-
COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR ANY DIRECT, INDIRECT,
46-
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
47-
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
48-
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
49-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
50-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
51-
THIS SOFTWARE OR RELATING TO THIS AGREEMENT, EVEN IF ADVISED OF THE
52-
POSSIBILITY OF SUCH DAMAGE.
24+
modification, are permitted provided that the following conditions are met:
25+
26+
1. Redistributions of source code must retain the above copyright notice, this
27+
list of conditions and the following disclaimer.
28+
29+
2. Redistributions in binary form must reproduce the above copyright notice,
30+
this list of conditions and the following disclaimer in the documentation
31+
and/or other materials provided with the distribution.
32+
33+
3. Neither the name of the copyright holder nor the names of its contributors
34+
may be used to endorse or promote products derived from this software
35+
without specific prior written permission.
36+
37+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
38+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
39+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
40+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
41+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
42+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
43+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
44+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
46+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.rst

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

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

2930
.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.pdffit2
3031
:target: https://pypi.org/project/diffpy.pdffit2/
@@ -108,24 +109,31 @@ Create a new conda environment ``diffpy.pdffit2_env``: ::
108109

109110
conda create -n diffpy.pdffit2_env python=3.13
110111

111-
Activate the environment: ::
112-
113-
conda activate diffpy.pdffit2_env
114-
115-
Install pdffit2 using ``pip`` to download and install the latest version from `Python Package Index <https://pypi.python.org>`_: ::
112+
If the above does not work, you can use ``pip`` to download and install the latest release from
113+
`Python Package Index <https://pypi.python.org>`_.
114+
To install using ``pip`` into your ``diffpy.pdffit2_env`` environment, type ::
116115

117116
pip install diffpy.pdffit2
118117

119-
To confirm that the installation was successful, type ::
120-
121-
python -c "import diffpy.pdffit2; print(diffpy.pdffit2.__version__)"
122-
123118
If you prefer to install from sources, after installing the dependencies, obtain the source archive from
124119
`GitHub <https://github.com/diffpy/diffpy.pdffit2/>`_. Once installed, ``cd`` into your ``diffpy.pdffit2`` directory
125120
and run the following ::
126121

127122
pip install .
128123

124+
This package also provides command-line utilities. To check the software has been installed correctly, type ::
125+
126+
diffpy.pdffit2 --version
127+
128+
You can also type the following command to verify the installation. ::
129+
130+
python -c "import diffpy.pdffit2; print(diffpy.pdffit2.__version__)"
131+
132+
133+
To view the basic usage and available commands, type ::
134+
135+
diffpy.pdffit2 -h
136+
129137
Getting Started
130138
---------------
131139

@@ -170,7 +178,7 @@ trying to commit again.
170178

171179
Improvements and fixes are always appreciated.
172180

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

175183
Contact
176184
-------

cookiecutter.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"maintainer_name": "Simon Billinge",
3+
"maintainer_email": "sb2896@columbia.edu",
4+
"maintainer_github_username": "sbillinge",
5+
"contributors": "Sangjoon Lee, Simon Billinge, Billinge Group members",
6+
"license_holders": "The Trustees of Columbia University in the City of New York",
7+
"project_name": "diffpy.pdffit2",
8+
"github_username_or_orgname": "diffpy",
9+
"github_repo_name": "diffpy.pdffit2",
10+
"conda_pypi_package_dist_name": "diffpy.pdffit2",
11+
"package_dir_name": "diffpy.pdffit2",
12+
"project_short_description": "PDFfit2 - real space structure refinement program.",
13+
"project_keywords": "PDF, structure refinement",
14+
"minimum_supported_python_version": "3.11",
15+
"maximum_supported_python_version": "3.13",
16+
"project_needs_c_code_compiled": "No",
17+
"project_has_gui_tests": "No"
18+
}

docs/source/conf.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# diffpy.pdffit2 documentation build configuration file, created by
4+
# diffpy.pdffit2 documentation build configuration file, created by # noqa: E501
55
# sphinx-quickstart on Thu Jan 30 15:49:41 2014.
66
#
77
# This file is execfile()d with the current directory set to its
@@ -22,11 +22,11 @@
2222
try:
2323
fullversion = version("diffpy.pdffit2")
2424
except Exception:
25-
fullversion = "No version found. The correct version will appear in the released version."
25+
fullversion = "No version found. The correct version will appear in the released version." # noqa: E501
2626

2727
# If extensions (or modules to document with autodoc) are in another directory,
2828
# add these directories to sys.path here. If the directory is relative to the
29-
# documentation root, use Path().resolve() to make it absolute, like shown here.
29+
# documentation root, use Path().resolve() to make it absolute, like shown here. # noqa: E501
3030
# sys.path.insert(0, str(Path(".").resolve()))
3131
sys.path.insert(0, str(Path("../..").resolve()))
3232
sys.path.insert(0, str(Path("../../src").resolve()))
@@ -53,10 +53,6 @@
5353
"m2r",
5454
]
5555

56-
autodoc_mock_imports = [
57-
"diffpy.pdffit2.pdffit2",
58-
]
59-
6056
# Add any paths that contain templates here, relative to this directory.
6157
templates_path = ["_templates"]
6258

@@ -79,7 +75,6 @@
7975
# |version| and |release|, also used in various other places throughout the
8076
# built documents.
8177

82-
fullversion = version(project)
8378
# The short X.Y version.
8479
version = "".join(fullversion.split(".post")[:1])
8580
# The full version, including alpha/beta/rc tags.
@@ -144,7 +139,7 @@
144139
"github_user": "diffpy",
145140
"github_repo": "diffpy.pdffit2",
146141
"github_version": "main",
147-
"conf_py_path": "/doc/source/",
142+
"conf_py_path": "/docs/source/",
148143
}
149144

150145
# Theme options are theme-specific and customize the look and feel of a theme

0 commit comments

Comments
 (0)