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

Update CI to produce unit test .mat and .hdf5 data #289

Conversation

willGraham01
Copy link
Collaborator

@willGraham01 willGraham01 commented May 10, 2023

With #285 requiring us to detach MATLAB from a number of classes, we will require both .mat and .hdf5 test data for the C++ unit tests.

Rather than committing the binaries to the repository and having to update these each time a new class is detached from MATLAB, we can instead produce the data files via MATLAB and Python scripts, and run these on CI to produce the data. Any data that needs to be edited/added can then done through the scripts that produce the data, allowing us to track changes explicitly in the codebase.

Key Changes:

  • ci.yaml workflow now uses setup-python to produce the .hdf5 data that we need for the unit tests
  • doc/developers.md explains the benchmark_scripts/ folder
  • Renamed the data-producing scripts to match the names of the data files they produce

@willGraham01 willGraham01 changed the title Wgraham 181 produce hdf5 test data too [IGNORE ME] Checking MacOS CI doesn't break with hdf5 updates May 10, 2023
@willGraham01 willGraham01 changed the title [IGNORE ME] Checking MacOS CI doesn't break with hdf5 updates Update CI to produce unit test .mat and .hdf5 data May 10, 2023
@willGraham01 willGraham01 marked this pull request as ready for review May 10, 2023 10:44
@willGraham01 willGraham01 merged commit f17bcc8 into wgraham-DispersiveMultiLayer-no-matlab May 10, 2023
@willGraham01 willGraham01 deleted the wgraham-181-produce_hdf5_test_data_too branch May 10, 2023 11:25
samcunliffe pushed a commit that referenced this pull request May 12, 2023
* 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 pushed a commit that referenced this pull request May 12, 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 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.

1 participant