Skip to content

fix marktype specific for impression or striation#212

Merged
laurensWe merged 11 commits intomainfrom
split-marktype
Mar 31, 2026
Merged

fix marktype specific for impression or striation#212
laurensWe merged 11 commits intomainfrom
split-marktype

Conversation

@Raytesnel
Copy link
Copy Markdown
Collaborator

Splits up MarkType into specific MarkStriation and MarkImpression so the endpoint schema gives the correct marktypes to choose from. (when #177 ) is merged a dropdown list is also available to choose from. which helps that the user can only select the correct types.

( also in code alot of if marktype== is used what now is not needed anymore.

This is a Draft because this is only a first draft that splits up the marks. alot of code need to be changed for embracing this split.

@Raytesnel Raytesnel self-assigned this Mar 30, 2026
@laurensWe laurensWe marked this pull request as ready for review March 30, 2026 09:37
@laurensWe laurensWe self-requested a review March 30, 2026 12:41
@SimoneAriens SimoneAriens self-requested a review March 30, 2026 13:24
Comment thread packages/scratch-core/src/conversion/plots/utils.py Outdated
Comment thread packages/scratch-core/src/conversion/plots/utils.py Outdated
Comment thread packages/scratch-core/src/conversion/plots/utils.py Outdated
Comment thread packages/scratch-core/src/conversion/data_formats.py Outdated
Comment thread scripts/matlab_utils.py Outdated
Copy link
Copy Markdown
Collaborator

@SimoneAriens SimoneAriens left a comment

Choose a reason for hiding this comment

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

please change MarkStriation | MarkImpression to MarkType wherever possible

Comment thread packages/scratch-core/src/conversion/export/mark.py Outdated
@github-actions
Copy link
Copy Markdown

Diff Coverage

Diff: origin/main..HEAD, staged and unstaged changes

  • packages/scratch-core/src/conversion/data_formats.py (100%)
  • packages/scratch-core/src/conversion/export/mark.py (92.3%): Missing lines 33
  • packages/scratch-core/src/conversion/plots/utils.py (100%)
  • packages/scratch-core/src/conversion/preprocess_impression/center.py (100%)
  • packages/scratch-core/src/conversion/surface_comparison/models.py (100%)
  • src/preprocessors/controller.py (100%)
  • src/preprocessors/schemas.py (100%)

Summary

  • Total: 33 lines
  • Missing: 1 line
  • Coverage: 96%

packages/scratch-core/src/conversion/export/mark.py

Lines 29-37

  29 
  30 
  31 def _parse_mark_type(value: Any) -> MarkType:
  32     if isinstance(value, (MarkImpressionType, MarkStriationType)):
! 33         return value
  34     s = str(value)
  35     for enum_type in (MarkImpressionType, MarkStriationType):
  36         if s in enum_type:
  37             return enum_type(s)

@github-actions
Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Health
. 96% 92%
computations 85% 50%
container_models 99% 100%
conversion 96% 89%
conversion.export 99% 93%
conversion.filter 97% 89%
conversion.leveling 100% 100%
conversion.leveling.solver 100% 75%
conversion.plots 99% 88%
conversion.preprocess_impression 99% 91%
conversion.preprocess_striation 90% 62%
conversion.profile_correlator 96% 82%
conversion.surface_comparison 99% 89%
conversion.surface_comparison.cell_registration 100% 90%
extractors 97% 75%
mutations 100% 100%
parsers 97% 50%
parsers.patches 89% 60%
preprocessors 99% 100%
processors 100% 83%
renders 99% 50%
utils 71% 100%
Summary 98% (3260 / 3332) 87% (340 / 392)

Minimum allowed line rate is 50%

@laurensWe laurensWe merged commit 5c1dd3d into main Mar 31, 2026
4 checks passed
@laurensWe laurensWe deleted the split-marktype branch March 31, 2026 11:53
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.

3 participants