diffpy.utils 3.4.0__tar.gz → 3.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. diffpy_utils-3.4.2/AUTHORS.rst +10 -0
  2. diffpy_utils-3.4.2/LICENSE.rst +141 -0
  3. diffpy_utils-3.4.2/MANIFEST.in +12 -0
  4. diffpy_utils-3.4.2/PKG-INFO +157 -0
  5. diffpy_utils-3.4.2/README.rst +127 -0
  6. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/pyproject.toml +12 -10
  7. diffpy_utils-3.4.2/requirements/build.txt +2 -0
  8. diffpy_utils-3.4.2/requirements/docs.txt +4 -0
  9. diffpy_utils-3.4.2/requirements/pip.txt +0 -0
  10. diffpy_utils-3.4.2/requirements/run.txt +1 -0
  11. diffpy_utils-3.4.2/requirements/test.txt +8 -0
  12. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/src/diffpy/__init__.py +7 -4
  13. diffpy_utils-3.4.2/src/diffpy/utils/__init__.py +24 -0
  14. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/src/diffpy/utils/scattering_objects/diffraction_objects.py +13 -32
  15. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/src/diffpy/utils/version.py +7 -7
  16. diffpy_utils-3.4.2/src/diffpy.utils.egg-info/PKG-INFO +157 -0
  17. diffpy_utils-3.4.2/src/diffpy.utils.egg-info/SOURCES.txt +48 -0
  18. diffpy_utils-3.4.2/src/diffpy.utils.egg-info/requires.txt +1 -0
  19. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/conftest.py +10 -0
  20. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/test_loaddata.py +8 -4
  21. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/test_serialization.py +10 -11
  22. diffpy_utils-3.4.0/AUTHORS.txt +0 -5
  23. diffpy_utils-3.4.0/LICENSE.txt +0 -137
  24. diffpy_utils-3.4.0/MANIFEST.in +0 -15
  25. diffpy_utils-3.4.0/PKG-INFO +0 -123
  26. diffpy_utils-3.4.0/README.rst +0 -93
  27. diffpy_utils-3.4.0/src/diffpy/utils/__init__.py +0 -25
  28. diffpy_utils-3.4.0/src/diffpy/utils/tests/__init__.py +0 -81
  29. diffpy_utils-3.4.0/src/diffpy/utils/tests/debug.py +0 -35
  30. diffpy_utils-3.4.0/src/diffpy/utils/tests/run.py +0 -37
  31. diffpy_utils-3.4.0/src/diffpy/utils/tests/testhelpers.py +0 -30
  32. diffpy_utils-3.4.0/src/diffpy.utils.egg-info/PKG-INFO +0 -123
  33. diffpy_utils-3.4.0/src/diffpy.utils.egg-info/SOURCES.txt +0 -46
  34. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/LICENSE_DANSE.txt +0 -0
  35. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/setup.cfg +0 -0
  36. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/src/diffpy/utils/parsers/__init__.py +0 -0
  37. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/src/diffpy/utils/parsers/custom_exceptions.py +0 -0
  38. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/src/diffpy/utils/parsers/loaddata.py +0 -0
  39. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/src/diffpy/utils/parsers/resample.py +0 -0
  40. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/src/diffpy/utils/parsers/serialization.py +0 -0
  41. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/src/diffpy/utils/scattering_objects/__init__.py +0 -0
  42. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/src/diffpy/utils/scattering_objects/user_config.py +0 -0
  43. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/src/diffpy/utils/tools.py +0 -0
  44. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/src/diffpy/utils/version.cfg +0 -0
  45. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/src/diffpy/utils/wx/__init__.py +0 -0
  46. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/src/diffpy/utils/wx/gridutils.py +0 -0
  47. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/src/diffpy.utils.egg-info/dependency_links.txt +0 -0
  48. {diffpy_utils-3.4.0 → diffpy_utils-3.4.2}/src/diffpy.utils.egg-info/top_level.txt +0 -0
  49. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/test_diffraction_objects.py +0 -0
  50. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/test_resample.py +0 -0
  51. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/test_tools.py +0 -0
  52. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/testdata/dbload/e1.gr +0 -0
  53. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/testdata/dbload/e2.gr +0 -0
  54. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/testdata/dbload/e3.gr +0 -0
  55. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/testdata/generated_db.json +0 -0
  56. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/testdata/generatewarnings.txt +0 -0
  57. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/testdata/loaddata01.txt +0 -0
  58. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/testdata/loaddatawithheaders.txt +0 -0
  59. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/testdata/loadfile.txt +0 -0
  60. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/testdata/strumining.json +0 -0
  61. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/testdata/targetjson.json +0 -0
  62. {diffpy_utils-3.4.0/src/diffpy/utils → diffpy_utils-3.4.2}/tests/testdata/wrong.type +0 -0
