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

Sync upstream with no conflict #185

Merged

Conversation

it-tma-tri
Copy link
Contributor

@it-tma-tri it-tma-tri commented Aug 16, 2024

Description Commit Hash
Show updated proposal title in tab title in CfP wizard bed88e66c658c19da949cefcbe51aebd60042c24
Use stable sort for unique UUIDs cbf2fe47967e9dba69fae77d88e6e39114b5d178
Fix review deletion 4d391b9891abc86ccf9391911d5c97fab30525cb
Fall back on list if text grid is broken dc59115c3300db7e53688a2056d0c08aabce8d24
Add missing migration dependency on submission.0061_cfp_settings for event.0034_fix_language codes 88a83bc8a42a3cec7b62c8875ae5c282887d5efc
Document email settings application a3a7c77da17177690f69b0e2eb44527ee71760b8
Fix title anonymisation logic 8d2f1d6575571db593d605fed5791d62d38ca145
Debug missing resources 048aad2bafad4702a96811ceb32bb1a9a5762c95
Code style f2270fde57759a5f8374298245d8dc8c4c4fa068
Hide content locale in anonymisation form ad8ad9ac6e451a3e5de4bbc740aa6437f4385b12
Fix breaking tests e0b0acbea57239adcc4eb1e379bc395db28c742e
Code style c67bcdc84d080b9946601fc19794aa90adbed821
Bump getong/mariadb-action from 1.1 to 1.11 e3140a7b69ddac6a1ca7ce2160e68a650f6fea4e
Bump pug from 3.0.2 to 3.0.3 f1d4d4072ad9528a3e209ed487102aed7015c185
Bump braces from 3.0.2 to 3.0.3 b8b20e681e91a9b7ad38252eaca0cd281bcefff9
Improve migrations check 2f3509c6ddc263c2bd492bf02534e4c53bfd90fa
Be safer around event retrieval bc6548b757b5e84dd501111b1c31e1ba097c2bd2
Make sure celery tasks have names 9cc7158e7a878898294597590b64bc1daf0b4fb6
Simplify statements 3c868f08b73026f47f463c584b02250c86a38c7e
Ignore most celery results b833cf9ef3effe286c5f58a1dd513baff7295a88
Remove unzipped html export after generation 1da8731b3b6cb2eab5e983af5bb7158d83461ef0
Make sure HTML export works with custom domains 295b540b6e45a2eac69eaddd46c61a5f4937cd4d
Fix broken schedule export test 84a4e2ed971a9a26922b0dba2b869dc63fb12cb9
Misc code style 51511f66a1915209de2dbb3fd10c1661f2f9b34f
Better context manager use 7ba10db4d52f13f331c71171038385862e9d5d83
Use timeout for update checks 5e2c0696f0137edebf2f9f9dee7985a5afcfed51
[docs] Stop using intersphinx eb3573a2f8412af84cb3e45a5ab83c039655f22d
Update translation percentages 56cac9972629ea3d217e07457c380a9a0c1cbb1d
[doc] Always use stable Django docs 6e19b25db1a96f67dede6c233dc455543164fd1c
[doc] Update translation widget URL 0fcd1bd95e9abeed8417c1fb40b55e2975cf2505
Add Jorian's name to spellcheck list a94f3f0d2ff06958414abff2e7c24a13b66946ad
Fix positioning of email placeholder column bbb27ad4d579e9984fd6dd996270431acb3c0674
Fix email form button label text 3f7bae308e03d49ba035c5638664780c105b31d8
Fix display of schedule widget in docs a3b4c4f2d3b4787d5c1bd6751de6198ec8e2a2a4

Summary by Sourcery

Sync the upstream repository with various improvements, including a new feature for dynamic tab title updates in the CfP wizard, multiple bug fixes, enhancements to task handling and HTML export, and updates to translations and documentation. Additionally, update the build configuration and improve test coverage.

New Features:

  • Introduce a JavaScript feature to dynamically update the proposal title in the tab title during the CfP wizard process.

Bug Fixes:

  • Fix the logic for title anonymisation in the review form to correctly display anonymised titles.
  • Correct the positioning of the email placeholder column and the label text for the email form button.
  • Resolve issues with the display of the schedule widget in the documentation.

Enhancements:

  • Improve the handling of Celery tasks by adding names and ignoring results where appropriate.
  • Enhance the HTML export functionality to work with custom domains and improve error handling during export.
  • Refactor code to use more efficient and safer practices, such as using stable sorting for UUIDs and simplifying conditional statements.
  • Update translation percentages for multiple languages, including Czech and Chinese.
  • Improve the migrations check to ensure no outstanding migrations are present.

Build:

  • Bump the version of getong/mariadb-action from 1.1 to 1.11 in the GitHub Actions workflow.

Documentation:

  • Document the application of email settings.
  • Remove the use of intersphinx in the documentation configuration.

Tests:

  • Fix broken tests related to schedule export and improve test coverage for various functionalities.
  • Refactor tests to use more concise syntax and improve readability.

Chores:

  • Update the spellcheck list to include Jorian's name.
  • Apply miscellaneous code style improvements across the codebase.

SkylerBurger and others added 30 commits August 16, 2024 11:32
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Copy link

sourcery-ai bot commented Aug 16, 2024

Reviewer's Guide by Sourcery

This pull request contains a variety of changes across multiple files, including bug fixes, performance improvements, code style enhancements, and feature additions. Key changes include:

  1. Improvements to HTML schedule export functionality
  2. Updates to task handling and Celery integration
  3. Enhancements to the review process and anonymization
  4. Various code optimizations and refactoring
  5. UI improvements in the CFP (Call for Papers) wizard
  6. Updates to translation percentages and language handling
  7. Security enhancements and error handling improvements

File-Level Changes

Files Changes
src/pretalx/event/services.py
src/pretalx/orga/views/event.py
src/pretalx/schedule/models/schedule.py
src/pretalx/mail/models.py
src/pretalx/common/management/commands/regenerate_css.py
Added ignore_result=True to various Celery task calls to improve performance and reduce unnecessary result storage
src/pretalx/agenda/management/commands/export_schedule_html.py Improved HTML schedule export functionality, including better handling of custom domains and zip file creation
src/pretalx/orga/templates/orga/submission/review.html Enhanced review process by fixing anonymization logic and improving the display of submission details
src/pretalx/static/cfp/js/proposalTabTitles.js
src/pretalx/cfp/templates/cfp/event/submission_step.html
Added a new JavaScript file to update the proposal tab title dynamically in the CFP wizard
src/pretalx/settings.py Updated translation percentages for various languages
src/pretalx/common/middleware/domains.py
src/tests/services/test_models.py
Improved error handling and security in various parts of the application
src/pretalx/common/forms/fields.py
src/pretalx/agenda/views/schedule.py
src/pretalx/common/mixins/views.py
Refactored and optimized code in multiple files to improve readability and performance
.github/workflows/tests.yml Updated dependencies, including bumping mariadb-action from 1.1 to 1.11

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @it-tma-tri - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟡 Testing: 1 issue found
  • 🟡 Complexity: 1 issue found
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@@ -24,7 +24,7 @@ def __init__(self, *args, **kwargs):
kwargs["locales"] = getattr(self.event, "locales", [])
super().__init__(*args, **kwargs)

def _construct_form(self, i, **kwargs):
def _construct_form(self, *args, **kwargs):
Copy link

Choose a reason for hiding this comment

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

suggestion (performance): Potential performance improvement in form handling

By changing the method signature to use *args, you've made the method more flexible and potentially more efficient, especially when handling a large number of forms.

@@ -386,7 +386,7 @@ def test_schedule_export_schedule_html_task(mocker, event, slot):
call_command,
)
Copy link

Choose a reason for hiding this comment

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

suggestion (testing): Update assertion for ignore_result parameter

The test for the orga trigger export has been updated to include ignore_result=True. Consider adding an assertion to verify that this parameter is being passed correctly in the apply_async call.

Suggested change
)
call_command,
)
assert 'ignore_result' in export_schedule_html.apply_async.call_args[1]
assert export_schedule_html.apply_async.call_args[1]['ignore_result'] is True

],
}
try:
response = requests.post(
"https://pretalx.com/.update_check/",
json=check_payload,
timeout=30,
Copy link

Choose a reason for hiding this comment

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

issue (complexity): Consider reviewing the introduction of new parameters.

The recent changes to the code are well-considered and do not significantly increase complexity. The addition of the name parameter in the task decorator adds specificity, which can be useful if the task name is referenced elsewhere. Including a timeout in the requests.post call is a good practice to prevent indefinite hanging, though it introduces an additional parameter to manage. The change from p to plugin in the list comprehension enhances readability, making the code more self-explanatory. Lastly, the ignore_result=True parameter simplifies task result handling when the result is not needed, though it introduces a new concept to understand. Overall, these changes improve the code's robustness and clarity.

@mariobehling
Copy link
Member

Tests are failing and NameError: name 'HttpRequest' is not defined

@odkhang
Copy link
Collaborator

odkhang commented Aug 27, 2024

Hi @mariobehling, conflict solved and tests passed as well

@mariobehling mariobehling merged commit 3beda5e into fossasia:development Aug 27, 2024
10 of 11 checks passed
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.

7 participants