Skip to content

Commit 96dcb02

Browse files
committed
skpkg: modify README.rst to include updated install instructions
Signed-off-by: Dasun Abeykoon <Dasun20202020@hotmail.com>
1 parent a9b16bb commit 96dcb02

File tree

1 file changed

+30
-51
lines changed

1 file changed

+30
-51
lines changed

README.rst

Lines changed: 30 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -26,42 +26,53 @@
2626

2727
Distance Printer, calculate the inter atomic distances. Part of xPDFsuite
2828

29-
For more information about the diffpy.distanceprinter library, please consult our `online documentation <https://diffpy.github.io/diffpy.distanceprinter>`_.
30-
3129
Citation
3230
--------
3331

3432
If you use diffpy.distanceprinter in a scientific publication, we would like you to cite this package as
3533

36-
diffpy.distanceprinter Package, https://github.com/diffpy/diffpy.distanceprinter
34+
Xiaohao Yang, Pavol Juhas, Christopher L. Farrow and Simon J. L. Billinge, xPDFsuite: an end-to-end
35+
software solution for high throughput pair distribution function transformation, visualization and
36+
analysis, arXiv 1402.3163 (2014)
3737

3838
Installation
3939
------------
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>`_.
4042

41-
The preferred method is to use `Miniconda Python
42-
<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html>`_
43-
and install from the "conda-forge" channel of Conda packages.
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
48+
49+
pip install ./diffpy.distanceprinter-VERSION.whl
4450

45-
To add "conda-forge" to the conda channels, run the following in a terminal. ::
51+
where you replace VERSION with the actual version you have so the command matches the filename of the
52+
wheel file you have.
4653

47-
conda config --add channels conda-forge
54+
The commands to create and activate the conda environment with name "conf-env" is
4855

49-
We want to install our packages in a suitable conda environment.
50-
The following creates and activates a new environment named ``diffpy.distanceprinter_env`` ::
56+
conda create -n conf-env python=3.13
57+
conda activate conf-env
5158

52-
conda create -n diffpy.distanceprinter_env diffpy.distanceprinter
53-
conda activate diffpy.distanceprinter_env
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
5462

55-
The output should print the latest version displayed on the badges above.
63+
pip install ./diffpy.distanceprinter-VERSION.whl
5664

57-
If the above does not work, you can use ``pip`` to download and install the latest release from
58-
`Python Package Index <https://pypi.python.org>`_.
59-
To install using ``pip`` into your ``diffpy.distanceprinter_env`` environment, type ::
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:
6069

61-
pip install diffpy.distanceprinter
70+
conda activate conf-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
6274

63-
If you prefer to install from sources, after installing the dependencies, obtain the source archive from
64-
`GitHub <https://github.com/diffpy/diffpy.distanceprinter/>`_. Once installed, ``cd`` into your ``diffpy.distanceprinter`` directory
75+
After installing the dependencies, ``cd`` into your ``diffpy.distanceprinter`` directory
6576
and run the following ::
6677

6778
pip install .
@@ -79,38 +90,6 @@ To view the basic usage and available commands, type ::
7990

8091
diffpy.distanceprinter -h
8192

82-
Getting Started
83-
---------------
84-
85-
You may consult our `online documentation <https://diffpy.github.io/diffpy.distanceprinter>`_ for tutorials and API references.
86-
87-
Support and Contribute
88-
----------------------
89-
90-
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>`_.
91-
92-
Feel free to fork the project and contribute. To install diffpy.distanceprinter
93-
in a development mode, with its sources being directly used by Python
94-
rather than copied to a package directory, use the following in the root
95-
directory ::
96-
97-
pip install -e .
98-
99-
To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit
100-
hooks.
101-
102-
1. Install pre-commit in your working environment by running ``conda install pre-commit``.
103-
104-
2. Initialize pre-commit (one time only) ``pre-commit install``.
105-
106-
Thereafter your code will be linted by black and isort and checked against flake8 before you can commit.
107-
If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should
108-
pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before
109-
trying to commit again.
110-
111-
Improvements and fixes are always appreciated.
112-
113-
Before contributing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.distanceprinter/blob/main/CODE-OF-CONDUCT.rst>`_.
11493

11594
Contact
11695
-------

0 commit comments

Comments
 (0)