@@ -0,0 +1,10 @@
1
+ Authors
2
+ =======
3
+
4
+ Billinge Group and community contibutors.
5
+
6
+ Contributors
7
+ ------------
8
+
9
+ For a list of contributors, visit
10
+ https://github.com/diffpy/diffpy.utils/graphs/contributors
@@ -0,0 +1,141 @@
1
+ OPEN SOURCE LICENSE AGREEMENT
2
+ =============================
3
+
4
+ Copyright (c) 1989, 1991 Free Software Foundation, Inc.
5
+
6
+ Copyright (c) 2006, The Regents of the University of California through Lawrence Berkeley National Laboratory
7
+
8
+ Copyright (c) 2006-2007, Board of Trustees of Michigan State University
9
+
10
+ Copyright (c) 2008-2012, The Trustees of Columbia University in the City of New York
11
+
12
+ Copyright (c) 2009-2011, University of Tennessee
13
+
14
+ Copyright (c) 2014, Australian Synchrotron Research Program Inc., ("ASRP")
15
+
16
+ Copyright (c) 2014-2019, Brookhaven Science Associates, Brookhaven National Laboratory
17
+
18
+ Copyright (c) 2019-2024, The Trustees of Columbia University in the City of New York.
19
+ All rights reserved.
20
+
21
+ The "DiffPy-CMI" is distributed subject to the following license conditions:
22
+
23
+ .. code-block:: text
24
+
25
+ SOFTWARE LICENSE AGREEMENT
26
+
27
+ Software: DiffPy-CMI
28
+
29
+
30
+ (1) The "Software", below, refers to the aforementioned DiffPy-CMI (in either
31
+ source code, or binary form and accompanying documentation).
32
+
33
+ Part of the software was derived from the DANSE, ObjCryst++ (with permission),
34
+ PyCifRW, Python periodictable, CCTBX, and SasView open source projects, of
35
+ which the original Copyrights are contained in each individual file.
36
+
37
+ Each licensee is addressed as "you" or "Licensee."
38
+
39
+
40
+ (2) The copyright holders shown above and their third-party Licensors hereby
41
+ grant licensee a royalty-free nonexclusive license, subject to the limitations
42
+ stated herein and U.S. Government license rights.
43
+
44
+
45
+ (3) You may modify and make a copy or copies of the software for use within
46
+ your organization, if you meet the following conditions:
47
+
48
+ (a) Copies in source code must include the copyright notice and this
49
+ software license agreement.
50
+
51
+ (b) Copies in binary form must include the copyright notice and this
52
+ Software License Agreement in the documentation and/or other materials
53
+ provided with the copy.
54
+
55
+
56
+ (4) You may modify a copy or copies of the Software or any portion of it, thus
57
+ forming a work based on the Software, and distribute copies of such work
58
+ outside your organization, if you meet all of the following conditions:
59
+
60
+ (a) Copies in source code must include the copyright notice and this
61
+ Software License Agreement;
62
+
63
+ (b) Copies in binary form must include the copyright notice and this
64
+ Software License Agreement in the documentation and/or other materials
65
+ provided with the copy;
66
+
67
+ (c) Modified copies and works based on the Software must carry prominent
68
+ notices stating that you changed specified portions of the Software.
69
+
70
+ (d) Neither the name of Brookhaven Science Associates or Brookhaven
71
+ National Laboratory nor the names of its contributors may be used to
72
+ endorse or promote products derived from this software without specific
73
+ written permission.
74
+
75
+
76
+ (5) Portions of the Software resulted from work developed under a U.S.
77
+ Government contract and are subject to the following license:
78
+ The Government is granted for itself and others acting on its behalf a
79
+ paid-up, nonexclusive, irrevocable worldwide license in this computer software
80
+ to reproduce, prepare derivative works, and perform publicly and display
81
+ publicly.
82
+
83
+
84
+ (6) WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT
85
+ WARRANTY OF ANY KIND. THE COPYRIGHT HOLDERS, THEIR THIRD PARTY
86
+ LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND
87
+ THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
88
+ BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
89
+ PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL
90
+ LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF
91
+ THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF THE SOFTWARE WOULD NOT INFRINGE
92
+ PRIVATELY OWNED RIGHTS, (4) DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION
93
+ UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL BE CORRECTED.
94
+
95
+
96
+ (7) LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT HOLDERS, THEIR
97
+ THIRD PARTY LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF
98
+ ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
99
+ CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE, INCLUDING
100
+ BUT NOT LIMITED TO LOSS OF PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER,
101
+ WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING
102
+ NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, EVEN IF ANY OF SAID PARTIES HAS
103
+ BEEN WARNED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGES.
104
+
105
+
106
+ Brookhaven National Laboratory Notice
107
+ =====================================
108
+
109
+ Acknowledgment of sponsorship
110
+ -----------------------------
111
+
112
+ This software was produced by the Brookhaven National Laboratory, under
113
+ Contract DE-AC02-98CH10886 with the Department of Energy.
114
+
115
+
116
+ Government disclaimer of liability
117
+ ----------------------------------
118
+
119
+ Neither the United States nor the United States Department of Energy, nor
120
+ any of their employees, makes any warranty, express or implied, or assumes
121
+ any legal liability or responsibility for the accuracy, completeness, or
122
+ usefulness of any data, apparatus, product, or process disclosed, or
123
+ represents that its use would not infringe privately owned rights.
124
+
125
+
126
+ Brookhaven disclaimer of liability
127
+ ----------------------------------
128
+
129
+ Brookhaven National Laboratory makes no representations or warranties,
130
+ express or implied, nor assumes any liability for the use of this software.
131
+
132
+
133
+ Maintenance of notice
134
+ ---------------------
135
+
136
+ In the interest of clarity regarding the origin and status of this
137
+ software, Brookhaven National Laboratory requests that any recipient of it
138
+ maintain this notice affixed to any distribution by the recipient that
139
+ contains a copy or derivative of this software.
140
+
141
+ END OF LICENSE
@@ -0,0 +1,12 @@
1
+ graft src
2
+ graft tests
3
+ graft requirements
4
+
5
+ include AUTHORS.rst LICENSE*.rst README.rst
6
+
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.
@@ -0,0 +1,157 @@
1
+ Metadata-Version: 2.1
2
+ Name: diffpy.utils
3
+ Version: 3.4.2
4
+ Summary: Shared utilities for diffpy packages
5
+ Author-email: "Simon J.L. Billinge group" <simon.billinge@gmail.com>
6
+ Maintainer-email: "Simon J.L. Billinge group" <simon.billinge@gmail.com>
7
+ Project-URL: Homepage, https://github.com/diffpy/diffpy.utils/
8
+ Project-URL: Issues, https://github.com/diffpy/diffpy.utils/issues/
9
+ Keywords: "text data parsers" "wx grid" "diffraction objects"
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: Free To Use But Restricted
15
+ Classifier: Operating System :: MacOS :: MacOS X
16
+ Classifier: Operating System :: Microsoft :: Windows
17
+ Classifier: Operating System :: POSIX
18
+ Classifier: Operating System :: Unix
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Scientific/Engineering :: Physics
23
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
24
+ Requires-Python: >=3.10
25
+ Description-Content-Type: text/x-rst
26
+ License-File: LICENSE.rst
27
+ License-File: LICENSE_DANSE.txt
28
+ License-File: AUTHORS.rst
29
+ Requires-Dist: numpy
30
+
31
+ |Icon| |title|_
32
+ ===============
33
+
34
+ .. |title| replace:: diffpy.utils
35
+ .. _title: https://diffpy.github.io/diffpy.utils
36
+
37
+ .. |Icon| image:: https://avatars.githubusercontent.com/diffpy
38
+ :target: https://diffpy.github.io/diffpy.utils
39
+ :height: 100px
40
+
41
+ |PyPi| |Forge| |PythonVersion| |PR|
42
+
43
+ |CI| |Codecov| |Black| |Tracking|
44
+
45
+ .. |Black| image:: https://img.shields.io/badge/code_style-black-black
46
+ :target: https://github.com/psf/black
47
+
48
+ .. |CI| image:: https://github.com/diffpy/diffpy.utils/actions/workflows/matrix-and-codecov-on-merge-to-main.yml/badge.svg
49
+ :target: https://github.com/diffpy/diffpy.utils/actions/workflows/matrix-and-codecov-on-merge-to-main.yml
50
+
51
+ .. |Codecov| image:: https://codecov.io/gh/diffpy/diffpy.utils/branch/main/graph/badge.svg
52
+ :target: https://codecov.io/gh/diffpy/diffpy.utils
53
+
54
+ .. |Forge| image:: https://img.shields.io/conda/vn/conda-forge/diffpy.utils
55
+ :target: https://anaconda.org/conda-forge/diffpy.utils
56
+
57
+ .. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff
58
+
59
+ .. |PyPi| image:: https://img.shields.io/pypi/v/diffpy.utils
60
+ :target: https://pypi.org/project/diffpy.utils/
61
+
62
+ .. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.utils
63
+ :target: https://pypi.org/project/diffpy.utils/
64
+
65
+ .. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue
66
+ :target: https://github.com/diffpy/diffpy.utils/issues
67
+
68
+ diffpy.utils Package
69
+ ========================================================================
70
+
71
+ General purpose shared utilities for the diffpy libraries.
72
+
73
+ The diffpy.utils package provides functions for extracting array data from
74
+ variously formatted text files and wx GUI utilities used by the PDFgui
75
+ program. The package also includes an interpolation function based on the
76
+ Whittaker-Shannon formula that can be used to resample a PDF or other profile
77
+ function over a new grid.
78
+
79
+ Citation
80
+ --------
81
+
82
+ If you use diffpy.utils in a scientific publication, we would like you to cite this package as
83
+
84
+ diffpy.utils Package, https://github.com/diffpy/diffpy.utils
85
+
86
+ Documentation
87
+ -------------
88
+
89
+ Documentation may be found at, https://diffpy.github.io/diffpy.utils
90
+
91
+ Installation
92
+ ------------
93
+
94
+ The preferred method is to use `Miniconda Python
95
+ <https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html>`_
96
+ and install from the "conda-forge" channel of Conda packages.
97
+
98
+ To add "conda-forge" to the conda channels, run the following in a terminal. ::
99
+
100
+ conda config --add channels conda-forge
101
+
102
+ We want to install our packages in a suitable conda environment.
103
+ The following creates and activates a new environment named ``diffpy.utils_env`` ::
104
+
105
+ conda create -n diffpy.utils_env python=3
106
+ conda activate diffpy.utils_env
107
+
108
+ Then, to fully install ``diffpy.utils`` in our active environment, run ::
109
+
110
+ conda install diffpy.utils
111
+
112
+ Another option is to use ``pip`` to download and install the latest release from
113
+ `Python Package Index <https://pypi.python.org>`_.
114
+ To install using ``pip`` into your ``diffpy.utils_env`` environment type ::
115
+
116
+ pip install diffpy.utils
117
+
118
+ If you prefer to install from sources, after installing the dependencies, obtain the source archive from
119
+ `GitHub <https://github.com/diffpy/diffpy.utils/>`_. Once installed, ``cd`` into your ``diffpy.utils`` directory
120
+ and run the following ::
121
+
122
+ pip install .
123
+
124
+ Support and Contribute
125
+ ----------------------
126
+
127
+ `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!
128
+
129
+ 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>`_.
130
+
131
+ Feel free to fork the project and contribute. To install diffpy.utils
132
+ in a development mode, with its sources being directly used by Python
133
+ rather than copied to a package directory, use the following in the root
134
+ directory ::
135
+
136
+ pip install -e .
137
+
138
+ To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit
139
+ hooks.
140
+
141
+ 1. Install pre-commit in your working environment by running ``conda install pre-commit``.
142
+
143
+ 2. Initialize pre-commit (one time only) ``pre-commit install``.
144
+
145
+ Thereafter your code will be linted by black and isort and checked against flake8 before you can commit.
146
+ If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should
147
+ pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before
148
+ trying to commit again.
149
+
150
+ Improvements and fixes are always appreciated.
151
+
152
+ Before contribuing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.utils/blob/main/CODE_OF_CONDUCT.rst>`_.
153
+
154
+ Contact
155
+ -------
156
+
157
+ For more information on diffpy.utils please visit the project `web-page <https://diffpy.github.io/>`_ or email Prof. Simon Billinge at sb2896@columbia.edu.
@@ -0,0 +1,127 @@
1
+ |Icon| |title|_
2
+ ===============
3
+
4
+ .. |title| replace:: diffpy.utils
5
+ .. _title: https://diffpy.github.io/diffpy.utils
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/matrix-and-codecov-on-merge-to-main.yml/badge.svg
19
+ :target: https://github.com/diffpy/diffpy.utils/actions/workflows/matrix-and-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
37
+
38
+ diffpy.utils Package
39
+ ========================================================================
40
+
41
+ General purpose shared utilities for the diffpy libraries.
42
+
43
+ The diffpy.utils package provides functions for extracting array data from
44
+ variously formatted text files and wx GUI utilities used by the PDFgui
45
+ program. The package also includes an interpolation function based on the
46
+ Whittaker-Shannon formula that can be used to resample a PDF or other profile
47
+ function over a new grid.
48
+
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
55
+
56
+ Documentation
57
+ -------------
58
+
59
+ Documentation may be found at, https://diffpy.github.io/diffpy.utils
60
+
61
+ Installation
62
+ ------------
63
+
64
+ The preferred method is to use `Miniconda Python
65
+ <https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html>`_
66
+ and install from the "conda-forge" channel of Conda packages.
67
+
68
+ To add "conda-forge" to the conda channels, run the following in a terminal. ::
69
+
70
+ conda config --add channels conda-forge
71
+
72
+ We want to install our packages in a suitable conda environment.
73
+ The following creates and activates a new environment named ``diffpy.utils_env`` ::
74
+
75
+ conda create -n diffpy.utils_env python=3
76
+ conda activate diffpy.utils_env
77
+
78
+ Then, to fully install ``diffpy.utils`` in our active environment, run ::
79
+
80
+ conda install diffpy.utils
81
+
82
+ Another option is to use ``pip`` to download and install the latest release from
83
+ `Python Package Index <https://pypi.python.org>`_.
84
+ To install using ``pip`` into your ``diffpy.utils_env`` environment type ::
85
+
86
+ pip install diffpy.utils
87
+
88
+ If you prefer to install from sources, after installing the dependencies, obtain the source archive from
89
+ `GitHub <https://github.com/diffpy/diffpy.utils/>`_. Once installed, ``cd`` into your ``diffpy.utils`` directory
90
+ and run the following ::
91
+
92
+ pip install .
93
+
94
+ Support and Contribute
95
+ ----------------------
96
+
97
+ `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!
98
+
99
+ 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>`_.
100
+
101
+ Feel free to fork the project and contribute. To install diffpy.utils
102
+ in a development mode, with its sources being directly used by Python
103
+ rather than copied to a package directory, use the following in the root
104
+ directory ::
105
+
106
+ pip install -e .
107
+
108
+ To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit
109
+ hooks.
110
+
111
+ 1. Install pre-commit in your working environment by running ``conda install pre-commit``.
112
+
113
+ 2. Initialize pre-commit (one time only) ``pre-commit install``.
114
+
115
+ Thereafter your code will be linted by black and isort and checked against flake8 before you can commit.
116
+ If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should
117
+ pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before
118
+ trying to commit again.
119
+
120
+ Improvements and fixes are always appreciated.
121
+
122
+ Before contribuing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.utils/blob/main/CODE_OF_CONDUCT.rst>`_.
123
+
124
+ Contact
125
+ -------
126
+
127
+ For more information on diffpy.utils please visit the project `web-page <https://diffpy.github.io/>`_ or email Prof. Simon Billinge at sb2896@columbia.edu.
@@ -4,38 +4,37 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "diffpy.utils"
7
- dynamic=['version']
7
+ dynamic=['version', 'dependencies']
8
8
  authors = [
9
9
  { name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" },
10
10
  ]
11
11
  maintainers = [
12
12
  { name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" },
13
13
  ]
14
- description = "Shared utilities for diffpy packages."
15
- keywords = ["text data parsers", "wx grid", "diffraction objects"]
14
+ description = "Shared utilities for diffpy packages"
15
+ keywords = ['"text data parsers" "wx grid" "diffraction objects"']
16
16
  readme = "README.rst"
17
- requires-python = ">=3.9"
17
+ requires-python = ">=3.10"
18
18
  classifiers = [
19
19
  'Development Status :: 5 - Production/Stable',
20
20
  'Environment :: Console',
21
21
  'Intended Audience :: Developers',
22
22
  'Intended Audience :: Science/Research',
23
- 'License :: OSI Approved :: BSD License',
23
+ 'License :: Free To Use But Restricted',
24
24
  'Operating System :: MacOS :: MacOS X',
25
25
  'Operating System :: Microsoft :: Windows',
26
26
  'Operating System :: POSIX',
27
27
  'Operating System :: Unix',
28
- 'Programming Language :: Python :: 2.7',
29
- 'Programming Language :: Python :: 3.9',
30
28
  'Programming Language :: Python :: 3.10',
31
29
  'Programming Language :: Python :: 3.11',
32
30
  'Programming Language :: Python :: 3.12',
33
31
  'Topic :: Scientific/Engineering :: Physics',
32
+ 'Topic :: Scientific/Engineering :: Chemistry',
34
33
  ]
35
34
 
36
35
  [project.urls]
37
36
  Homepage = "https://github.com/diffpy/diffpy.utils/"
38
- Issues = "https://github.com/diffpy/diffpy.utils/issues"
37
+ Issues = "https://github.com/diffpy/diffpy.utils/issues/"
39
38
 
40
39
  [tool.setuptools-git-versioning]
41
40
  enabled = true
@@ -45,10 +44,13 @@ dirty_template = "{tag}"
45
44
 
46
45
  [tool.setuptools.packages.find]
47
46
  where = ["src"] # list of folders that contain the packages (["."] by default)
48
- include = ["diffpy*"] # package names should match these glob patterns (["*"] by default)
49
- exclude = ["diffpy.utils.tests*"] # exclude packages matching these glob patterns (empty by default)
47
+ include = ["*"] # package names should match these glob patterns (["*"] by default)
48
+ exclude = [] # exclude packages matching these glob patterns (empty by default)
50
49
  namespaces = false # to disable scanning PEP 420 namespaces (true by default)
51
50
 
51
+ [tool.setuptools.dynamic]
52
+ dependencies = {file = ["requirements/run.txt"]}
53
+
52
54
  [tool.black]
53
55
  line-length = 115
54
56
  include = '\.pyi?$'
@@ -0,0 +1,2 @@
1
+ python
2
+ setuptools
@@ -0,0 +1,4 @@
1
+ sphinx
2
+ sphinx_rtd_theme
3
+ doctr
4
+ m2r
File without changes
@@ -0,0 +1 @@
1
+ numpy
@@ -0,0 +1,8 @@
1
+ flake8
2
+ pytest
3
+ codecov
4
+ coverage
5
+ pytest-env
6
+ pytest-mock
7
+ pytest-cov
8
+ freezegun
@@ -5,11 +5,15 @@
5
5
  # Simon J. L. Billinge
6
6
  # (c) 2010 The Trustees of Columbia University
7
7
  # in the City of New York. All rights reserved.
8
+ # (c) 2024 The Trustees of Columbia University in the City of New York.
9
+ # All rights reserved.
8
10
  #
9
- # File coded by: Pavol Juhas
11
+ # File coded by: Billinge Group members and community contributors.
10
12
  #
11
- # See AUTHORS.txt for a list of people who contributed.
12
- # See LICENSE_DANSE.txt for license information.
13
+ # See GitHub contributions for a more detailed list of contributors.
14
+ # https://github.com/diffpy/diffpy.utils/graphs/contributors
15
+ #
16
+ # See LICENSE.rst for license information.
13
17
  #
14
18
  ##############################################################################
15
19
 
@@ -23,5 +27,4 @@ from pkgutil import extend_path
23
27
 
24
28
  __path__ = extend_path(__path__, __name__)
25
29
 
26
-
27
30
  # End of file
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env python
2
+ ##############################################################################
3
+ #
4
+ # (c) 2024 The Trustees of Columbia University in the City of New York.
5
+ # All rights reserved.
6
+ #
7
+ # File coded by: Billinge Group members and community contributors.
8
+ #
9
+ # See GitHub contributions for a more detailed list of contributors.
10
+ # https://github.com/diffpy/diffpy.utils/graphs/contributors
11
+ #
12
+ # See LICENSE.rst for license information.
13
+ #
14
+ ##############################################################################
15
+
16
+ """Shared utilities for diffpy packages"""
17
+
18
+ # package version
19
+ from diffpy.utils.version import __version__
20
+
21
+ # silence the pyflakes syntax checker
22
+ assert __version__ or True
23
+
24
+ # End of file