Skip to content

Releases: diffpy/diffpy.utils

3.6.0

01 Jan 20:44
Compare
Choose a tag to compare

Added:

  • unit tests for initializing DiffractionObject with empty array in xarray and yarray
  • function to return the index of the closest value to the specified value in an array.
  • functions to convert between d and q
  • catch division by zero warning messages in tests
  • functionality to raise useful warning and error messages during angular conversion between two theta and q
  • Improved API documentation in DiffractionObject methods and properties using the NumPy docstring format and PEP 256
  • validate xtype belongs to XQUANTITIES during DiffractionObject init
  • Group's Pytest practices for using @pytest.mark.parametrize in test_diffraction_objects.py
  • unit tests for add operation for DiffractionObject
  • Better wording on the capture user info functionality
  • Spelling check via Codespell in pre-commit
  • prettier pre-commit hook for automatic linting of .yml, .json, and .md files
  • Function that can be used to compute muD (absorption coefficient) from a file containing an absorption profile
    from a line-scan through the sample
  • sbillinge username as the authorized admin for GitHub release workflow in build-wheel-release-upload.yml
  • function to compute x-ray attenuation coefficient (mu) using XrayDB
  • class docstring for DiffractionObject
  • docforamtter in pre-commit for automatic formatting of docstrings to PEP 257
  • Function nsinterp for automatic interpolation onto the Nyquist-Shannon grid.
  • functionality to return the 2D array based on the specified xtype
  • functionality in dump to allow writing data on dspace
  • addition, multiplication, subtraction, and division operators between two DiffractionObject instances or a scalar value with another DiffractionObject for modifying yarray (intensity) values.
  • functionality to rescale diffraction objects, placing one on top of another at a specified point
  • new feature in scale_to(): default scaling is based on the max q-value in each diffraction object.
  • functions to convert between d and tth
  • unit test for expected warning when no wavelength is provided for DiffractionObject init
  • copy() method for DiffractionObject instance
  • docstrings for on_q, on_tth, on_d, and dump in diffraction_objects.py.
  • prevent direct modification of all_arrays using @property
  • Information on how to update the default user information
  • Example docs for basic DiffractionObject usage
  • deploy github pages documentation on pre-release
  • Gettable id property to DiffractionObject

