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

refactor!: tests and fixtures #3

Merged
merged 3 commits into from
Nov 15, 2023
Merged

Conversation

TechyDaniel
Copy link
Contributor

@TechyDaniel TechyDaniel commented Nov 13, 2023

  • Add Mesh protocol, so any mesh class potentially returned by a reader must implement the protocol.
  • Add tests for reading meshes from file.
  • Add pytest fixtures to use re-use mocked data across tests.
  • Refactor get_border_vertices to get_boundary_vertices that taked an array instead of a mesh instance, so it's less greedy.

Description

We now accept edges as input into the get_boundary_vertices.
Those vertices are extracted in a different function which is designed to work regardless of the mesh data structure input.

Task: TECHART-323

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • locally
  • github action

Test Configuration:

  • hatch commands

Checklist

  • I confirm that the changes meet the user experience and goals outlined in the design plan (if there is one).
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have updated any version info, if necessary.
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

- Add tests for get_edges_from_mesh and border vertex extraction.
- Introduce mock_data.py for consistent mock usage.
- Refactor get_border_vertices to take an array instead of a mesh.
@TechyDaniel TechyDaniel marked this pull request as ready for review November 13, 2023 23:00
@TechyDaniel TechyDaniel self-assigned this Nov 14, 2023
Copy link
Collaborator

@Olaf-Wolf3D Olaf-Wolf3D left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's butcher this PR for a learning experience! :D

@Olaf-Wolf3D Olaf-Wolf3D marked this pull request as draft November 14, 2023 17:30
Olaf Haag added 2 commits November 14, 2023 23:13
mesh protocol, test dir structure, fixtures, function name
@Olaf-Wolf3D Olaf-Wolf3D marked this pull request as ready for review November 15, 2023 02:14
@Olaf-Wolf3D Olaf-Wolf3D changed the title feat: add get_edges_from_mesh to extract edges from mesh refactor!: tests and fixtures Nov 15, 2023
@Olaf-Wolf3D Olaf-Wolf3D self-requested a review November 15, 2023 02:19
@TechyDaniel TechyDaniel merged commit 4eb44a4 into main Nov 15, 2023
1 check passed
@TechyDaniel TechyDaniel deleted the feat/identify-border-vertices branch November 15, 2023 10:47
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