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

2024 update #71

Merged
merged 127 commits into from
Apr 29, 2024
Merged

2024 update #71

merged 127 commits into from
Apr 29, 2024

Conversation

Leguark
Copy link
Collaborator

@Leguark Leguark commented Apr 29, 2024

No description provided.

Extends support for different file formats to include 'json' and 'xlsx' in the 'ReaderFilesHelper' class and refined the '_get_reader' function in 'well_files_reader.py' to handle these new file types. If an unsupported file type is passed, an informative error message is now raised. The purpose of these changes is to enhance compatibility with diverse types of datasets, and provide proper error messages making it easier for other developers to figure out what went wrong. Moreover, requirements have been updated with new dependencies.
The old seismic test module was removed and replaced with a new simplified test module. Additional requirement checks have been added for optional packages 'segyio' and 'pyvista', raising a descriptive error if they are not installed. Also, the 'fault_sticks' tests have been renamed for consistency.
Updated the RequirementsLevel enum in conftest.py to better handle different requirement levels. Also, adjusted a condition and uncommented imports in test_io_wells.py.
…irements

Revised the visualization/to_pyvista.py and some test codes for cleaner and more efficient implementation. Enhanced the RequirementLevel in tests/conftest.py to use enum.Flag for better bitwise operations. Added 'openpyxl' into the requirements for wells.
Refactored reader modules by prefixing them with an underscore to suggest internal use. Included dotenv setup in main subsurface init file to facilitate path setup for testing. Additionally, several tests and supporting modules were updated to comply with these changes.
Test skipping conditions for well readings have been updated in the code. These changes will enable the test for wells to be run depending on the value of the "READ_WELL" variable, adding more flexibility and control over what tests should be run. This modification has been implemented in both the test_read_wells_from_las.py and conftest.py files.
Reformatted the code to adhere to PEP8 coding style standards. This includes changes in function parameters organization, spacing, and indentations, which resulted in enhanced readability. This change has not added or removed any existing functionality.
[BUG] Fixed an issue capturind screenshots of 3D plots
Streamlined the code for managing profiles in the geospatial application. Removed unnecessary parameters from function calls and rearranged several functions for better clarity and efficiency. Added proper initialisation and setter for point_attributes in UnstructuredData class. Also, updated the requirements and test files to reflect the changes.
In the test_read_topography.py file, pytest.mark.skipif conditions have been added to the test_read_topography_from_dxf and test_read_topography_from_tif tests to specify requirement levels. Tests won't run if the necessary conditions are not met.
…V formats

This commit implements new tests for mesh reading and accommodates the CSV format in mesh surface reader. The test's directory is fixed and a condition for the execution of these tests is added. It changes file extension checks in the surface reader to use SupportedFormats enum, enhancing CSV format handling. A requirement level related to mesh reading is modified in the testing configuration.
Updated the read_volumetric_mesh_coord_file function in read_volume.py for cleaner and more readable code. Additionally, modified the path in test_read_volume.py. Adjusted "error_bad_lines" to "on_bad_lines" in test cases. Added a condition to skip tests without 'READ_MESH' requirement.
Reworked the test_segy_reader.py test module introducing a skip condition based on a new defined requirements level, READ_VOLUME. Moved 'segyio' into a new requirements file: requirements_volume.txt. Updated the setup.py to reflect changes in requirements. Organized the handling of package 'segyio' usage in segy_reader.py.
Refactored segy_reader's `create_mesh_from_coords` to only accept dictionary coordinates and utilize `optional_requirements` for importing scipy. Modified tests in test_segy_reader to use `optional_requirements` for importing pyvista and imageio. Updated various requirements.txt files to reflect new dependency configurations.
Updated import logic to allow optional dependencies in test modules. Also, added the `require_pandas` function in `optional_requirements.py` for checking pandas' availability. Removed `test_read_vtk.py` as it was no longer needed and added `omfvista` to `requirements_mesh.txt`. Tests now check import conditions and skip where necessary based on availability of optional packages.
…ters

Adjusted test cases for more efficient visualization in test_read_OMF_to_well.py. A condition for plotting data was introduced to prevent the opening of unnecessary viewers. Further, a change was made from 3D to 2D in the pv_plot function for better readability and improved the test efficiency.
…ttribute updates

Updated 'to_pyvista.py' to correct a misused method name for updating mesh data attributes. In 'seismic.py', adjusted package imports and usage to be more efficient and limit package scope. This includes using 'require' methods to import specific packages as needed. Also standardized usage of 'plot' flags in tests and corrected a parameter in 'test_read_OMF.py'.
Removed obsolete seismic test, implemented new requirements architecture, and adjusted relevant tests. The requirements have been recomposed in a more manageable way. The seismic test was redundant and needed to be removed for overall code hygiene. Additionally, several tests were updated to match changes in requirements.
Paths to requirement files were updated in setup.py to reflect changes in the file structure. Specifically, 'opt', 'dev', and 'all' now correspond to requirements_opt.txt, requirements_dev.txt, and requirements_all.txt respectively.
The commit removes an unused python version and the deployment step from the Github workflow. In addition, the dependencies installation process has been simplified to reduce complexity.
# Conflicts:
#	subsurface/reader/wells/DEP/_welly_reader.py
#	subsurface/reader/wells/DEP/test_wells/test_welly_to_subsurface.py
The Python version used in the workflow has been updated from 3.8 to 3.10. This change will allow the software to align more with the latest available Python version supporting more features and enhancements.
@Leguark Leguark changed the title 2024 updata 2024 update Apr 29, 2024
The Python version used in the workflow has been updated from 3.8 to 3.10. This change will allow the software to align more with the latest available Python version supporting more features and enhancements.
@Leguark
Copy link
Collaborator Author

Leguark commented Apr 29, 2024

github actions needs some love before we can run them again. All tests are passing on a fresh environment locally. Definitely not worst that before this patch

@Leguark Leguark merged commit f57ef07 into softwareunderground:main Apr 29, 2024
1 check failed
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