Skip to content

Commit 8bb2fea

Browse files
Revert "change python version in README.rst (#107)"
This reverts commit c856057.
1 parent ca51d3d commit 8bb2fea

File tree

1 file changed

+137
-88
lines changed

1 file changed

+137
-88
lines changed

README.rst

+137-88
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,9 @@
1-
|Icon| |title|_
2-
===============
3-
4-
.. |title| replace:: diffpy.srmise
5-
.. _title: https://diffpy.github.io/diffpy.srmise
6-
7-
.. |Icon| image:: https://avatars.githubusercontent.com/diffpy
8-
:target: https://diffpy.github.io/diffpy.srmise
9-
:height: 100px
10-
11-
|PyPi| |Forge| |PythonVersion| |PR|
12-
13-
|CI| |Codecov| |Black| |Tracking|
14-
15-
.. |Black| image:: https://img.shields.io/badge/code_style-black-black
16-
:target: https://github.com/psf/black
17-
18-
.. |CI| image:: https://github.com/diffpy/diffpy.srmise/actions/workflows/main.yml/badge.svg
19-
:target: https://github.com/diffpy/diffpy.srmise/actions/workflows/main.yml
20-
21-
.. |Codecov| image:: https://codecov.io/gh/diffpy/diffpy.srmise/branch/main/graph/badge.svg
22-
:target: https://codecov.io/gh/diffpy/diffpy.srmise
23-
24-
.. |Forge| image:: https://img.shields.io/conda/vn/conda-forge/diffpy.srmise
25-
:target: https://anaconda.org/conda-forge/diffpy.srmise
26-
27-
.. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff
1+
#########################
2+
SrMise
3+
#########################
284

29-
.. |PyPi| image:: https://img.shields.io/pypi/v/diffpy.srmise
30-
:target: https://pypi.org/project/diffpy.srmise/
31-
32-
.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.srmise
33-
:target: https://pypi.org/project/diffpy.srmise/
34-
35-
.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue
36-
:target: https://github.com/diffpy/diffpy.srmise/issues
37-
38-
implementation of the ParSCAPE algorithm for peak extraction from atomic pair distribution functions (PDFs)
5+
`DiffPy project <http://www.diffpy.org>`_ tool for unbiased peak extraction from
6+
atomic pair distribution functions.
397

408
SrMise is an implementation of the `ParSCAPE algorithm
419
<https://dx.doi.org/10.1107/S2053273315005276>`_ for peak extraction from
@@ -70,85 +38,166 @@ necessary to provide the most reliable results, but historically such PDFs
7038
are rare. In the absence of accurate uncertainties an *ad hoc* uncertainty
7139
must be specified.
7240

73-
For more information about the diffpy.srmise library, please consult our `online documentation <https://diffpy.github.io/diffpy.srmise>`_.
41+
For more information about SrMise, see the users manual at
42+
http://diffpy.github.io/diffpy.srmise.
43+
44+
Getting Started
45+
=================
46+
47+
The diffpy.srmise package requires Python 2.6 or 2.7 and the following software:
48+
49+
* ``setuptools`` - software distribution tools for Python
50+
* ``NumPy`` - numerical mathematics and fast array operations for Python
51+
* ``SciPy`` - scientific libraries for Python
52+
* ``matplotlib`` - python plotting library
53+
54+
See the `SrMise license <LICENSE.txt>`__ for terms and conditions of use.
55+
Detailed installation instructions for the `Windows`_, `Mac OS X`_, and
56+
`Linux`_ platforms follow.
57+
58+
Windows
59+
-------
7460

75-
Citation
61+
Several prebuilt Python distributions for Windows include all the
62+
prerequisite software required to run SrMise, and installing one of these is the
63+
simplest way to get started. These distributions are usually free for
64+
individual and/or academic use, but some also have commercial version. Links to
65+
executables, installation instructions, and licensing information
66+
for some popular options are listed below.
67+
68+
* `Anaconda <https://www.anaconda.com/download>`_
69+
* `Enthought Canopy <https://www.enthought.com/products/canopy/>`_
70+
* `Python(x,y) <https://code.google.com/p/pythonxy/>`_
71+
* `WinPython <http://winpython.github.io>`_
72+
73+
Alternately, individual Windows executables for Python and the required
74+
components can be downloaded and installed. The official Windows releases of
75+
Numpy and SciPy do not currently support 64-bit Python installations, so be
76+
sure to download the 32-bit versions of these packages.
77+
78+
* `Python 2.6/2.7 <https://www.python.org/downloads/windows/>`_
79+
* `NumPy <http://sourceforge.net/projects/numpy/files/NumPy/>`_
80+
* `SciPy <http://sourceforge.net/projects/scipy/files/scipy/>`_
81+
* `matplotlib <http://matplotlib.org/downloads.html>`_
82+
83+
After installing Python and the required packages, the simplest way to obtain
84+
SrMise is using ``pip`` to download and install the latest release from the
85+
`Python Package Index <https://pypi.python.org>`_ (PyPI). Open a command window
86+
by running ``cmd`` from the Start Menu's application search box (Windows 7/8/10)
87+
or Run command (Windows Vista and earlier). Verify that the
88+
``pip`` program is installed by running ::
89+
90+
pip --version
91+
92+
If this command is not found, download and run
93+
`get-pip.py <https://bootstrap.pypa.io/get-pip.py>`_, which will install both it
94+
and setuptools. For example, if the file were downloaded to the desktop, a
95+
Windows user named ``MyName`` should run the following from the command
96+
line: ::
97+
98+
cd C:\Users\MyName\Desktop
99+
python get-pip.py
100+
101+
Finally, install the latest version of SrMise by running ::
102+
103+
pip install diffpy.srmise
104+
105+
106+
Mac OS X
76107
--------
77108

78-
If you use diffpy.srmise in a scientific publication, we would like you to cite this package as
109+
For Mac OS X systems with the MacPorts package manager, the required
110+
software can be installed with ::
79111

80-
L. Granlund, Billinge, S. J. L., and P. M. Duxbury. “Algorithm for systematic peak extraction from atomic
81-
pair distribution functions”. In: Acta Crystallogr. A 71.4 (2015), pp. 392–409. DOI:
82-
10.1107/S2053273315005276
112+
sudo port install \
113+
python27 py27-setuptools py27-numpy py27-scipy py27-matplotlib
83114

84-
Installation
85-
------------
115+
When installing for MacPorts, make sure the MacPorts bin directory is the first
116+
in the system PATH and that python27 is selected as the default Python version
117+
in MacPorts::
86118

87-
The preferred method is to use `Miniconda Python
88-
<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html>`_
89-
and install from the "conda-forge" channel of Conda packages.
119+
sudo port select --set python python27
90120

91-
To add "conda-forge" to the conda channels, run the following in a terminal. ::
121+
The simplest way to obtain diffpy.srmise on Mac OS X systems
122+
is using ``pip`` to download and install the latest release from
123+
`PyPI <https://pypi.python.org>`_. ::
92124

93-
conda config --add channels conda-forge
125+
sudo pip install diffpy.srmise
94126

95-
We want to install our packages in a suitable conda environment.
96-
The following creates and activates a new environment named ``diffpy.srmise_env`` ::
127+
Those who prefer to install from sources may download them from the
128+
`GitHub <https://github.com/diffpy/diffpy.srmise/releases>`__ or
129+
`PyPI <https://pypi.python.org/pypi/diffpy.srmise>`__ pages for SrMise.
130+
Uncompress them to a directory, and from that directory run ::
97131

98-
conda create -n diffpy.srmise_env python=3
99-
conda activate diffpy.srmise_env
132+
sudo python setup.py install
100133

101-
Then, to fully install ``diffpy.srmise`` in our active environment, run ::
134+
This installs diffpy.srmise for all users in the default system location. If
135+
administrator (root) access is not available, see the usage info from
136+
``python setup.py install --help`` for options to install to user-writable
137+
directories.
102138

103-
conda install diffpy.srmise
104139

105-
Another option is to use ``pip`` to download and install the latest release from
106-
`Python Package Index <https://pypi.python.org>`_.
107-
To install using ``pip`` into your ``diffpy.srmise_env`` environment, we will also have to install dependencies ::
140+
Linux
141+
-----
108142

109-
pip install -r https://raw.githubusercontent.com/diffpy/diffpy.srmise/main/requirements/run.txt
143+
On Ubuntu and Debian Linux, the required software can easily be installed using
144+
the system package manager::
110145

111-
and then install the package ::
146+
sudo apt-get install \
147+
python-setuptools python-numpy python-scipy python-matplotlib
112148

113-
pip install diffpy.srmise
149+
Similarly, on Fedora::
114150

115-
If you prefer to install from sources, after installing the dependencies, obtain the source archive from
116-
`GitHub <https://github.com/diffpy/diffpy.srmise/>`_. Once installed, ``cd`` into your ``diffpy.srmise`` directory
117-
and run the following ::
151+
sudo yum install python-setuptools numpy scipy python-matplotlib
118152

119-
pip install .
153+
For other Linux distributions consult the appropriate package manager.
120154

121-
Support and Contribute
122-
----------------------
155+
The simplest way to obtain diffpy.srmise on Linux systems
156+
is using ``pip`` to download and install the latest release from the
157+
`PyPI <https://pypi.python.org>`_. ::
123158

124-
`Diffpy user group <https://groups.google.com/g/diffpy-users>`_ is the discussion forum for general questions and discussions about the use of diffpy.srmise. Please join the diffpy.srmise users community by joining the Google group. The diffpy.srmise project welcomes your expertise and enthusiasm!
159+
sudo pip install diffpy.srmise
125160

126-
If you see a bug or want to request a feature, please `report it as an issue <https://github.com/diffpy/diffpy.srmise/issues>`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.srmise/pulls>`_. You can also post it to the `Diffpy user group <https://groups.google.com/g/diffpy-users>`_.
161+
Those who prefer to install from sources may download them from the
162+
`GitHub <https://github.com/diffpy/diffpy.srmise/releases>`__ or
163+
`PyPI <https://pypi.python.org/pypi/diffpy.srmise>`__ pages for SrMise.
164+
Uncompress them to a directory, and from that directory run ::
127165

128-
Feel free to fork the project and contribute. To install diffpy.srmise
129-
in a development mode, with its sources being directly used by Python
130-
rather than copied to a package directory, use the following in the root
131-
directory ::
166+
sudo python setup.py install
132167

133-
pip install -e .
168+
This installs diffpy.srmise for all users in the default system location. If
169+
administrator (root) access is not available, see the usage info from
170+
``python setup.py install --help`` for options to install to user-writable
171+
directories.
134172

135-
To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit
136-
hooks.
137173

138-
1. Install pre-commit in your working environment by running ``conda install pre-commit``.
174+
DEVELOPMENT
175+
===========
139176

140-
2. Initialize pre-commit (one time only) ``pre-commit install``.
177+
diffpy.srmise is open-source software developed with support of the Center of
178+
Research Excellence in Complex Materials at Michigan State University, in
179+
cooperation with the DiffPy-CMI complex modeling initiative at the Brookhaven
180+
National Laboratory. The diffpy.srmise sources are hosted at
181+
https://github.com/diffpy/diffpy.srmise.
141182

142-
Thereafter your code will be linted by black and isort and checked against flake8 before you can commit.
143-
If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should
144-
pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before
145-
trying to commit again.
183+
Feel free to fork the project and contribute. To install diffpy.srmise in a
184+
development mode, with its sources being directly used by Python rather than
185+
copied to a package directory, use ::
146186

147-
Improvements and fixes are always appreciated.
187+
python setup.py develop --user
148188

149-
Before contribuing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.srmise/blob/main/CODE_OF_CONDUCT.rst>`_.
150189

151-
Contact
152-
-------
190+
ACKNOWLEDGEMENT
191+
===============
192+
193+
The source code of *pdfdataset.py* was derived from diffpy.pdfgui.
194+
195+
196+
CONTACTS
197+
========
198+
199+
For more information on SrMise please visit the DiffPy project web-page
200+
201+
http://www.diffpy.org/
153202

154-
For more information on diffpy.srmise please visit the project `web-page <https://diffpy.github.io/>`_ or email Prof. Simon Billinge at [email protected].
203+
or email Prof. Simon Billinge at [email protected].

0 commit comments

Comments
 (0)