feat: migrate 14 modules from private repo#120
Conversation
Modules moved: - spp_land_record - spp_registry_group_hierarchy - spp_farmer_registry - spp_farmer_registry_cr - spp_farmer_registry_demo - spp_farmer_registry_vocabularies - spp_starter_farmer_registry - spp_farmer_registry_dashboard - spp_scoring - spp_scoring_programs - spp_disability_registry - spp_irrigation - spp_attachment_av_scan - spp_storage_backend
There was a problem hiding this comment.
Semgrep OSS found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Summary of ChangesHello, 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 undertakes a significant migration and enhancement of several core OpenSPP modules, moving them to a public repository. The primary goal is to bolster data integrity and security through new antivirus capabilities for attachments, while also expanding and refining registry functionalities for farmers and individuals with disabilities. The changes introduce robust data classification using international standards, integrate powerful expression language for dynamic eligibility, and provide new tools for data governance and analytical insights. Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This is a significant pull request that migrates 14 modules from a private repository, introducing substantial new features like attachment antivirus scanning, a disability registry, and a comprehensive farmer registry. The overall code quality is high, showcasing good design patterns such as the use of _inherits for model extension, a pre_init_hook for data migration, and robust security models. The implementation details, including client-side UI restrictions and comprehensive test data, are well-executed. I have a couple of minor suggestions for improvement to ensure deterministic behavior and data consistency.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 19.0 #120 +/- ##
==========================================
- Coverage 70.16% 69.96% -0.20%
==========================================
Files 738 832 +94
Lines 44046 48813 +4767
==========================================
+ Hits 30906 34154 +3248
- Misses 13140 14659 +1519
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
- Add spp_encryption module (dependency of spp_attachment_av_scan) - Fix xml-deprecated-data-node in 11 XML files - Fix ruff F402 shadowed import in spp_scoring - Apply prettier XML formatting
- Fix CodeQL high: refactor URL string check to use tuple constant - Fix Semgrep errors: add nosemgrep for expected sudo on res.partner in demo generator
This reverts commit 7c4aff8.
- Fix PII in logs: use .id instead of .name in log messages - Fix XML ID naming: rename to view_spp_change_request_type_form_activity_ops - Fix pylint E8130: remove test folder import from spp_farmer_registry_cr - Fix compliance: skip wizard model ACL check (model not yet implemented) - Fix geojson: remove LFS tracking (file read at runtime by spp_demo)
- Add 'assessor' to valid group level names in XML ID linter - Remove deprecated 'description' key from 4 farmer registry manifests
- Add nosemgrep comments for expected sudo() usage - Add nosec B608 for safe SQL in demo generator - Remove test folder import from spp_irrigation
…ger to match target model
…istic with explicit ordering
Why is this change needed?
Migrating modules from the private openspp-modules-v2 repo to the public OpenSPP2 repo as part of the Release V2 migration plan.
How was the change implemented?
Modules migrated (15)
Copied from openspp-modules-v2 (19.0 branch):
Code fixes applied to migrated modules
<data>nodes: Replaced<odoo><data>with<odoo>and<odoo><data noupdate="1">with<odoo noupdate="1">in 11 XML filesdescriptionkey: Removed from 7 manifest files (spp_farmer_registry, spp_farmer_registry_cr, spp_farmer_registry_dashboard, spp_farmer_registry_demo, spp_scoring, spp_scoring_programs, spp_starter_farmer_registry)from . import testsin spp_farmer_registry_cr and spp_irrigation__init__.py_import in spp_scoring/models/scoring_indicator.py.namewith.idin log messages (spp_attachment_av_scan, spp_farmer_registry_vocabularies, spp_farmer_registry_demo)spp_change_request_type_form_activity_opstoview_spp_change_request_type_form_activity_opsRepo-level fixes (pre-existing issues)
assessorto valid group level names in XML ID naming convention checker*.geojsonLFS tracking in.gitattributes— geojson files are read at runtime by spp_demo and must remain as regular filesNew unit tests
No new tests — existing tests from private repo are included. All 15 module test suites pass in CI.
Unit tests executed by the author
All module tests pass in CI:
spp_attachment_av_scan, spp_disability_registry, spp_encryption, spp_farmer_registry, spp_farmer_registry_cr, spp_farmer_registry_demo, spp_farmer_registry_vocabularies, spp_irrigation, spp_land_record, spp_registry_group_hierarchy, spp_scoring, spp_scoring_programs, spp_storage_backend
How to test manually
Related links