Changed:

  • Refactor get_user_info to separate the tasks of getting the info from config files
    and creating config files when they are missing.
  • test comment format with compact style without extra line for each comment
  • Rename input_scattering_quantity to input_data in DiffractionObject init
  • refactor q_to_tth() and tth_to_q() into diffpy.utils.transforms to make them available outside
    DiffractionObject
  • Moved resampler out of parsers, new path is diffpy.utils.resampler
  • Rename the isfloat function to is_number, and move it to the diffpy/utils/utilsvalidators.py directory
  • arrays and attributes now can be inserted when a DiffractionObject is instantiated
  • data are now stored as a (len(x),4) numpy array with intensity in column 0, the q, then tth, then d
  • DiffractionObject.on_q, ...on_tth and ...on_d are now methods and called as DiffractionObject.on_q() etc.`
  • \tests directory tree to match \src
  • DiffractionObject's "id" property renamed to "uuid"
  • DiffractionObject requires 3 input parameters of xarray, yarray, xtype, to be instantiated. It can be instantiated with empty arrays.
  • Paths in our documentation reflect changes made in code.
  • Enumerated list for the different ways to set user information

Deprecated:

  • resample function in resampler. Replaced with wsinterp with better functionality.
  • Diffraction_object class, renamed to DiffractionObject

Fixed:

  • additional information to users to relieve frustration in finding how to update global config
  • Unittest to Pytest migration for test_loaddata.py
  • file paths of the test files according to new \tests directory tree
  • Typo for get_package_info example
  • return type of get_array_index method in DiffractionObject to return integer instead of list

Removed:

  • scattering_objects layer in importing diffraction_objects
  • user_config.py. Replaced by _load_config and check_and_build_global_config in tools.py.
  • Relative imports in parser's init.py
  • set_angles_from_list, set_angles_from, set_qs_from_range methods in DiffractionObject

3.6.0rc4

01 Jan 20:36
913d824
Compare
Choose a tag to compare
3.6.0rc4 Pre-release
Pre-release

What's Changed

Full Changelog: 3.6.0rc2...3.6.0rc4

3.6.0rc3

01 Jan 19:02
5359054
Compare
Choose a tag to compare
3.6.0rc3 Pre-release
Pre-release

What's Changed

  • docs: deploy docs on github pre-release with tag push by @bobleesj in #310

Full Changelog: 3.6.0rc0...3.6.0rc3

3.6.0rc2

01 Jan 00:03
5359054
Compare
Choose a tag to compare
3.6.0rc2 Pre-release
Pre-release

What's Changed

  • docs: deploy docs on github pre-release with tag push by @bobleesj in #310

Full Changelog: 3.6.0rc0...3.6.0rc2

3.6.0rc1

31 Dec 23:52
5daab78
Compare
Choose a tag to compare
3.6.0rc1 Pre-release
Pre-release

What's Changed

  • Add commas in keywords in pyproject.toml by @bobleesj in #142
  • Configure automatic spelling check via codespell within pre-commit by @alisnwu in #152
  • add xtype=d in dump function by @yucongalicechen in #153
  • Add Codecov secret to .github/workflows/tests-on-pr.yml to use Codecov by @bobleesj in #159
  • Added extra information in warning for better capturing of user info by @alisnwu in #149
  • Recut - update release checklist and job names by @bobleesj in #162
  • Move resampler out of parsers, remove relative paths for import by @alisnwu in #164
  • Add conda-forge release checklist to GitHub Issue template by @bobleesj in #166
  • Update release_checklist.md - use fourigui 0.2.0 version by @bobleesj in #168
  • Documentation update by @Sparks29032 in #169
  • Reorganized test files to match src folder structure by @alisnwu in #171
  • Deprecate Diffraction_object, rename to DiffractionObject (new clean PR) by @bobleesj in #172
  • Use pytest for test_loaddata.py by @bobleesj in #179
  • q_to_tth & tth_to_q by @yucongalicechen in #178
  • refactor the transforms out of DiffractionObjects by @sbillinge in #184
  • Remove scattering_objects folder for importing DiffractionObjects by @bobleesj in #189
  • move tests to top level directory by @sbillinge in #190
  • DiffractionObject can now be instantiated directly by @sbillinge in #193
  • Use @property to prevent direct modification of all_arrays by @bobleesj in #196
  • d_to_q, q_to_d by @yucongalicechen in #197
  • test function for get_angle_index by @yucongalicechen in #191
  • test function on_xtype by @yucongalicechen in #192
  • add d_to_tth, tth_to_d by @yucongalicechen in #199
  • Add New release checklist BG standard including python -m build and twine check dist/* by @bobleesj in #203
  • Add copy() method for DiffractionObject by @bobleesj in #204
  • More info on updating global config for users by @alisnwu in #208
  • Check valid x and y array lenghts and xtypes in insert_scattering_quantity by @bobleesj in #209
  • Remove unused test util functions for comparing two dicts, use __eq__ to compare DiffractionObjects by @bobleesj in #214
  • Rename input_scattering_quantity to input_data in DiffractionObject init by @bobleesj in #215
  • Add doc build GitHub CI yml file by @bobleesj in #217
  • Add gettable id property to DiffractionObject by @bobleesj in #216
  • Improve wsinterp docstrings and test function by @bobleesj in #221
    1. Capture no wavelength UserWarning for test_q_to_thh method 2) discuss passing variables to @pytest.mark.parametrize by @bobleesj in #225
  • tests for scale_to by @yucongalicechen in #211
  • Refactor test-on-xtype test function by @bobleesj in #231
  • Remove set_angles_from_list, set_angles_from, set_qs_from_range by @bobleesj in #233
  • add deprecation warning to resample function by @alisnwu in #234
  • Add function for Nyquist-Shannon grid interpolation by @Sparks29032 in #235
  • docs for transformers module by @yucongalicechen in #237
  • Do not allow an empty instance of DiffractionObject - require xarrays yarrays xtype by @bobleesj in #228
  • Refactor test_transfor.py: pass variables to pytest parametrize, use conftest.py for common error messages by @bobleesj in #236
  • updated tools example doc with better get_user_info example by @alisnwu in #242
  • simon tweaks to tools example by @sbillinge in #243
  • Rename doc files and fix typos by @yucongalicechen in #246
  • docs for diffraction objects by @yucongalicechen in #249
  • Simon tweaks to DO examples by @sbillinge in #252
  • fix diffraction objects docs typos by @yucongalicechen in #254
  • Refactor test_scale_to function - continue to establish good practices by @bobleesj in #255
  • Remove 6 pytest warnings with capturing wavelength warnings by @bobleesj in #259
  • Refactor division by zero error test in test_tth_to_d by @bobleesj in #260
  • Catch wavelength=none warnings in DiffractionObject by @bobleesj in #261
  • Fix all remaining divide by zero pytest warnings by @bobleesj in #262
  • Apply prettier to pre-commit for automatic linting of .md .yaml files by @bobleesj in #263
  • Continue refactor test functions, replace UC to C in test_transforms.py by @bobleesj in #266
  • refactor to separate getting info and creating config files by @sbillinge in #264
  • Add class docstring for DiffractionObject by @bobleesj in #265
  • add docs for check_and_build_global_config() by @yucongalicechen in #270
  • Improve test comments under @pytest.mark.parametrize in test_diffraction_objects.py by @bobleesj in #273
  • Improve pytest parametrize comments for test_transform.py by @bobleesj in #275
  • Use compact test comment style for each case under @pytest.mark.parametrize by @bobleesj in #277
  • Apply docformatter in pre-commit for PEP 257 docstring auto format, no manual modifications made by @bobleesj in #272
  • Config updater workflow by @sbillinge in #267
  • Rename id to uuid in DiffractionObject by @bobleesj in #271
  • Fix get_array_index returns int instead of list in DiffractionObject by @bobleesj in #283
  • Add two test cases for init DiffractionObject with empty xarray and yarray values by @bobleesj in #284
  • improve comments for test_scale_to by @yucongalicechen in #280
  • Refactor __add__ operation in DiffractionObject and add tests by @bobleesj in #285
  • feat: Support *, /, - operations between two DiffractionObjects or scalar by @bobleesj in #293
  • feat: muD calculator by @yucongalicechen in #292
  • compute mu by @yucongalicechen in #278
  • add new features in scale_to() so user can run without an x-value by @yucongalicechen in #289
  • fix: compare values and shape of xarray values before applying operations between 2 DiffractionObjects by @bobleesj in #299
  • docs: add examples for operations by @yucongalicechen in #297
  • refactor: separate isfloat into a new file within validators.py and rename to is_number by @bobleesj in #301
  • docs: improve docstring based on group standards in diffraction_objects.py transforms.py by @bobleesj in #300
  • fix: Add sbillinge as the designated authorized user for release in build-wheel-release-upload.yml by @bobleesj in #305
  • fix: remove user_config.py by @yucongalicechen in #303
  • docs: add docstrings for on_d, on_q, on_tth, and dump by @yucongalicechen in #307

Full Changelog: 3.5.0...3.6.0rc1

3.6.0rc0

31 Dec 22:49
5daab78
Compare
Choose a tag to compare
3.6.0rc0 Pre-release
Pre-release

What's Changed

  • Add commas in keywords in pyproject.toml by @bobleesj in #142
  • Configure automatic spelling check via codespell within pre-commit by @alisnwu in #152
  • add xtype=d in dump function by @yucongalicechen in #153
  • Add Codecov secret to .github/workflows/tests-on-pr.yml to use Codecov by @bobleesj in #159
  • Added extra information in warning for better capturing of user info by @alisnwu in #149
  • Recut - update release checklist and job names by @bobleesj in #162
  • Move resampler out of parsers, remove relative paths for import by @alisnwu in #164
  • Add conda-forge release checklist to GitHub Issue template by @bobleesj in #166
  • Update release_checklist.md - use fourigui 0.2.0 version by @bobleesj in #168
  • Documentation update by @Sparks29032 in #169
  • Reorganized test files to match src folder structure by @alisnwu in #171
  • Deprecate Diffraction_object, rename to DiffractionObject (new clean PR) by @bobleesj in #172
  • Use pytest for test_loaddata.py by @bobleesj in #179
  • q_to_tth & tth_to_q by @yucongalicechen in #178
  • refactor the transforms out of DiffractionObjects by @sbillinge in #184
  • Remove scattering_objects folder for importing DiffractionObjects by @bobleesj in #189
  • move tests to top level directory by @sbillinge in #190
  • DiffractionObject can now be instantiated directly by @sbillinge in #193
  • Use @property to prevent direct modification of all_arrays by @bobleesj in #196
  • d_to_q, q_to_d by @yucongalicechen in #197
  • test function for get_angle_index by @yucongalicechen in #191
  • test function on_xtype by @yucongalicechen in #192
  • add d_to_tth, tth_to_d by @yucongalicechen in #199
  • Add New release checklist BG standard including python -m build and twine check dist/* by @bobleesj in #203
  • Add copy() method for DiffractionObject by @bobleesj in #204
  • More info on updating global config for users by @alisnwu in #208
  • Check valid x and y array lenghts and xtypes in insert_scattering_quantity by @bobleesj in #209
  • Remove unused test util functions for comparing two dicts, use __eq__ to compare DiffractionObjects by @bobleesj in #214
  • Rename input_scattering_quantity to input_data in DiffractionObject init by @bobleesj in #215
  • Add doc build GitHub CI yml file by @bobleesj in #217
  • Add gettable id property to DiffractionObject by @bobleesj in #216
  • Improve wsinterp docstrings and test function by @bobleesj in #221
    1. Capture no wavelength UserWarning for test_q_to_thh method 2) discuss passing variables to @pytest.mark.parametrize by @bobleesj in #225
  • tests for scale_to by @yucongalicechen in #211
  • Refactor test-on-xtype test function by @bobleesj in #231
  • Remove set_angles_from_list, set_angles_from, set_qs_from_range by @bobleesj in #233
  • add deprecation warning to resample function by @alisnwu in #234
  • Add function for Nyquist-Shannon grid interpolation by @Sparks29032 in #235
  • docs for transformers module by @yucongalicechen in #237
  • Do not allow an empty instance of DiffractionObject - require xarrays yarrays xtype by @bobleesj in #228
  • Refactor test_transfor.py: pass variables to pytest parametrize, use conftest.py for common error messages by @bobleesj in #236
  • updated tools example doc with better get_user_info example by @alisnwu in #242
  • simon tweaks to tools example by @sbillinge in #243
  • Rename doc files and fix typos by @yucongalicechen in #246
  • docs for diffraction objects by @yucongalicechen in #249
  • Simon tweaks to DO examples by @sbillinge in #252
  • fix diffraction objects docs typos by @yucongalicechen in #254
  • Refactor test_scale_to function - continue to establish good practices by @bobleesj in #255
  • Remove 6 pytest warnings with capturing wavelength warnings by @bobleesj in #259
  • Refactor division by zero error test in test_tth_to_d by @bobleesj in #260
  • Catch wavelength=none warnings in DiffractionObject by @bobleesj in #261
  • Fix all remaining divide by zero pytest warnings by @bobleesj in #262
  • Apply prettier to pre-commit for automatic linting of .md .yaml files by @bobleesj in #263
  • Continue refactor test functions, replace UC to C in test_transforms.py by @bobleesj in #266
  • refactor to separate getting info and creating config files by @sbillinge in #264
  • Add class docstring for DiffractionObject by @bobleesj in #265
  • add docs for check_and_build_global_config() by @yucongalicechen in #270
  • Improve test comments under @pytest.mark.parametrize in test_diffraction_objects.py by @bobleesj in #273
  • Improve pytest parametrize comments for test_transform.py by @bobleesj in #275
  • Use compact test comment style for each case under @pytest.mark.parametrize by @bobleesj in #277
  • Apply docformatter in pre-commit for PEP 257 docstring auto format, no manual modifications made by @bobleesj in #272
  • Config updater workflow by @sbillinge in #267
  • Rename id to uuid in DiffractionObject by @bobleesj in #271
  • Fix get_array_index returns int instead of list in DiffractionObject by @bobleesj in #283
  • Add two test cases for init DiffractionObject with empty xarray and yarray values by @bobleesj in #284
  • improve comments for test_scale_to by @yucongalicechen in #280
  • Refactor __add__ operation in DiffractionObject and add tests by @bobleesj in #285
  • feat: Support *, /, - operations between two DiffractionObjects or scalar by @bobleesj in #293
  • feat: muD calculator by @yucongalicechen in #292
  • compute mu by @yucongalicechen in #278
  • add new features in scale_to() so user can run without an x-value by @yucongalicechen in #289
  • fix: compare values and shape of xarray values before applying operations between 2 DiffractionObjects by @bobleesj in #299
  • docs: add examples for operations by @yucongalicechen in #297
  • refactor: separate isfloat into a new file within validators.py and rename to is_number by @bobleesj in #301
  • docs: improve docstring based on group standards in diffraction_objects.py transforms.py by @bobleesj in #300
  • fix: Add sbillinge as the designated authorized user for release in build-wheel-release-upload.yml by @bobleesj in #305
  • fix: remove user_config.py by @yucongalicechen in #303
  • docs: add docstrings for on_d, on_q, on_tth, and dump by @yucongalicechen in #307

Full Changelog: 3.5.0...3.6.0rc0

3.5.0

27 Oct 00:32
9f8269c
Compare
Choose a tag to compare

Added:

  • Support for Python 3.13

Removed:

  • Support for Python 3.10

3.4.3

26 Oct 20:57
5eedb0d
Compare
Choose a tag to compare

Added:

  • Diffraction_objects mentioned in the README

Fixed:

  • Recut to group's package standard, fix installation, add GitHub release workflow
  • setuptools-git-versioning from <2.0 to >= 2.0 in pyproject.toml
  • Two Pytest warnings due to numpy and pytest mocker in test_dump function
  • Add pip dependencies under pip.txt and conda dependencies under conda.txt

3.4.3rc0

26 Oct 11:28
5eedb0d
Compare
Choose a tag to compare
3.4.3rc0 Pre-release
Pre-release

What's Changed

  • Fix contributors typo by @bobleesj in #117
  • added mention of DO's in README by @sbillinge in #116
  • Update setuptools-git-versioning >= 2.0 by @bobleesj in #118
  • Add citation to readme by @bobleesj in #119
  • Add pip packages under pip.txt by @alisnwu in #124
  • Recut - update REAMDE, remove unnecessary files, use GitHub release workflowRecut release by @alisnwu in #127
  • Remove two Pytest warnings due to numpy and pytest mocker in test_dump function by @bobleesj in #112

New Contributors

Full Changelog: 3.4.2...3.4.3rc0

3.4.2rc0

18 Sep 02:22
ce5da20
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 3.4.1...3.4.2rc0