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

♻️ Remove full_title need field and only trim generated titles #1407

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

chrisjsewell
Copy link
Member

@chrisjsewell chrisjsewell commented Feb 19, 2025

In the documentation for needs_max_title_length, it states:

This option is used in conjunction with auto-generated titles as controlled by needs_title_from_content

However, this was not the case; it was being trimmed for all titles, irrespective of if they were auto-generated.

Trimming is now only applied to auto-generated titles (and the untrimmed title is still used for ID generation),

The existence of both title and full_title is confusing and unnecessary (in most cases these are equal), and so full_title is removed.

In the documentation for `needs_max_title_length`, it states:

> This option is used in conjunction with auto-generated titles as controlled by `needs_title_from_content`

However, this was not the case; it was being trimmed for all titles, irrespective of if they were auto-generated.

Trimming is now only applied to auto-generated titles (an the untrimmed title is still used for ID generation),

The existence of both `title` and `full_title` is confusing and unnecessary and so `full_title` is removed.
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

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

Project coverage is 88.23%. Comparing base (4e10030) to head (b3f36c6).
Report is 114 commits behind head on master.

Files with missing lines Patch % Lines
sphinx_needs/api/need.py 0.00% 1 Missing ⚠️
sphinx_needs/directives/need.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1407      +/-   ##
==========================================
+ Coverage   86.87%   88.23%   +1.35%     
==========================================
  Files          56       60       +4     
  Lines        6532     7148     +616     
==========================================
+ Hits         5675     6307     +632     
+ Misses        857      841      -16     
Flag Coverage Δ
pytests 88.23% <84.61%> (+1.35%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@danwos
Copy link
Member

danwos commented Feb 19, 2025

Makes sense. Thanks for the implementation.

@chrisjsewell chrisjsewell merged commit 8144221 into master Feb 19, 2025
18 checks passed
@chrisjsewell chrisjsewell deleted the remove-full-title branch February 19, 2025 07:52
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