ansible-openwisp2 icon indicating copy to clipboard operation
ansible-openwisp2 copied to clipboard

[change] Move python dependencies to requirements.txt file

Open shwetd19 opened this issue 11 months ago • 4 comments

Checklist

  • [x] I have read the OpenWISP Contributing Guidelines.
  • [x] I have manually tested the changes proposed in this pull request.
  • [ ] I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • [ ] I have updated the documentation.

Reference to Existing Issue

Closes #507

Description of Changes

This PR here implements automated dependency management using Dependabot by extracting Python dependencies from pip.yml into a dedicated requirements.txt file.

Key Changes:

  1. New Requirements File

    • Created files/requirements.txt containing all Python dependencies
    • Organized dependencies by category with clear comments
    • Maintained version constraints where necessary
  2. Updated Package Installation

    • Modified tasks/pip.yml to use the new requirements file
    • Implemented version constraints using pip's constraint feature
    • Preserved compatibility with existing Ansible variables
    • Maintained support for conditional package installation
  3. Dependabot Configuration

    • Added Python package ecosystem configuration
    • Set weekly update schedule
    • Configured PR labeling and commit message format

Testing Details:

  1. Installation Testing

    Tested with various configurations:

    molecule test -s local
    
  2. Integration Testing

    • Validated Dependabot configuration
    • Tested requirements file parsing
    • Verified dependency resolution

Benefits:

  • Automated dependency updates via Dependabot
  • Improved dependency management
  • Maintained backward compatibility
  • Better organized package requirements

Screenshots

image

shwetd19 avatar Jan 30 '25 13:01 shwetd19

Hey @nemesifier ,

The main issue was that the requirements.txt file cannot be found during the installation process. The error message was consistent across different Ubuntu and Debian environments I've made the possible fix and did tested it properly this time

can you please review my PR

shwetd19 avatar Feb 07 '25 04:02 shwetd19

Hey @pandafy @nemesifier can you please reivew this PR ? pls let me know if any changes are required, Thanks!

shwetd19 avatar Feb 10 '25 09:02 shwetd19

Hello @pandafy I've implemented the suggested changes in my recent commits, can you please check that once, Thanks!

shwetd19 avatar Feb 11 '25 14:02 shwetd19

Hey @pandafy @nemesifier

I've made the suggested changes as for ravan & now it usees the correct prefix format [deps]

shwetd19 avatar Feb 22 '25 11:02 shwetd19

Implemented in #529, thanks for trying!

nemesifier avatar Jul 29 '25 13:07 nemesifier