Skip to content

Commit 36c2e74

Browse files
authored
Merge pull request #149 from stevenhua0320/scikit-update
skpkg: skpkg update without manual edits
2 parents e88eb06 + 1ab04ae commit 36c2e74

File tree

11 files changed

+222
-40
lines changed

11 files changed

+222
-40
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+
[email protected]. 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 [email protected]
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.

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": "[email protected]",
4+
"maintainer_github_username": "sbillinge",
5+
"contributors": "Pavol Juhas, Chris Farrow, 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": "Yes",
17+
"project_has_gui_tests": "No"
18+
}

docs/source/conf.py

Lines changed: 7 additions & 6 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,17 +22,19 @@
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()))
3333

3434
# abbreviations
35-
ab_authors = "Billinge group and community members."
35+
ab_authors = (
36+
"Pavol Juhas, Chris Farrow, Simon Billinge, Billinge Group members"
37+
)
3638

3739
# -- General configuration ------------------------------------------------
3840

@@ -56,7 +58,6 @@
5658
autodoc_mock_imports = [
5759
"diffpy.pdffit2.pdffit2",
5860
]
59-
6061
# Add any paths that contain templates here, relative to this directory.
6162
templates_path = ["_templates"]
6263

@@ -144,7 +145,7 @@
144145
"github_user": "diffpy",
145146
"github_repo": "diffpy.pdffit2",
146147
"github_version": "main",
147-
"conf_py_path": "/doc/source/",
148+
"conf_py_path": "/docs/source/",
148149
}
149150

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

src/diffpy/pdffit2/pdffit2_app.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import argparse
2+
3+
from diffpy.pdffit2.version import __version__ # noqa
4+
5+
6+
def main():
7+
parser = argparse.ArgumentParser(
8+
prog="diffpy.pdffit2",
9+
description=(
10+
"PDFfit2 - real space structure refinement program.\n\n"
11+
"For more information, visit: "
12+
"https://github.com/diffpy/diffpy.pdffit2/"
13+
),
14+
formatter_class=argparse.RawDescriptionHelpFormatter,
15+
)
16+
17+
parser.add_argument(
18+
"--version",
19+
action="store_true",
20+
help="Show the program's version number and exit",
21+
)
22+
23+
args = parser.parse_args()
24+
25+
if args.version:
26+
print(f"diffpy.pdffit2 {__version__}")
27+
else:
28+
# Default behavior when no arguments are given
29+
parser.print_help()
30+
31+
32+
if __name__ == "__main__":
33+
main()

0 commit comments

Comments
 (0)