Skip to content

Commit 635fc38

Browse files
committed
MANIFEST.in, pyproject.toml, README.rst
1 parent fb7edbf commit 635fc38

File tree

3 files changed

+86
-72
lines changed

3 files changed

+86
-72
lines changed

MANIFEST.in

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
include AUTHORS.rst
2-
include CONTRIBUTING.rst
32
include LICENSE
43
include README.rst
54
include requirements.txt
6-
include docs/examples/*
5+
include doc/examples/*
76

87
recursive-exclude * __pycache__
98
recursive-exclude * *.py[co]
109

1110
recursive-include docs *.rst conf.py Makefile make.bat
1211

13-
include versioneer.py
14-
include labpdfproc/_version.py
12+
13+
include diffpy.labpdfproc/version.py
1514

1615
# If including data files in the package, add them like:
1716
# include path/to/data_file

README.rst

Lines changed: 76 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,118 @@
1-
=================
2-
diffpy.labpdfproc
3-
=================
1+
|Icon| `diffpy.labpdfproc <https://diffpy.github.io/diffpy.labpdfproc>`_
2+
=========================================================
43

5-
.. image:: https://github.com/diffpy/diffpy.labpdfproc/actions/workflows/testing.yml/badge.svg
6-
:target: https://github.com/diffpy/diffpy.labpdfproc/actions/workflows/testing.yml
4+
.. |Icon| image:: https://avatars.githubusercontent.com/diffpy
5+
:target: https://diffpy.github.io/diffpy.labpdfproc
6+
:height: 100px
77

8+
|PyPi| |Forge| |PythonVersion| |PR|
89

9-
.. image:: https://img.shields.io/pypi/v/diffpy.labpdfproc.svg
10-
:target: https://pypi.python.org/pypi/diffpy.labpdfproc
10+
|CI| |Codecov| |Black| |Tracking|
1111

12+
.. |Black| image:: https://img.shields.io/badge/code_style-black-black
13+
:target: https://github.com/psf/black
1214

13-
An app for preprocessing data from laboratory x-ray diffractometers before using PDFgetX3 to obtain PDFs
15+
.. |CI| image:: https://github.com/diffpy/diffpy.labpdfproc/actions/workflows/main.yml/badge.svg
16+
:target: https://github.com/diffpy/diffpy.labpdfproc/actions/workflows/main.yml
1417

15-
* Free software: 3-clause BSD license
16-
* Documentation: (COMING SOON!) https://sbillinge.github.io/diffpy.labpdfproc.
18+
.. |Codecov| image:: https://codecov.io/gh/diffpy/diffpy.labpdfproc/branch/main/graph/badge.svg
19+
:target: https://codecov.io/gh/diffpy/diffpy.labpdfproc
1720

18-
Background
19-
----------
21+
.. |Forge| image:: https://img.shields.io/conda/vn/conda-forge/diffpy.labpdfproc
22+
:target: https://anaconda.org/conda-forge/diffpy.labpdfproc
2023

21-
PDFgetX3 has revolutionized how PDF methods can be applied to solve nanostructure problems. However, the program was designed for use with Rapid Acquisition PDF (RAPDF) data from synchrotron sources. A key approximation inherent in the use of PDFgetX3 for RAPDF data is that absorption effects are negligible. This is typically not the case for laboratory x-ray diffractometers, where absorption effects can be significant.
24+
.. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff
2225

23-
This app is designed to preprocess data from laboratory x-ray diffractometers before using PDFgetX3 to obtain PDFs. The app currently carries out an absorption correction assuming a parallel beam capillary geometry which is the most common geometry for lab PDF measurements.
26+
.. |PyPi| image:: https://img.shields.io/pypi/v/diffpy.labpdfproc
27+
:target: https://pypi.org/project/diffpy.labpdfproc/
2428

25-
The theory is described in the following paper:
29+
.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.labpdfproc
30+
:target: https://pypi.org/project/diffpy.labpdfproc/
2631

27-
An ad hoc Absorption Correction for Reliable
28-
Pair-Distribution Functions from Low Energy x-ray Sources
29-
Yucong Chen, Till Schertenleib, Andrew Yang, Pascal Schouwink,
30-
Wendy L. Queen and Simon J. L. Billinge, in preparation.
32+
.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue
33+
:target: https://github.com/diffpy/diffpy.labpdfproc/issues
3134

32-
The related experimental data acquisition protocols are described in the following paper:
35+
Tools for processing x-ray powder diffraction data from laboratory sources
3336

34-
Protocols for Obtaining Reliable PDFs from Laboratory
35-
x-ray Sources Using PDFgetX3,
36-
Till Schertenleib, Daniel Schmuckler, Yucong Chen, Geng Bang Jin,
37-
Wendy L. Queen and Simon J. L. Billinge, in preparation.
37+
* LONGER DESCRIPTION HERE
3838

39-
Installation
40-
------------
39+
For more information about the diffpy.labpdfproc library, please consult our `online documentation <https://diffpy.github.io/diffpy.labpdfproc>`_.
40+
41+
Citation
42+
--------
4143

42-
The package is available on conda-forge and on pypi. Assuming you are using conda/mamba (we recommend using miniconda), create a virtual environment and install the package as follows:
44+
If you use diffpy.labpdfproc in a scientific publication, we would like you to cite this package as
4345

44-
.. code-block:: python
46+
diffpy.labpdfproc Package, https://github.com/diffpy/diffpy.labpdfproc
4547

46-
mamba create -n labpdfproc python=3.12
47-
mamba activate labpdfproc
48-
cd path/to/diffpy.labpdfproc
49-
mamba install -c conda-forge diffpy.labpdfproc
48+
Installation
49+
------------
5050

51-
The code may also be installed from pipy using pip. This is not recommended as the package has not been tested on all platforms.
51+
The preferred method is to use `Miniconda Python
52+
<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html>`_
53+
and install from the "conda-forge" channel of Conda packages.
5254

53-
Usage
54-
-----
55+
To add "conda-forge" to the conda channels, run the following in a terminal. ::
5556

56-
Navigate to the directory that contains 1D diffraction patterns that you would like to process. Activate the conda environment (`conda activate labpdfproc`) that contains the package and run the following command:
57+
conda config --add channels conda-forge
5758

58-
.. code-block:: python
59+
We want to install our packages in a suitable conda environment.
60+
The following creates and activates a new environment named ``diffpy.labpdfproc_env`` ::
5961

60-
labpdfproc <muD> -i <path/to/inputfile.txt> --anode-type Mo
62+
conda create -n diffpy.labpdfproc_env python=3
63+
conda activate diffpy.labpdfproc_env
6164

65+
Then, to fully install ``diffpy.labpdfproc`` in our active environment, run ::
6266

63-
Here replace <muD> with the value of muD for your sample and <path/to/inputfile.txt> with the path and filename of your input file. For example, if the uncorrected data case isc alled zro2_mo.xy and is in the current directory and it has a muD of 2.5 then the commands would be
67+
conda install diffpy.labpdfproc
6468

65-
.. code-block:: python
69+
Another option is to 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.labpdfproc_env`` environment, we will also have to install dependencies ::
6672

67-
labpdfproc 2.5 -i zro2_mo.xy --anode-type Mo
73+
pip install -r https://raw.githubusercontent.com/diffpy/diffpy.labpdfproc/main/requirements/run.txt
6874

69-
Please type
70-
.. code-block:: python
75+
and then install the package ::
7176

72-
labpdfproc --help
77+
pip install diffpy.labpdfproc
7378

74-
for more information on the available options.
79+
If you prefer to install from sources, after installing the dependencies, obtain the source archive from
80+
`GitHub <https://github.com/diffpy/diffpy.labpdfproc/>`_. Once installed, ``cd`` into your ``diffpy.labpdfproc`` directory
81+
and run the following ::
7582

83+
pip install .
7684

77-
Getting Started
78-
---------------
85+
Support and Contribute
86+
----------------------
7987

80-
An example input file can be found in the docs/examples directory in the distribtuion (you should find it in your miniconda envs locateion). The file is called zro2_mo.xy.
88+
`Diffpy user group <https://groups.google.com/g/diffpy-users>`_ is the discussion forum for general questions and discussions about the use of diffpy.labpdfproc. Please join the diffpy.labpdfproc users community by joining the Google group. The diffpy.labpdfproc project welcomes your expertise and enthusiasm!
8189

82-
1. Copy this file to a new scratch directory
83-
2. Navigate to that directory in a terminal
84-
3. Activate the conda environment that contains the package
85-
4. Run the command (see above)
90+
If you see a bug or want to request a feature, please `report it as an issue <https://github.com/diffpy/diffpy.labpdfproc/issues>`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.labpdfproc/pulls>`_. You can also post it to the `Diffpy user group <https://groups.google.com/g/diffpy-users>`_.
8691

87-
An example output is also present in the example data and you can compare your output to this file. The example was processed with a muD of 2.5, though for experimentation you can try processing data with different muD values.
92+
Feel free to fork the project and contribute. To install diffpy.labpdfproc
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 ::
8896

89-
Contributing
90-
------------
91-
We welcome contributors from the community. Please consider posting issues, and taking issues and posting PRs.
97+
pip install -e .
9298

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

96-
1. modify the permissions to executable on the bash script called `prevent_commit_to_main.sh` in this directory: `chmod +x prevent_commit_to_main.sh`
97-
2. install pre-commit in your working environment `conda install pre-commit`
98-
3. initialize pre-commit (one time only) `pre-commit install`
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``.
99105

100106
Thereafter your code will be linted by black and isort and checked against flake8 before you can commit.
101107
If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should
102-
pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before
103-
trying to commit again
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 contribuing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.labpdfproc/blob/main/CODE_OF_CONDUCT.rst>`_.
114+
115+
Contact
116+
-------
117+
118+
For more information on diffpy.labpdfproc please visit the project `web-page <https://diffpy.github.io/>`_ or email Prof. Simon Billinge at [email protected].

pyproject.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ maintainers = [
1212
{ name="Simon J.L. Billinge group", email="[email protected]" },
1313
]
1414
description = "Tools for processing x-ray powder diffraction data from laboratory sources"
15-
keywords = ["powder xrd", "absorption correction"]
15+
keywords = ['powder xrd', 'absorption correction', 'pdf', 'diffpy']
1616
readme = "README.rst"
1717
requires-python = ">=3.10"
1818
classifiers = [
19-
'Development Status :: 4 - Beta',
19+
'Development Status :: 5 - Production/Stable',
2020
'Environment :: Console',
2121
'Intended Audience :: Developers',
2222
'Intended Audience :: Science/Research',
@@ -29,24 +29,22 @@ classifiers = [
2929
'Programming Language :: Python :: 3.11',
3030
'Programming Language :: Python :: 3.12',
3131
'Topic :: Scientific/Engineering :: Physics',
32+
'Topic :: Scientific/Engineering :: Chemistry',
3233
]
3334

3435
[project.urls]
3536
Homepage = "https://github.com/diffpy/diffpy.labpdfproc/"
36-
Issues = "https://github.com/diffpy/diffpy.labpdfproc/issues"
37+
Issues = "https://github.com/diffpy/diffpy.labpdfproc/issues/"
3738

3839
[tool.setuptools-git-versioning]
3940
enabled = true
4041
template = "{tag}"
4142
dev_template = "{tag}"
4243
dirty_template = "{tag}"
4344

44-
[project.scripts]
45-
labpdfproc = "diffpy.labpdfproc.labpdfprocapp:main"
46-
4745
[tool.setuptools.packages.find]
4846
where = ["src"] # list of folders that contain the packages (["."] by default)
49-
include = ["diffpy*"] # package names should match these glob patterns (["*"] by default)
47+
include = ["*"] # package names should match these glob patterns (["*"] by default)
5048
exclude = ["diffpy.labpdfproc.tests*"] # exclude packages matching these glob patterns (empty by default)
5149
namespaces = false # to disable scanning PEP 420 namespaces (true by default)
5250

@@ -60,6 +58,8 @@ exclude = '''
6058
| \.mypy_cache
6159
| \.tox
6260
| \.venv
61+
| \.rst
62+
| \.txt
6363
| _build
6464
| buck-out
6565
| build

0 commit comments

Comments
 (0)