Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

feat: extraction of boundary types from various docstrings #111

Conversation

nvollroth
Copy link
Contributor

@nvollroth nvollroth commented Apr 26, 2023

Closes #48, closes #36, closes #35, closes #32, closes #31, closes #30, closes #27, closes #8.

Summary of Changes

SpaCy rules were generated to recognize named examples and extract the resulting boundaries.

Instructions for Manual Testing (if required)

  1. Run pytest for test_extract_boundary_values.py.
  2. Check the results of pytest.

Added some new rules
It is now possible to extract multiple boundaries.
Minimal refactoring was done.

Some test cases were added.
Some test cases were added.
@nvollroth nvollroth requested a review from a team as a code owner April 26, 2023 15:52
@nvollroth nvollroth linked an issue Apr 26, 2023 that may be closed by this pull request
@nvollroth nvollroth changed the title 48 extraction from various docstrings that contain boundary type feat: 48 extraction from various docstrings that contain boundary type Apr 26, 2023
@lars-reimann
Copy link
Member

lars-reimann commented Apr 26, 2023

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 2 0 0 0.85s
✅ PYTHON mypy 2 0 2.25s
✅ PYTHON ruff 2 0 0 0.06s
✅ REPOSITORY git_diff yes no 0.04s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@codecov
Copy link

codecov bot commented Apr 26, 2023

Codecov Report

Merging #111 (0f83db2) into main (10f7928) will increase coverage by 0.31%.
The diff coverage is 95.60%.

@@            Coverage Diff             @@
##             main     #111      +/-   ##
==========================================
+ Coverage   90.08%   90.40%   +0.31%     
==========================================
  Files          82       83       +1     
  Lines        4084     4334     +250     
==========================================
+ Hits         3679     3918     +239     
- Misses        405      416      +11     
Impacted Files Coverage Δ
...nalyzer/processing/api/_extract_boundary_values.py 95.60% <95.60%> (ø)

…rings-that-contain-boundary-type' into 48-extraction-from-various-docstrings-that-contain-boundary-type
@nvollroth
Copy link
Contributor Author

@lars-reimann
I can't solve the MegaLinter ruff problems currently.
The errors are related to my two callback functions, which are defined from spaCy to require these parameters in any case. However, I don't need all parameters or can't omit them.
So I don't know how to solve or work around the problem.

@lars-reimann
Copy link
Member

@nvollroth Add a comment # noqa: ARG001 to the end of the problematic lines. See the ruff docs for more details.

nvollroth and others added 6 commits April 28, 2023 11:36
Return type of the create function is now BoundaryType.

Added one new pattern + test case.

Corrected the error suppression for ruff.
@lars-reimann
Copy link
Member

lars-reimann commented Apr 29, 2023

@nvollroth The lint check passes now.

@lars-reimann lars-reimann changed the title feat: 48 extraction from various docstrings that contain boundary type feat: extraction of boundary types from various docstrings May 4, 2023
@nvollroth
Copy link
Contributor Author

@lars-reimann
All changes have been done and the code is now ready for review.

@lars-reimann lars-reimann merged commit 9ef79da into main May 5, 2023
@lars-reimann lars-reimann deleted the 48-extraction-from-various-docstrings-that-contain-boundary-type branch May 5, 2023 16:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.