Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DispersiveMultiLayer no longer uses MATLAB #286

Merged

Conversation

willGraham01
Copy link
Collaborator

@willGraham01 willGraham01 commented May 9, 2023

Description

  • Detaches the DispersiveMultiLayer class from MATLAB - it is now a struct.
  • Adds infrastructure for adding additional unit test data to the repository without the need to update CI or binaries every time (see Update CI to produce unit test .mat and .hdf5 data #289)
  • Introduces xyz_vector struct which aims to replace XYZVector class that depends on MATLAB
  • Resolves DispersiveMultiLayer in Classes to detach from MATLAB #285
  • Adds unit tests for HDF5Reader::read_dataset_from_group which can now robustly handle "normal" hdf5 files (created via e.g. h5py) and .mat files.
  • create_hdf5_data.py added to repository

The ci.yaml workflow now runs the benchmark/ scripts which produce the unit test data, so there is no need to commit the binaries to the repository.

Testing

  • Adds unit test for HDF5Reader::read_dataset_from_group
  • Adds test for DispersiveMultiLayer is_dispersive() method
  • Adds test for HDF5Reader::read() method when passed a reference to a DispersiveMultiLayer object

Documentation

doc/developers.md updated to include details on how to add/edit/remove unit test data (see #289).

doc/developers.md Outdated Show resolved Hide resolved
doc/developers.md Outdated Show resolved Hide resolved
doc/developers.md Outdated Show resolved Hide resolved
@willGraham01 willGraham01 marked this pull request as ready for review May 10, 2023 12:21
@willGraham01 willGraham01 requested a review from samcunliffe May 10, 2023 13:40
@samcunliffe samcunliffe force-pushed the wgraham-181-less_matlab_more_hdf5 branch from e810276 to f6789ab Compare May 12, 2023 12:27
Base automatically changed from wgraham-181-less_matlab_more_hdf5 to 181-hdf5-io-pairdev May 12, 2023 12:31
willGraham01 and others added 10 commits May 12, 2023 13:39
- xyz_vector struct of 3 vector<double>s introduced
- DispersiveMultiLayer is now a struct with xyz_vector members
- Preserve method for checking if the medium is dispersive
- Temporarily disable unit tests for DispersiveMultiLayer class
- HDF5Reader::read() can now assemble a DispersiveMultiLayer
- HDF5Reader has a method for reading directly into a vector<T>
- H5Dimension can be passed a H5::DataSet as well as a H5::DataSpace
* Move content of benchmark_scripts readme into doc/developers

* Update CI attempt 1

* Actually use the right syntax

* Force python version to prevent MacOS using python2.7

* Rename files to better match the data they produce

* Aplease windows syntax

* Remove pip cache due to known windows bug: actions/setup-python#436
@samcunliffe samcunliffe force-pushed the wgraham-DispersiveMultiLayer-no-matlab branch from 821f1ab to d4d0cfd Compare May 12, 2023 12:40
@samcunliffe samcunliffe merged commit 05ef9fc into 181-hdf5-io-pairdev May 12, 2023
@samcunliffe samcunliffe deleted the wgraham-DispersiveMultiLayer-no-matlab branch May 12, 2023 12:43
willGraham01 added a commit that referenced this pull request May 19, 2023
* Rework DispersiveMultiLayer class into a struct. TDMS builds.

- xyz_vector struct of 3 vector<double>s introduced
- DispersiveMultiLayer is now a struct with xyz_vector members
- Preserve method for checking if the medium is dispersive
- Temporarily disable unit tests for DispersiveMultiLayer class
- HDF5Reader::read() can now assemble a DispersiveMultiLayer
- HDF5Reader has a method for reading directly into a vector<T>
- H5Dimension can be passed a H5::DataSet as well as a H5::DataSpace

* Update paths now we need HDF5 data as well as matlab data

* TDMS builds and tests HDF5Reader::read_data_from_group (passes, no)

* Fix seg-fault in read_dataset_from_group

* Add DispersiveMultiLayer test

* Update DispersiveMultiLayer tests to not be entangled with the MATLAB jargon

* Update the CI so things actually work

* Move content of benchmark_scripts readme into doc/developers

* Update CI to produce unit test `.mat` and `.hdf5` data (#289)

* Move content of benchmark_scripts readme into doc/developers

* Update CI attempt 1

* Actually use the right syntax

* Force python version to prevent MacOS using python2.7

* Rename files to better match the data they produce

* Aplease windows syntax

* Remove pip cache due to known windows bug: actions/setup-python#436

* Apply suggestions from code review
samcunliffe pushed a commit that referenced this pull request May 26, 2023
* Rework DispersiveMultiLayer class into a struct. TDMS builds.

- xyz_vector struct of 3 vector<double>s introduced
- DispersiveMultiLayer is now a struct with xyz_vector members
- Preserve method for checking if the medium is dispersive
- Temporarily disable unit tests for DispersiveMultiLayer class
- HDF5Reader::read() can now assemble a DispersiveMultiLayer
- HDF5Reader has a method for reading directly into a vector<T>
- H5Dimension can be passed a H5::DataSet as well as a H5::DataSpace

* Update paths now we need HDF5 data as well as matlab data

* TDMS builds and tests HDF5Reader::read_data_from_group (passes, no)

* Fix seg-fault in read_dataset_from_group

* Add DispersiveMultiLayer test

* Update DispersiveMultiLayer tests to not be entangled with the MATLAB jargon

* Update the CI so things actually work

* Move content of benchmark_scripts readme into doc/developers

* Update CI to produce unit test `.mat` and `.hdf5` data (#289)

* Move content of benchmark_scripts readme into doc/developers

* Update CI attempt 1

* Actually use the right syntax

* Force python version to prevent MacOS using python2.7

* Rename files to better match the data they produce

* Aplease windows syntax

* Remove pip cache due to known windows bug: actions/setup-python#436

* Apply suggestions from code review
willGraham01 added a commit that referenced this pull request Jun 1, 2023
* Rework DispersiveMultiLayer class into a struct. TDMS builds.

- xyz_vector struct of 3 vector<double>s introduced
- DispersiveMultiLayer is now a struct with xyz_vector members
- Preserve method for checking if the medium is dispersive
- Temporarily disable unit tests for DispersiveMultiLayer class
- HDF5Reader::read() can now assemble a DispersiveMultiLayer
- HDF5Reader has a method for reading directly into a vector<T>
- H5Dimension can be passed a H5::DataSet as well as a H5::DataSpace

* Update paths now we need HDF5 data as well as matlab data

* TDMS builds and tests HDF5Reader::read_data_from_group (passes, no)

* Fix seg-fault in read_dataset_from_group

* Add DispersiveMultiLayer test

* Update DispersiveMultiLayer tests to not be entangled with the MATLAB jargon

* Update the CI so things actually work

* Move content of benchmark_scripts readme into doc/developers

* Update CI to produce unit test `.mat` and `.hdf5` data (#289)

* Move content of benchmark_scripts readme into doc/developers

* Update CI attempt 1

* Actually use the right syntax

* Force python version to prevent MacOS using python2.7

* Rename files to better match the data they produce

* Aplease windows syntax

* Remove pip cache due to known windows bug: actions/setup-python#436

* Apply suggestions from code review
willGraham01 added a commit that referenced this pull request Jun 1, 2023
* `DispersiveMultiLayer` no longer uses MATLAB (#286)

* Rework DispersiveMultiLayer class into a struct. TDMS builds.

- xyz_vector struct of 3 vector<double>s introduced
- DispersiveMultiLayer is now a struct with xyz_vector members
- Preserve method for checking if the medium is dispersive
- Temporarily disable unit tests for DispersiveMultiLayer class
- HDF5Reader::read() can now assemble a DispersiveMultiLayer
- HDF5Reader has a method for reading directly into a vector<T>
- H5Dimension can be passed a H5::DataSet as well as a H5::DataSpace

* Update paths now we need HDF5 data as well as matlab data

* TDMS builds and tests HDF5Reader::read_data_from_group (passes, no)

* Fix seg-fault in read_dataset_from_group

* Add DispersiveMultiLayer test

* Update DispersiveMultiLayer tests to not be entangled with the MATLAB jargon

* Update the CI so things actually work

* Move content of benchmark_scripts readme into doc/developers

* Update CI to produce unit test `.mat` and `.hdf5` data (#289)

* Move content of benchmark_scripts readme into doc/developers

* Update CI attempt 1

* Actually use the right syntax

* Force python version to prevent MacOS using python2.7

* Rename files to better match the data they produce

* Aplease windows syntax

* Remove pip cache due to known windows bug: actions/setup-python#436

* Apply suggestions from code review

* Add line that was lost in rebase

---------

Co-authored-by: willGraham01 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants