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

Improve daterange selection for changes #11894

Conversation

harriebird
Copy link
Collaborator

Proposed changes

This improves the selection of date ranges for the generation of changes using the DateRangeField.
This solves issue #11846.

Example image:
Screenshot 2024-06-19 at 15-40-35 Changes @ Devel Weblate

Checklist

  • Lint and unit tests pass locally with my changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added documentation to describe my feature.
  • I have squashed my commits into logic units.
  • I have described the changes in the commit messages.

Other information

@nijel nijel added this to the 5.7 milestone Jun 19, 2024
@harriebird harriebird force-pushed the feature/improve-daterange-selection-for-changes branch from 5940167 to 5687112 Compare June 19, 2024 08:35
Copy link

codecov bot commented Jun 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.59%. Comparing base (6aee586) to head (faf1e28).
Report is 2235 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #11894      +/-   ##
==========================================
- Coverage   90.82%   90.59%   -0.23%     
==========================================
  Files         554      577      +23     
  Lines       57306    58827    +1521     
  Branches     9122     9392     +270     
==========================================
+ Hits        52046    53297    +1251     
- Misses       3640     3837     +197     
- Partials     1620     1693      +73     
Files Coverage Δ
weblate/trans/forms.py 88.08% <100.00%> (+0.21%) ⬆️
weblate/trans/tests/test_changes.py 100.00% <100.00%> (ø)
weblate/trans/tests/test_reports.py 100.00% <100.00%> (ø)
weblate/trans/views/changes.py 65.78% <100.00%> (+1.45%) ⬆️

... and 328 files with indirect coverage changes

if form.cleaned_data["period"]:
start_date = form.cleaned_data["period"]["start_date"]
end_date = form.cleaned_data["period"]["end_date"]

Copy link
Member

Choose a reason for hiding this comment

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

Please revert the changes here as well, reports need period to be provided.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Reverted the changes for checking if the form.cleaned_data["period"] is None.

@nijel nijel modified the milestones: 5.7, 5.6.1 Jun 19, 2024
@nijel nijel linked an issue Jun 19, 2024 that may be closed by this pull request
@harriebird harriebird force-pushed the feature/improve-daterange-selection-for-changes branch from 5687112 to faf1e28 Compare June 19, 2024 12:38
@nijel nijel self-assigned this Jun 19, 2024
@nijel nijel enabled auto-merge (squash) June 19, 2024 14:42
@nijel nijel merged commit e0cf8db into WeblateOrg:main Jun 19, 2024
31 checks passed
nijel added a commit that referenced this pull request Jun 19, 2024
@nijel nijel mentioned this pull request Jun 27, 2024
2 tasks
@nijel
Copy link
Member

nijel commented Jun 27, 2024

This introduced regression: #11954

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.

Improved date range selection for changes
2 participants