Skip to content

Commit c856057

Browse files
change python version in README.rst (diffpy#107)
* change python version in READNME.rst * README.rst rebuild followed cookiecutter standard * update long description for README.rst * change reference to paper
1 parent 47b4763 commit c856057

File tree

1 file changed

+88
-137
lines changed

1 file changed

+88
-137
lines changed

README.rst

+88-137
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,41 @@
1-
#########################
2-
SrMise
3-
#########################
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
428

5-
`DiffPy project <http://www.diffpy.org>`_ tool for unbiased peak extraction from
6-
atomic pair distribution functions.
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)
739

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

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-
-------
73+
For more information about the diffpy.srmise library, please consult our `online documentation <https://diffpy.github.io/diffpy.srmise>`_.
6074

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
75+
Citation
10776
--------
10877

109-
For Mac OS X systems with the MacPorts package manager, the required
110-
software can be installed with ::
111-
112-
sudo port install \
113-
python27 py27-setuptools py27-numpy py27-scipy py27-matplotlib
78+
If you use diffpy.srmise in a scientific publication, we would like you to cite this package as
11479

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::
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
11883

119-
sudo port select --set python python27
84+
Installation
85+
------------
12086

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>`_. ::
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.
12490

125-
sudo pip install diffpy.srmise
91+
To add "conda-forge" to the conda channels, run the following in a terminal. ::
12692

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 ::
93+
conda config --add channels conda-forge
13194

132-
sudo python setup.py install
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`` ::
13397

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.
98+
conda create -n diffpy.srmise_env python=3
99+
conda activate diffpy.srmise_env
138100

101+
Then, to fully install ``diffpy.srmise`` in our active environment, run ::
139102

140-
Linux
141-
-----
103+
conda install diffpy.srmise
142104

143-
On Ubuntu and Debian Linux, the required software can easily be installed using
144-
the system package manager::
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 ::
145108

146-
sudo apt-get install \
147-
python-setuptools python-numpy python-scipy python-matplotlib
109+
pip install -r https://raw.githubusercontent.com/diffpy/diffpy.srmise/main/requirements/run.txt
148110

149-
Similarly, on Fedora::
111+
and then install the package ::
150112

151-
sudo yum install python-setuptools numpy scipy python-matplotlib
113+
pip install diffpy.srmise
152114

153-
For other Linux distributions consult the appropriate package manager.
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 ::
154118

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>`_. ::
119+
pip install .
158120

159-
sudo pip install diffpy.srmise
121+
Support and Contribute
122+
----------------------
160123

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 ::
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!
165125

166-
sudo python setup.py install
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>`_.
167127

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.
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 ::
172132

133+
pip install -e .
173134

174-
DEVELOPMENT
175-
===========
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.
176137

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.
138+
1. Install pre-commit in your working environment by running ``conda install pre-commit``.
182139

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 ::
140+
2. Initialize pre-commit (one time only) ``pre-commit install``.
186141

187-
python setup.py develop --user
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.
188146

147+
Improvements and fixes are always appreciated.
189148

190-
ACKNOWLEDGEMENT
191-
===============
192-
193-
The source code of *pdfdataset.py* was derived from diffpy.pdfgui.
149+
Before contribuing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.srmise/blob/main/CODE_OF_CONDUCT.rst>`_.
194150

151+
Contact
152+
-------
195153

196-
CONTACTS
197-
========
198-
199-
For more information on SrMise please visit the DiffPy project web-page
200-
201-
http://www.diffpy.org/
202-
203-
or email Prof. Simon Billinge at [email protected].
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].

0 commit comments

Comments
 (0)