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 cleaning regex to match RUTs with non-numeric digits #716

Conversation

svillegas-cdd
Copy link
Contributor

@svillegas-cdd svillegas-cdd commented Oct 1, 2024

  • The regular expression in get_subject_rut_from_certificate_pfx caused the removal of all letters, including the letter K, from the RUTs.
  • It has been updated to a regex that includes the letter K in certain RUTs.
  • Added tests for RUTs that end with a K.
  • Added a guide named howto.md, which explains how to create a valid .der certificate. Based on the guide in FD-CL-Data See.

Ref: #700
Ref: https://app.shortcut.com/cordada/story/9821

@svillegas-cdd svillegas-cdd added bug Something isn't working component: sii_crypto crypto particular to the SII (unlike 'crypto') labels Oct 1, 2024
@svillegas-cdd svillegas-cdd self-assigned this Oct 1, 2024
@svillegas-cdd svillegas-cdd requested a review from a team as a code owner October 1, 2024 20:21
Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.61%. Comparing base (b39402e) to head (421aca7).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #716      +/-   ##
===========================================
+ Coverage    87.60%   87.61%   +0.01%     
===========================================
  Files           38       38              
  Lines         3130     3134       +4     
  Branches       385      386       +1     
===========================================
+ Hits          2742     2746       +4     
  Misses         246      246              
  Partials       142      142              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@svillegas-cdd svillegas-cdd force-pushed the task/sc-9821-lib-cl-sii-python-rut-cleaning-regex-breaks branch 5 times, most recently from d196489 to cae80d0 Compare October 1, 2024 21:01
@jtrobles-cdd jtrobles-cdd changed the title fix: update cleaning regex to match RUTs with non-numeric digits Update cleaning regex to match RUTs with non-numeric digits Oct 2, 2024
@fpinto-cdd
Copy link
Contributor

@svillegas-cdd The link to the file howto.md in the commit is broken

@jtrobles-cdd
Copy link
Member

@svillegas-cdd The link to the file howto.md in the commit is broken

Yes, it's preferrable not to break URLs into multiple lines.

@svillegas-cdd svillegas-cdd force-pushed the task/sc-9821-lib-cl-sii-python-rut-cleaning-regex-breaks branch 2 times, most recently from 8f5d0c8 to 54303c0 Compare October 2, 2024 13:06
@svillegas-cdd svillegas-cdd force-pushed the task/sc-9821-lib-cl-sii-python-rut-cleaning-regex-breaks branch 2 times, most recently from 2eb9a88 to 421aca7 Compare October 2, 2024 13:56
Copy link

sonarcloud bot commented Oct 2, 2024

- The regular expression in `get_subject_rut_from_certificate_pfx` caused the removal of all letters,
including the letter K, from the RUTs.
- It has been updated to a regex that includes the letter K in certain RUTs.
- Added tests for RUTs that end with a `K`.
- Added a guide named `howto.md`, which explains how to create a valid `.der` certificate.
  Based on the guide in `FD-CL-Data`
  [See](https://github.com/cordada/fd-cl-data/blob/ba85835e81c857acbcc0498751c21335591b17b5/test_data/apps/sii_auth/certificate_pfx/howto.md).

Ref: #700
Ref: https://app.shortcut.com/cordada/story/9821
@svillegas-cdd svillegas-cdd merged commit 878562e into develop Oct 2, 2024
21 checks passed
@svillegas-cdd svillegas-cdd deleted the task/sc-9821-lib-cl-sii-python-rut-cleaning-regex-breaks branch October 2, 2024 13:59
@svillegas-cdd svillegas-cdd mentioned this pull request Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component: sii_crypto crypto particular to the SII (unlike 'crypto')
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants