Skip to content

Release 0.181.0#2942

Closed
odlbot wants to merge 13 commits into
releasefrom
release-candidate
Closed

Release 0.181.0#2942
odlbot wants to merge 13 commits into
releasefrom
release-candidate

Conversation

@odlbot
Copy link
Copy Markdown
Contributor

@odlbot odlbot commented Mar 19, 2026

pt2302

renovate[bot]

Umar Hassan

renovate Bot and others added 13 commits March 15, 2026 02:12
…ty] (#2752)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* feat: added django-removals and check for deprecation warnings and failure

update: upgraded Django version to 5.2

feat: added django-removals in installed apps list

chore: removed deprecated logout url

chore: updated storage handling

chore: addressed feedback from copilot

chore: fixed logout issue

chore: fixed logout button style and redirect issue

chore: fixed logout button style and redirect issue

chore: addressed feedback from copilot

Upgrade to Django 5.2.12 (#2931)

* Upgrade to Django 5.2.12

* Update settings test

* Update Header to match Django 5 CSRF requirement

* Always include CSRF cookie

chore: removed redundant change

chore: updated uv lock file

chore: removed duplicate changeset

* Revert: removed css for logout button
* chore(deps): lock file maintenance

* chore: fixed type check

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Umar Hassan <umar.hassan8@gmail.com>
* Verify Google Drive are credentials are present and fix errors in management command

* Improve error message by flatenning ID lists
…nt (#2940)

* Add documentation on cloning data from production for local development

* Fix typo and clarify running in Django shell

* Incorporate suggestion to compress database before copying

* Add clarifying comment about switching to production context
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request prepares for the release of version 0.181.0, bringing a suite of updates focused on enhancing developer experience, improving system stability through dependency upgrades, and introducing tools for better code quality. It includes critical documentation for local development setup and ensures the project remains current with its underlying technologies.

Highlights

  • Dependency Updates: Numerous Python and JavaScript dependencies have been updated to their latest versions, including mathjax, boto3, sentry-sdk, social-auth-app-django, and pytest-env, ensuring the project uses up-to-date and secure libraries.
  • New Feature: Deprecation Checking: The django-removals package has been integrated to facilitate checking for deprecations within the Django application, improving code maintainability and future compatibility.
  • Improved Local Development Documentation: New documentation has been added to guide developers on how to clone production data for local development, streamlining the setup process for new environments.
  • Test Refinements: Test cases for Hugo Markdown file serialization were refactored to use temporary paths and override settings, enhancing test isolation and reliability.
  • Version Increment: The project version has been updated to 0.181.0, reflecting the collection of new features, bug fixes, and dependency upgrades included in this release.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/ci.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@odlbot odlbot temporarily deployed to ocw-studio-rc March 19, 2026 20:56 Inactive
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the OCW Studio to release version 0.181.0, which includes documentation for cloning production data for local development, verification of Google Drive credentials, and various dependency updates. The review focuses on identifying potential issues and improvement opportunities, particularly in the areas of code correctness and maintainability, with some comments enhanced to reference established repository rules for modern testing practices.

I am having trouble creating individual review comments. Click here to see my feedback.

content_sync/serializers_test.py (112)

medium

The settings fixture is being replaced with tmp_path. It's better to explicitly pass the fixtures that a test needs as arguments, rather than relying on implicit access via settings. This makes the test more readable and maintainable.

def test_hugo_file_serialize(tmp_path, markdown, exp_sections):
References
  1. When adding new tests to a file containing a mix of unittest.TestCase and pytest styles, prefer the modern pytest-style (fixtures, standalone functions) as it is more consistent with the rest of the codebase. Explicitly passing fixtures aligns with modern pytest-style.

content_sync/serializers_test.py (114)

medium

The mock_aws decorator is being removed and settings.OCW_STUDIO_USE_S3 = True is being replaced with override_settings(MEDIA_ROOT=str(tmp_path)). It's better to use override_settings to mock settings within a specific context, as it ensures that the setting is properly reset after the test, preventing unintended side effects on other tests.

    with override_settings(MEDIA_ROOT=str(tmp_path)):
References
  1. When adding new tests to a file containing a mix of unittest.TestCase and pytest styles, prefer the modern pytest-style (fixtures, standalone functions) as it is more consistent with the rest of the codebase. Using override_settings for context-specific mocking aligns with robust, modern testing practices.

gdrive_sync/management/commands/create_missing_gdrive_folders.py (46-52)

medium

The conditional check if settings.DRIVE_SHARED_ID and settings.DRIVE_SERVICE_ACCOUNT_CREDS: is being changed to if not settings.DRIVE_SHARED_ID or not settings.DRIVE_SERVICE_ACCOUNT_CREDS:. It's better to check for the inverse condition to raise the CommandError early, making the code more readable and easier to follow.

        if not settings.DRIVE_SHARED_ID or not settings.DRIVE_SERVICE_ACCOUNT_CREDS:
            msg = "DRIVE_SHARED_ID and DRIVE_SERVICE_ACCOUNT_CREDS must both be set"
            raise CommandError(msg)

gdrive_sync/management/commands/create_missing_gdrive_folders.py (78-80)

medium

The conditional check if set(result) != {True}: is being changed to if error_lists:. It's better to check for the existence of errors directly, rather than comparing the set of results to {True}. This makes the code more readable and easier to understand.

        error_lists = [r for r in result if r is not True]
        if error_lists:
            failed_ids = list(chain.from_iterable(error_lists))
            msg = f"Some errors occurred for sites: {failed_ids}"
            raise CommandError(msg)

static/js/lib/ckeditor/turndown.ts (79)

medium

The type of node is being cast to HTMLElement. It's better to use a more specific type if possible, to avoid potential runtime errors. In this case, it is known that the node should be an HTMLElement.

    return rule.replacement?.(content, node as HTMLElement, options)

@pt2302 pt2302 closed this Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants