Skip to content

Commit d6fc863

Browse files
committed
skpkg: add CHAGELOG.rst, README.rst, license, update pyproject.toml
1 parent 36c2e74 commit d6fc863

File tree

4 files changed

+43
-120
lines changed

4 files changed

+43
-120
lines changed

CHANGELOG.rst

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -3,71 +3,3 @@ Release notes
33
=============
44

55
.. current developments
6-
7-
1.5.1
8-
=====
9-
10-
**Fixed:**
11-
12-
* Fixed `SystemError` and `MemoryError` for `redirect_stdout` on Windows with Python 3.13.
13-
14-
**Removed:**
15-
16-
* Removed `restore_stdout` function and wrapper.
17-
18-
19-
1.5.0
20-
=====
21-
22-
**Added:**
23-
24-
* Python 3.11, 3.12 support
25-
* Option to skip printing of introductory information when initializing the `PdfFit` class.
26-
* Added additional runtime linker flags in `CustomBuildExt.run` to embed the `RPATH` flags for the built extensions.
27-
* Support for retrieving GSL configuration from `CONDA_PREFIX`/ `GSL_PATH` on all platforms.
28-
* Separate installation instruction for macOS (Arm64) in READEM
29-
* Added `restore_stdout` function and wrapper.
30-
* Added Python 3.13 support.
31-
32-
**Changed:**
33-
34-
* Changed setup.py to lazy evaluate gsl installation.
35-
* Documentation brought up to date
36-
* Merged the GSL configuration logic in `setup.py`.
37-
* Changed `pytest` `capture_output` fixture. Now automatically restores `sys.stdout`.
38-
39-
**Fixed:**
40-
41-
* remove older conda-recipe files
42-
* moved the tests directory from src to the root using conftest.py.
43-
* fixed a circular import bug during " pip install ." in GitHub CI.
44-
* renamed .py files under tests to snake_case.
45-
* add PyPI packages under pip.txt
46-
* re-cookiecutter to group's package standard
47-
* Fix missing `__date__`, use PyPI release date.
48-
* Fixed `SystemError` when running `pytest` on Windows with Python 3.13.
49-
50-
**Removed:**
51-
52-
* Python <= 3.10 support
53-
* Six dependency and py2 support
54-
55-
56-
1.4.2
57-
=====
58-
59-
**Added:**
60-
61-
* Support for Python 3.11, 3.12
62-
63-
**Changed:**
64-
65-
* No notable functional changes from 1.4.1
66-
67-
1.4.4rc0
68-
========
69-
70-
**Fixed:**
71-
72-
* Code linted to group flake8 standards
73-
* Package structure moved to diffpy standard structure

README.rst

Lines changed: 17 additions & 23 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/
@@ -78,11 +79,6 @@ If you use diffpy.pdffit2 in a scientific publication, we would like you to cite
7879
Installation
7980
------------
8081

81-
diffpy.pdffit2 supports Python 3.11, 3.12, and 3.13.
82-
83-
Windows, macOS (non-Arm64), Linux
84-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85-
8682
The preferred method is to use `Miniconda Python
8783
<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html>`_
8884
and install from the "conda-forge" channel of Conda packages.
@@ -97,34 +93,32 @@ The following creates and activates a new environment named ``diffpy.pdffit2_env
9793
conda create -n diffpy.pdffit2_env diffpy.pdffit2
9894
conda activate diffpy.pdffit2_env
9995

100-
To confirm that the installation was successful, type ::
101-
102-
python -c "import diffpy.pdffit2; print(diffpy.pdffit2.__version__)"
103-
104-
macOS (Arm64)
105-
~~~~~~~~~~~~~
96+
The output should print the latest version displayed on the badges above.
10697

107-
Create a new conda environment ``diffpy.pdffit2_env``: ::
98+
If the above does not work, you can use ``pip`` to download and install the latest release from
99+
`Python Package Index <https://pypi.python.org>`_.
100+
To install using ``pip`` into your ``diffpy.pdffit2_env`` environment, type ::
108101

109-
conda create -n diffpy.pdffit2_env python=3.13
102+
pip install diffpy.pdffit2
110103

111-
Activate the environment: ::
104+
If you prefer to install from sources, after installing the dependencies, obtain the source archive from
105+
`GitHub <https://github.com/diffpy/diffpy.pdffit2/>`_. Once installed, ``cd`` into your ``diffpy.pdffit2`` directory
106+
and run the following ::
112107

113-
conda activate diffpy.pdffit2_env
108+
pip install .
114109

115-
Install pdffit2 using ``pip`` to download and install the latest version from `Python Package Index <https://pypi.python.org>`_: ::
110+
This package also provides command-line utilities. To check the software has been installed correctly, type ::
116111

117-
pip install diffpy.pdffit2
112+
diffpy.pdffit2 --version
118113

119-
To confirm that the installation was successful, type ::
114+
You can also type the following command to verify the installation. ::
120115

121116
python -c "import diffpy.pdffit2; print(diffpy.pdffit2.__version__)"
122117

123-
If you prefer to install from sources, after installing the dependencies, obtain the source archive from
124-
`GitHub <https://github.com/diffpy/diffpy.pdffit2/>`_. Once installed, ``cd`` into your ``diffpy.pdffit2`` directory
125-
and run the following ::
126118

127-
pip install .
119+
To view the basic usage and available commands, type ::
120+
121+
diffpy.pdffit2 -h
128122

129123
Getting Started
130124
---------------
@@ -170,7 +164,7 @@ trying to commit again.
170164

171165
Improvements and fixes are always appreciated.
172166

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

175169
Contact
176170
-------

docs/source/license.rst

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,26 @@ For more information please visit the project web-page:
2525
or email Prof. Simon Billinge at [email protected]
2626

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

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ include = ["*"] # package names should match these glob patterns (["*"] by defa
4848
exclude = [] # exclude packages matching these glob patterns (empty by default)
4949
namespaces = false # to disable scanning PEP 420 namespaces (true by default)
5050

51+
[project.scripts]
52+
diffpy-pdffit2 = "diffpy.pdffit2_app:main"
53+
5154
[tool.setuptools.dynamic]
5255
dependencies = {file = ["requirements/pip.txt"]}
5356

0 commit comments

Comments
 (0)