1
- .. image :: https://github.com/diffpy/diffpy.utils/actions/workflows/main.yml/badge.svg
2
- :target: https://github.com/diffpy/diffpy.utils/actions/workflows/main.yml
1
+ | Icon | | title |_
2
+ ===============
3
3
4
- .. image :: https://codecov.io/gh/ diffpy/diffpy .utils/branch/main/graph/badge.svg
5
- :target: https://codecov.io/gh/diffpy /diffpy.utils
4
+ .. | title | replace :: diffpy.utils
5
+ .. _ title : https://diffpy.github.io /diffpy.utils
6
6
7
+ .. |Icon | image :: https://avatars.githubusercontent.com/diffpy
8
+ :target: https://diffpy.github.io/diffpy.utils
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.utils/actions/workflows/codecov-on-merge-to-main.yml/badge.svg
19
+ :target: https://github.com/diffpy/diffpy.utils/actions/workflows/codecov-on-merge-to-main.yml
20
+
21
+ .. |Codecov | image :: https://codecov.io/gh/diffpy/diffpy.utils/branch/main/graph/badge.svg
22
+ :target: https://codecov.io/gh/diffpy/diffpy.utils
23
+
24
+ .. |Forge | image :: https://img.shields.io/conda/vn/conda-forge/diffpy.utils
25
+ :target: https://anaconda.org/conda-forge/diffpy.utils
26
+
27
+ .. |PR | image :: https://img.shields.io/badge/PR-Welcome-29ab47ff
28
+
29
+ .. |PyPi | image :: https://img.shields.io/pypi/v/diffpy.utils
30
+ :target: https://pypi.org/project/diffpy.utils/
31
+
32
+ .. |PythonVersion | image :: https://img.shields.io/pypi/pyversions/diffpy.utils
33
+ :target: https://pypi.org/project/diffpy.utils/
34
+
35
+ .. |Tracking | image :: https://img.shields.io/badge/issue_tracking-github-blue
36
+ :target: https://github.com/diffpy/diffpy.utils/issues
7
37
8
38
diffpy.utils
9
39
========================================================================
@@ -16,78 +46,81 @@ program. The package also includes an interpolation function based on the
16
46
Whittaker-Shannon formula that can be used to resample a PDF or other profile
17
47
function over a new grid.
18
48
19
- For more information about the diffpy.utils library, see the users manual at
20
- http://diffpy.github.io/diffpy.utils.
49
+ Citation
50
+ --------
51
+
52
+ If you use diffpy.utils in a scientific publication, we would like you to cite this package as
53
+
54
+ diffpy.utils Package, https://github.com/diffpy/diffpy.utils
21
55
22
- INSTALLATION
23
- ------------------------------------------------------------------------
56
+ Installation
57
+ ------------
24
58
25
59
The preferred method is to use `Miniconda Python
26
60
<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html> `_
27
61
and install from the "conda-forge" channel of Conda packages.
28
62
29
63
To add "conda-forge" to the conda channels, run the following in a terminal. ::
30
64
31
- conda config --add channels conda-forge
65
+ conda config --add channels conda-forge
32
66
33
67
We want to install our packages in a suitable conda environment.
34
- The following creates and activates a new environment named ``diffpy-utils `` ::
68
+ The following creates and activates a new environment named ``diffpy.utils_env `` ::
35
69
36
- conda create -n diffpy-utils python=3
37
- conda activate diffpy-utils
70
+ conda create -n diffpy.utils_env python=3
71
+ conda activate diffpy.utils_env
38
72
39
73
Then, to fully install ``diffpy.utils `` in our active environment, run ::
40
74
41
- conda install diffpy.utils
75
+ conda install diffpy.utils
42
76
43
77
Another option is to use ``pip `` to download and install the latest release from
44
78
`Python Package Index <https://pypi.python.org >`_.
45
- To install using ``pip `` into your ``diffpy-utils `` environment, we will also have to install dependencies ::
79
+ To install using ``pip `` into your ``diffpy.utils_env `` environment, we will also have to install dependencies ::
46
80
47
- pip install numpy
48
- pip install diffpy.utils
81
+ pip install -r https://raw.githubusercontent.com/diffpy/diffpy.utils/main/requirements/run.txt
49
82
50
- For those planning to use functions in the ``diffpy.utils.wx `` module, you will also need to install ``wxPython ``.
51
- Both of the following lines will install this package. ::
83
+ and then install the package ::
52
84
53
- conda install wxPython
54
- pip install wxPython
85
+ pip install diffpy.utils
55
86
56
87
If you prefer to install from sources, after installing the dependencies, obtain the source archive from
57
88
`GitHub <https://github.com/diffpy/diffpy.utils/ >`_. Once installed, ``cd `` into your ``diffpy.utils `` directory
58
89
and run the following ::
59
90
60
- pip install .
91
+ pip install .
61
92
62
- To check the installation integrity, if the following passes all checks, you are good! ::
93
+ Support and Contribute
94
+ ----------------------
63
95
64
- pip install pytest
65
- python -m diffpy.utils.tests.run
96
+ `Diffpy user group <https://groups.google.com/g/diffpy-users >`_ is the discussion forum for general questions and discussions about the use of diffpy.utils. Please join the diffpy.utils users community by joining the Google group. The diffpy.utils project welcomes your expertise and enthusiasm!
66
97
98
+ If you see a bug or want to request a feature, please `report it as an issue <https://github.com/diffpy/diffpy.utils/issues >`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.utils/pulls >`_. You can also post it to the `Diffpy user group <https://groups.google.com/g/diffpy-users >`_.
67
99
68
- DEVELOPMENT
69
- ------------------------------------------------------------------------
70
-
71
- diffpy.utils is an open-source software developed as a part of the
72
- DiffPy-CMI complex modeling initiative at the Brookhaven National
73
- Laboratory. The diffpy.utils sources are hosted at
74
- https://github.com/diffpy/diffpy.utils.
75
-
76
- Feel free to fork the project and contribute. To install diffpy.utils
100
+ Feel free to fork the project and contribute. To install diffpy.utils
77
101
in a development mode, with its sources being directly used by Python
78
102
rather than copied to a package directory, use the following in the root
79
103
directory ::
80
104
81
- pip install -e .
105
+ pip install -e .
106
+
107
+ To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit
108
+ hooks.
109
+
110
+ 1. Install pre-commit in your working environment by running ``conda install pre-commit ``.
82
111
83
- Note that this is only supported for ` setuptools ` version 62.0 and above .
112
+ 2. Initialize pre-commit (one time only) `` pre-commit install `` .
84
113
114
+ Thereafter your code will be linted by black and isort and checked against flake8 before you can commit.
115
+ If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should
116
+ pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before
117
+ trying to commit again.
85
118
86
- CONTACTS
87
- ------------------------------------------------------------------------
119
+ Improvements and fixes are always appreciated.
88
120
89
- For more information on diffpy.utils please visit the project web-page
121
+ Before contribuing, please read our ` Code of Conduct < https://github.com/diffpy/diffpy.utils/blob/main/CODE_OF_CONDUCT.rst >`_.
90
122
91
- http://www.diffpy.org/
123
+ Contact
124
+ -------
92
125
93
- or email Prof. Simon Billinge at
[email protected] .
126
+ For more information on diffpy.utils please visit the project ` web-page < https://diffpy.github.io/ >`_ or email Prof. Simon Billinge at
[email protected] .
0 commit comments