Skip to content

Commit 2aa1683

Browse files
committed
skpkg: update readme and license files to better match skpkg
1 parent fc3aa36 commit 2aa1683

File tree

2 files changed

+90
-38
lines changed

2 files changed

+90
-38
lines changed

LICENSENOTICE.rst

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
1-
Use of this software is subject to and permitted only under a separate,
2-
written Use License granted by Columbia University. If you or your employer
3-
is not a party to such an agreement, then your use of this software is
4-
prohibited. If you don’t know whether or not your anticipated use is under
5-
a license, you must contact Prof. Simon Billinge at sb2896@columbia.edu.
6-
Use of this software without a license is prohibited.
1+
BSD 3-Clause License
72

8-
Copyright 2009-2025, Trustees of Columbia University in the City of New York.
3+
Copyright (c) 2009-2025, The Trustees of Columbia University in the City of New York.
4+
All rights reserved.
95

10-
For more information please email Prof. Simon Billinge at sb2896@columbia.edu
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
3. Neither the name of the copyright holder nor the names of its contributors
17+
may be used to endorse or promote products derived from this software
18+
without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.rst

Lines changed: 63 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,29 @@
88
:target: https://diffpy.github.io/diffpy.distanceprinter
99
:height: 100px
1010

11-
|PythonVersion| |PR|
11+
|PyPI| |Forge| |PythonVersion| |PR|
1212

13-
|Black| |Tracking|
13+
|CI| |Codecov| |Black| |Tracking|
1414

1515
.. |Black| image:: https://img.shields.io/badge/code_style-black-black
1616
:target: https://github.com/psf/black
1717

18+
.. |CI| image:: https://github.com/diffpy/diffpy.distanceprinter/actions/workflows/matrix-and-codecov-on-merge-to-main.yml/badge.svg
19+
:target: https://github.com/diffpy/diffpy.distanceprinter/actions/workflows/matrix-and-codecov-on-merge-to-main.yml
20+
21+
.. |Codecov| image:: https://codecov.io/gh/diffpy/diffpy.distanceprinter/branch/main/graph/badge.svg
22+
:target: https://codecov.io/gh/diffpy/diffpy.distanceprinter
23+
24+
.. |Forge| image:: https://img.shields.io/conda/vn/conda-forge/diffpy.distanceprinter
25+
:target: https://anaconda.org/conda-forge/diffpy.distanceprinter
26+
1827
.. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff
1928
:target: https://github.com/diffpy/diffpy.distanceprinter/pulls
2029

21-
.. |PythonVersion| image:: https://img.shields.io/badge/python-3.11%20|%203.12%20|%203.13-blue
30+
.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.distanceprinter
31+
:target: https://pypi.org/project/diffpy.distanceprinter/
32+
33+
.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.distanceprinter
2234
:target: https://pypi.org/project/diffpy.distanceprinter/
2335

2436
.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue
@@ -37,42 +49,31 @@ If you use diffpy.distanceprinter in a scientific publication, we would like you
3749

3850
Installation
3951
------------
40-
``diffpy.distanceprinter`` is normally installed as part of the ``xpdfsuite`` software, so please refer to the
41-
installation instructions detailed in the ``README.rst`` file of ``xpdfsuite`` `here <https://github.com/diffpy/diffpy.xpdfsuite/blob/main/README.rst>`_.
4252

43-
Independent Installation
44-
------------------------
45-
You can also install ``diffpy.distanceprinter`` independently for yourself.
46-
47-
Assuming you have a wheel file in the current working directory, in an active conda environment please type ::
53+
The preferred method is to use `Miniconda Python
54+
<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html>`_
55+
and install from the "conda-forge" channel of Conda packages.
4856

49-
pip install ./diffpy.distanceprinter-VERSION.whl
57+
To add "conda-forge" to the conda channels, run the following in a terminal. ::
5058

51-
where you replace VERSION with the actual version you have so the command matches the filename of the
52-
wheel file you have.
59+
conda config --add channels conda-forge
5360

54-
The commands to create and activate the conda environment with name "distanceprinter-env" is ::
61+
We want to install our packages in a suitable conda environment.
62+
The following creates and activates a new environment named ``diffpy.distanceprinter_env`` ::
5563

56-
conda create -n distanceprinter-env python=3.13
57-
conda activate distanceprinter-env
64+
conda create -n diffpy.distanceprinter_env diffpy.distanceprinter
65+
conda activate diffpy.distanceprinter_env
5866

59-
If you don't have conda installed, we recomment you install `miniconda
60-
<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html>`_
61-
To install this software from a Python wheel distribution format execute ::
67+
The output should print the latest version displayed on the badges above.
6268

63-
pip install ./diffpy.distanceprinter-VERSION.whl
69+
If the above does not work, you can use ``pip`` to download and install the latest release from
70+
`Python Package Index <https://pypi.python.org>`_.
71+
To install using ``pip`` into your ``diffpy.distanceprinter_env`` environment, type ::
6472

65-
If you are a developer, you can also install this package from sources. First, obtain the source archive
66-
from `GitHub <https://github.com/diffpy/diffpy.distanceprinter/>`_.
67-
Install the packages in ``./requirements/conda.txt`` and ``./requirements/tests.txt``
68-
using the ``--file`` command ::
73+
pip install diffpy.distanceprinter
6974

70-
conda activate distanceprinter-env
71-
conda install --file ./requirements/conda.txt
72-
conda install --file ./requirements/tests.txt
73-
pip install -e . # assuming you are in the top level directory of the package
74-
75-
After installing the dependencies, ``cd`` into your ``diffpy.distanceprinter`` directory
75+
If you prefer to install from sources, after installing the dependencies, obtain the source archive from
76+
`GitHub <https://github.com/diffpy/diffpy.distanceprinter/>`_. Once installed, ``cd`` into your ``diffpy.distanceprinter`` directory
7677
and run the following ::
7778

7879
pip install .
@@ -90,6 +91,38 @@ To view the basic usage and available commands, type ::
9091

9192
diffpy.distanceprinter -h
9293

94+
Support and Contribute
95+
----------------------
96+
97+
If you see a bug or want to request a feature, please `report it as an issue <https://github.com/diffpy/diffpy.distanceprinter/issues>`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.distanceprinter/pulls>`_.
98+
99+
Feel free to fork the project and contribute. To install diffpy.distanceprinter
100+
in a development mode, with its sources being directly used by Python
101+
rather than copied to a package directory, use the following in the root
102+
directory ::
103+
104+
pip install -e .
105+
106+
To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit
107+
hooks.
108+
109+
1. Install pre-commit in your working environment by running ``conda install pre-commit``.
110+
111+
2. Initialize pre-commit (one time only) ``pre-commit install``.
112+
113+
Thereafter your code will be linted by black and isort and checked against flake8 before you can commit.
114+
If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should
115+
pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before
116+
trying to commit again.
117+
118+
Improvements and fixes are always appreciated.
119+
120+
Before contributing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.distanceprinter/blob/main/CODE-OF-CONDUCT.rst>`_.
121+
122+
Getting Started
123+
---------------
124+
125+
You may consult our `online documentation <https://diffpy.github.io/diffpy.distanceprinter>`_ for tutorials and API references.
93126

94127
Contact
95128
-------

0 commit comments

Comments
 (0)