Skip to content

Commit f435e05

Browse files
committed
add MANIFEST.in and README.rst
1 parent f330de1 commit f435e05

File tree

2 files changed

+94
-145
lines changed

2 files changed

+94
-145
lines changed

MANIFEST.in

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
recursive-include diffpy *.py
2-
include AUTHORS.txt LICENSE*.txt README.rst
3-
exclude MANIFEST.in
4-
include diffpy/srmise/version.cfg
1+
graft src
2+
graft tests
3+
graft requirements
54

6-
recursive-include doc/examples *.py *.gr *.srmise *.pwa *.dat *.png
7-
include doc/examples/README
5+
include AUTHORS.rst LICENSE*.rst README.rst
86

9-
recursive-include doc/manual/source *.rst *.txt
10-
include doc/manual/source/conf.py
11-
include doc/manual/Makefile
7+
# Exclude all bytecode files and __pycache__ directories
8+
global-exclude *.py[cod] # Exclude all .pyc, .pyo, and .pyd files.
9+
global-exclude .DS_Store # Exclude Mac filesystem artifacts.
10+
global-exclude __pycache__ # Exclude Python cache directories.
11+
global-exclude .git* # Exclude git files and directories.
12+
global-exclude .idea # Exclude PyCharm project settings.

README.rst

Lines changed: 84 additions & 136 deletions
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/matrix-and-codecov-on-merge-to-main.yml/badge.svg
19+
:target: https://github.com/diffpy/diffpy.srmise/actions/workflows/matrix-and-codecov-on-merge-to-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+
Peak extraction and peak fitting tool for atomic pair distribution functions.
739

840
SrMise is an implementation of the `ParSCAPE algorithm
941
<https://dx.doi.org/10.1107/S2053273315005276>`_ for peak extraction from
@@ -41,163 +73,79 @@ must be specified.
4173
For more information about SrMise, see the users manual at
4274
http://diffpy.github.io/diffpy.srmise.
4375

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

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
78+
Citation
10779
--------
10880

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

112-
sudo port install \
113-
python27 py27-setuptools py27-numpy py27-scipy py27-matplotlib
83+
diffpy.srmise Package, https://github.com/diffpy/diffpy.srmise
11484

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::
85+
Installation
86+
------------
11887

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

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>`_. ::
92+
To add "conda-forge" to the conda channels, run the following in a terminal. ::
12493

125-
sudo pip install diffpy.srmise
94+
conda config --add channels conda-forge
12695

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 ::
96+
We want to install our packages in a suitable conda environment.
97+
The following creates and activates a new environment named ``diffpy.srmise_env`` ::
13198

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

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.
102+
Then, to fully install ``diffpy.srmise`` in our active environment, run ::
138103

104+
conda install diffpy.srmise
139105

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

143-
On Ubuntu and Debian Linux, the required software can easily be installed using
144-
the system package manager::
110+
pip install diffpy.srmise
145111

146-
sudo apt-get install \
147-
python-setuptools python-numpy python-scipy python-matplotlib
112+
If you prefer to install from sources, after installing the dependencies, obtain the source archive from
113+
`GitHub <https://github.com/diffpy/diffpy.srmise/>`_. Once installed, ``cd`` into your ``diffpy.srmise`` directory
114+
and run the following ::
148115

149-
Similarly, on Fedora::
116+
pip install .
150117

151-
sudo yum install python-setuptools numpy scipy python-matplotlib
118+
Support and Contribute
119+
----------------------
152120

153-
For other Linux distributions consult the appropriate package manager.
121+
`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!
154122

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>`_. ::
123+
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>`_.
158124

159-
sudo pip install diffpy.srmise
125+
Feel free to fork the project and contribute. To install diffpy.srmise
126+
in a development mode, with its sources being directly used by Python
127+
rather than copied to a package directory, use the following in the root
128+
directory ::
160129

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 ::
130+
pip install -e .
165131

166-
sudo python setup.py install
132+
To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit
133+
hooks.
167134

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

137+
2. Initialize pre-commit (one time only) ``pre-commit install``.
173138

174-
DEVELOPMENT
175-
===========
139+
Thereafter your code will be linted by black and isort and checked against flake8 before you can commit.
140+
If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should
141+
pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before
142+
trying to commit again.
176143

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.
144+
Improvements and fixes are always appreciated.
182145

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 ::
146+
Before contribuing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.srmise/blob/main/CODE_OF_CONDUCT.rst>`_.
186147

187-
python setup.py develop --user
188-
189-
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/
148+
Contact
149+
-------
202150

203-
or email Prof. Simon Billinge at [email protected].
151+
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)