Skip to content

Conversation

@giohappy
Copy link
Contributor

@giohappy giohappy commented Jan 8, 2026

No description provided.

@cla-bot cla-bot bot added the cla-signed CLA Bot: community license agreement signed label Jan 8, 2026
@giohappy giohappy linked an issue Jan 8, 2026 that may be closed by this pull request
@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 refactors the project's dependency management by migrating from requirements.txt and setup.cfg to pyproject.toml. This change streamlines the build process, centralizes dependency specifications, and modernizes the project's packaging configuration. The Dockerfile is also updated to reflect these changes.

Highlights

  • Dependency Management: Removes requirements.txt and setup.cfg, centralizing dependency management in pyproject.toml.
  • Build System: Updates the build system configuration in pyproject.toml to use setuptools.build_meta.
  • Dockerfile: Simplifies the Dockerfile by removing the explicit installation of requirements from requirements.txt.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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 modernizes the project's dependency management by migrating from requirements.txt and setup.cfg to pyproject.toml. This is a positive change that aligns with current Python packaging standards. My review has identified a critical issue where a dependency was dropped during the migration, which could break the application. I've also included some recommendations to improve the Dockerfile structure and the organization of dependencies within pyproject.toml for better maintainability and adherence to best practices.

Comment on lines 26 to 160
dependencies = [
"Pillow==11.3.0",
"lxml==5.2.1",
"psycopg2==2.9.9",
"Django==5.2.9",
# Other
"beautifulsoup4==4.12.3",
"hyperlink==21.0.0",
"urllib3==1.26.18",
"Paver==1.3.4",
"python-slugify==8.0.4",
"decorator==5.1.1",
"celery==5.4.0",
"tqdm==4.66.4",
"Deprecated==1.2.14",
"jsonschema==4.22.0",
"schema==0.7.7",
"rdflib==6.3.2",
"smart_open==7.0.4",
"PyMuPDF==1.26.3",
"defusedxml==0.7.1",
"zipstream-ng==1.8.0",
# Django Apps
"django-allauth==0.63.6",
"django-appconf==1.0.6",
"django-filter==24.2",
"django-imagekit==5.0.0",
"django-taggit==5.0.1",
"django-markdownify==0.9.5",
"django-mptt==0.16.0",
"django-treebeard==4.7.1",
"django-guardian<2.4.1",
"django-downloadview==2.3.0",
"django-polymorphic==3.1.0",
"django-tastypie<0.15.0",
"django-tinymce==3.7.1",
"django-uuid-upload-path==1.0.0",
"django-widget-tweaks==1.5.0",
"django-sequences==3.0",
"oauthlib==3.3.1",
"pyjwt==2.8.0",
"redis==6.2.0",
# geopython dependencies
"pycsw @ git+https://github.com/geopython/pycsw.git@3.0.0-beta1",
"pyproj<3.8.0",
"OWSLib==0.34.1",
"SQLAlchemy==2.0.43",
"Shapely==2.1.2",
"mercantile==1.2.1",
"numpy==1.26.*",
"Jinja2==3.1.6",

# Apps with packages provided in GeoNode's PPA on Launchpad.

# Django Apps
"dj-database-url==2.1.0",
"dj-pagination==2.5.0",
"django-select2==8.4.3",
"django-forms-bootstrap<=3.1.0",
"django-autocomplete-light==3.11.0",
"django-invitations<2.1.1",
"django-recaptcha==4.0.0",

# REST
"djangorestframework==3.15.2",
"djangorestframework-gis==1.2.0",
"djangorestframework-guardian==0.3.0",
"drf-extensions==0.7.1",
"drf-spectacular==0.27.2",
"geonode-dynamic-rest==2.3.0.1",
"geonode-pinax-notifications==6.0.0.3",

# GeoNode org maintained apps.
# django-geonode-mapstore-client==4.0.5
"django_geonode_mapstore_client @ git+https://github.com/GeoNode/geonode-mapstore-client.git@master",
"django-avatar==8.0.1",
"geonode-oauth-toolkit==2.2.2.2",
"geonode-announcements==2.0.2.2",
"django-activity-stream==2.0.0",
"gn-arcrest==10.5.6",
"geoserver-restconfig==2.0.16",
"gn-gsimporter==2.0.4",
"gisdata==0.5.4",
# importer dependencies
# blocked to <80 to avoid warning during the runtime for with py312 related to the polymorphic model
"setuptools>=59,<80",
"pdok-geopackage-validator==0.14.4",
"geonode-django-dynamic-model==0.4.0",
# datetimepicker widget
"django-bootstrap3-datetimepicker-2==2.8.3",
# storage manager dependencies
"django-storages==1.14.3",
"dropbox==11.36.2",
"google-cloud-storage==2.16.0",
"boto3==1.39.3",
# Django Caches
"whitenoise==6.6.0",
# Contribs
"xmltodict<0.13.1",
"inflection>=0.4.0",
"mock<6.0.0",
"python-dateutil==2.9.0.post0",
"pytz==2024.1",
"requests==2.32.5",
"timeout-decorator==0.5.0",
"pylibmc==1.6.3",
"sherlock==0.4.1",
"GDAL==3.8.4",
"psutil==5.9.8",
"django-cors-headers==4.9.0",
"django-user-agents==0.4.0",
# production
"uWSGI==2.0.30",
"docker==7.0.0",
"invoke==2.2.0",
# tests
"coverage==7.5.1",
"requests-toolbelt==1.0.0",
"flake8==7.3.0",
"black==24.4.2",
"pytest==8.4.2",
"pytest-bdd==7.1.2",
"splinter==0.21.0",
"pytest-splinter==3.3.2",
"pytest-django==4.8.0",
"pixelmatch==0.3.0",
"factory-boy==3.3.0",
"flaky==3.8.1",
"selenium>=4.15.1,<5.0.0",
"selenium-requests==2.0.4",
"webdriver_manager==4.0.1",
# Security and audit
"cryptography==46.0.3",
"jwcrypto>=1.5.6",
]
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The dependency django-modeltranslation was present in the old setup.cfg but is missing from the dependencies list in this file. The project's settings in geonode/settings.py still contain configurations for MODELTRANSLATION (e.g., MODELTRANSLATION_LANGUAGES), which indicates this dependency is still required. Please add it back to avoid breaking the application. The version in setup.cfg was 0.18.13. It would be best to add it within the "Django Apps" section for consistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mattiagiupponi we're not relying on model translations anymore. We can remove those settings in a separate issue.

Dockerfile Outdated
Comment on lines 25 to 26
RUN . /usr/src/venv/bin/activate
RUN yes w | pip install --src /usr/src -r requirements.txt &&\
yes w | pip install -e .
RUN yes w | pip install -e .
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The RUN . /usr/src/venv/bin/activate command has no effect on the subsequent RUN command, as each RUN instruction executes in a separate shell. To ensure the virtual environment is activated for the pip install command and to reduce the number of layers in the Docker image, these commands should be combined into a single RUN instruction.

RUN . /usr/src/venv/bin/activate && yes w | pip install -e .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need the env activation @mattiagiupponi . We already dropped it inside the project; we should drop it here too. The environment is already activated inside the base image.

pyproject.toml Outdated
Comment on lines 141 to 168
# tests
"coverage==7.5.1",
"requests-toolbelt==1.0.0",
"flake8==7.3.0",
"black==24.4.2",
"pytest==8.4.2",
"pytest-bdd==7.1.2",
"splinter==0.21.0",
"pytest-splinter==3.3.2",
"pytest-django==4.8.0",
"pixelmatch==0.3.0",
"factory-boy==3.3.0",
"flaky==3.8.1",
"selenium>=4.15.1,<5.0.0",
"selenium-requests==2.0.4",
"webdriver_manager==4.0.1",
# Security and audit
"cryptography==46.0.3",
"jwcrypto>=1.5.6",
]

[project.optional-dependencies]
dev = [
"pytest>=7.0",
"flake8",
"black",
"coverage",
]
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There are a couple of issues with how testing and development dependencies are organized:

  1. Test dependencies in main dependencies: Dependencies for testing (lines 142-156) are included in the main [project.dependencies] list. These should be moved to an optional dependency group (e.g., [project.optional-dependencies.test]) to avoid installing them in a production environment.
  2. Conflicting dev dependencies: The [project.optional-dependencies.dev] group (lines 163-168) specifies unpinned versions of tools that are already pinned in the main dependencies list (e.g., pytest, flake8). This can cause version conflicts.

It's recommended to move all test and development dependencies into one or more optional groups (like test and dev) and ensure version specifications are consistent.

@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.18%. Comparing base (3ed2514) to head (02cedbe).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #13860       +/-   ##
===========================================
+ Coverage   52.15%   74.18%   +22.03%     
===========================================
  Files         944      944               
  Lines       56335    56401       +66     
  Branches     7626     7632        +6     
===========================================
+ Hits        29380    41843    +12463     
+ Misses      25588    12879    -12709     
- Partials     1367     1679      +312     
🚀 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed CLA Bot: community license agreement signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop requirements.txt file and move dependencies to pyproject.toml

3 participants