Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a Script in meta_tools to Compare requirements.txt with the Current Conda Environment #75

Open
3 of 4 tasks
Polichinel opened this issue Sep 26, 2024 · 0 comments
Assignees
Labels
improvement Refactoring, improving existing codebase

Comments

@Polichinel
Copy link
Collaborator

Polichinel commented Sep 26, 2024

Objective

Develop a lightweight, user-friendly script within the meta_tools directory that compares the packages and versions specified in requirements.txt with the current Conda environment. The script should identify both missing packages and version mismatches, providing users with clear, actionable feedback and some guiding suggestions for resolution.

Requirements

Functionality:

  • The script must check for both missing packages and version mismatches between requirements.txt and the user's current Conda environment.
  • It should produce a console output that clearly lists any discrepancies.
  • Use logging for output, adhering to best practices such as including log levels (INFO, WARNING, ERROR) and timestamps for each log entry.
  • Handle package version ranges specified in requirements.txt by indicating when the installed package version is outside the specified range.

User Experience:

  • The script should be easy to run manually as needed by users.
  • Provide clear, actionable messages that inform users of missing packages or version mismatches, with suggestions for resolving these issues (e.g., commands to install missing packages or upgrade/downgrade specific versions).
  • Optionally, include an --fix flag that users can pass to the script to automatically resolve identified discrepancies.
  • Provide an example of the expected output in the documentation to help users understand the results.

Compatibility:

  • The script is designed to be run in a Conda environment and should be tailored accordingly, with modular code to facilitate future integration into a CI/CD pipeline.
  • Ensure compatibility across different operating systems (e.g., Windows, macOS, Linux).
  • Test the script in a typical Conda environment to ensure it functions as expected across platforms.

Actionable Steps

  • Script Development:

    • Write a script in the meta_tools directory that compares requirements.txt with the current Conda environment, checking for both missing packages and version mismatches.
    • Design the script in a modular way to facilitate future CI/CD integration.
  • Output & Logging:

    • Implement logging to display the results in the console, with log levels and timestamps.
    • Ensure that messages are clear, actionable, and provide guidance on resolving discrepancies.
  • Execution & Testing:

    • Test the script in a typical Conda environment, ensuring compatibility across different operating systems (Windows, macOS, Linux).
    • Provide example commands for running the script, including an optional --fix flag for automatic resolution of discrepancies.
  • Documentation:

    • Document the usage of the script, including sample output, how to interpret results, and how to use the --fix flag if implemented.
    • Include instructions on how to integrate the script into a CI/CD pipeline in the future.
@Polichinel Polichinel added the improvement Refactoring, improving existing codebase label Sep 26, 2024
@smellycloud smellycloud linked a pull request Sep 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Refactoring, improving existing codebase
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants