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

feat: investigate file authenticity#7331

Merged
merged 3 commits into from Apr 23, 2024
Merged

Conversation

rjsparks
Copy link
Member

No description provided.

Copy link

codecov bot commented Apr 16, 2024

Codecov Report

Attention: Patch coverage is 95.45455% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 88.87%. Comparing base (187c2c5) to head (edda864).
Report is 104 commits behind head on main.

❗ Current head edda864 differs from pull request most recent head 46ae41f. Consider uploading reports for the commit 46ae41f to get more accurate results

Files Patch % Lines
ietf/doc/templatetags/ietf_filters.py 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7331      +/-   ##
==========================================
- Coverage   88.98%   88.87%   -0.12%     
==========================================
  Files         291      291              
  Lines       40717    41071     +354     
==========================================
+ Hits        36233    36500     +267     
- Misses       4484     4571      +87     

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

Copy link
Member

@jennifer-richards jennifer-richards left a comment

Choose a reason for hiding this comment

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

A couple minor comments to take or leave

# looking for files with less than 8 characters in the name is not useful
# Requiring this will help protect against the secretariat unintentionally
# matching every draft.
if len(name_fragment) < 8:
Copy link
Member

Choose a reason for hiding this comment

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

If you put min_length=8 on the CharField, it'll validate for you and (I think) catch it client-side with HTML validation

# matching every draft.
if len(name_fragment) < 8:
raise ValidationError("Please enter at least 8 characters")
if any([c in name_fragment for c in disallowed_characters]):
Copy link
Member

Choose a reason for hiding this comment

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

Completely trivial gains here, but if you leave out the [] inside the any(), then this will use generators instead of a list. That'll let the any() short-circuit if it hits a True value.

settings.INTERNET_DRAFT_ARCHIVE_DIR = str(new_archive_dir)
donated_personal_copy_dir = archive_tmp_dir / "donated-personal-copy"
donated_personal_copy_dir.mkdir()
meeting_dir = Path(settings.AGENDA_PATH) / "666"
Copy link
Member

Choose a reason for hiding this comment

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

😈

@rjsparks rjsparks merged commit 6b11291 into ietf-tools:main Apr 23, 2024
7 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants