Skip to content

Conversation

@giohappy
Copy link
Contributor

@giohappy giohappy commented Nov 14, 2025

Reorganized some settings, trying to harmonize their locations.

@cla-bot cla-bot bot added the cla-signed CLA Bot: community license agreement signed label Nov 14, 2025
@giohappy giohappy added this to the 5.0.0 milestone Nov 14, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @giohappy, 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 focuses on a comprehensive cleanup and reorganization of the application's settings. It removes an obsolete sample settings file and extensively refactors the primary settings.py to group related configurations more effectively. The changes aim to enhance the clarity, maintainability, and logical structure of the project's configuration, making it easier for developers to understand and manage various system parameters.

Highlights

  • Settings File Cleanup: The geonode/local_settings.py.geoserver.sample file has been removed, streamlining the project's configuration by eliminating an outdated sample.
  • Settings Reorganization: The main geonode/settings.py file has undergone a significant reorganization, with many settings being moved to more logical and consolidated sections to improve clarity and maintainability.
  • New Configuration Options: New settings have been introduced, such as THEME_ACCOUNT_CONTACT_EMAIL for administrative contact and MANAGEMENT_COMMANDS_EXPOSED_OVER_HTTP to define which management commands can be accessed via HTTP.
  • Security and Proxy Settings Consolidation: Various security-related settings, including ALLOWED_HOSTS, IP whitelists, and proxy configurations, have been consolidated and reordered within geonode/settings.py for better structure.
  • Avatar and Upload Settings Relocation: Settings related to user avatars, file upload handlers, and GeoIP paths have been relocated to dedicated sections, enhancing the overall organization of the settings file.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

Copy link
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 performs a significant cleanup of the settings by removing the sample local_settings.py file and reorganizing settings within the main geonode/settings.py file. This is a good refactoring that improves the structure and maintainability of the configuration. I've identified a few issues related to reading environment variables that could lead to bugs or application startup failures. These include trailing spaces in environment variable names and incomplete error handling for ast.literal_eval. Please see my detailed comments for suggestions on how to fix these.

@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

❌ Patch coverage is 79.72973% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.10%. Comparing base (748d809) to head (1a18b31).
⚠️ Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #13723      +/-   ##
==========================================
+ Coverage   74.03%   74.10%   +0.07%     
==========================================
  Files         932      932              
  Lines       55690    55704      +14     
  Branches     7512     7519       +7     
==========================================
+ Hits        41230    41281      +51     
+ Misses      12820    12774      -46     
- Partials     1640     1649       +9     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

giohappy and others added 5 commits November 14, 2025 18:07
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@mattiagiupponi mattiagiupponi merged commit 5726abc into master Nov 20, 2025
17 checks passed
@mattiagiupponi mattiagiupponi deleted the settings_cleanup branch November 20, 2025 14:04
github-actions bot pushed a commit that referenced this pull request Nov 20, 2025
* Some cleanup to settings
---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Mattia <mattia.giupponi@gmail.com>
(cherry picked from commit 5726abc)
mattiagiupponi added a commit that referenced this pull request Nov 20, 2025
* Some cleanup to settings
---------



(cherry picked from commit 5726abc)

Co-authored-by: Giovanni Allegri <giohappy@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Mattia <mattia.giupponi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 5.0.x cla-signed CLA Bot: community license agreement signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants