Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "pip"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/frontend" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "docker"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
Comment on lines +8 to +19
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Configuration looks correct and addresses previous concerns.

The Dependabot configuration properly specifies all three package ecosystems (pip, npm, docker) with appropriate directories. The weekly update schedule is a good default.

Consider using different update schedules based on ecosystem criticality. For example, security updates for production dependencies might warrant daily checks:

  - package-ecosystem: "pip"
    directory: "/" # Location of package manifests
    schedule:
      interval: "weekly"
+   open-pull-requests-limit: 10
+   groups:
+     python-dependencies:
+       patterns:
+         - "*"
  - package-ecosystem: "npm"
    directory: "/frontend" # Location of package manifests
    schedule:
      interval: "weekly"
+   open-pull-requests-limit: 10
  - package-ecosystem: "docker"
    directory: "/" # Location of package manifests
    schedule:
-     interval: "weekly"
+     interval: "daily"  # Docker base images should be checked more frequently for security updates
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- package-ecosystem: "pip"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/frontend" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "docker"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "pip"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
open-pull-requests-limit: 10
groups:
python-dependencies:
patterns:
- "*"
- package-ecosystem: "npm"
directory: "/frontend" # Location of package manifests
schedule:
interval: "weekly"
open-pull-requests-limit: 10
- package-ecosystem: "docker"
directory: "/" # Location of package manifests
schedule:
interval: "daily" # Docker base images should be checked more frequently for security updates
🤖 Prompt for AI Agents
In .github/dependabot.yml lines 8 to 19, the current schedule sets all package
ecosystems to weekly updates. To improve dependency management, adjust the
update schedules to reflect ecosystem criticality by setting more frequent
intervals, such as daily for production-critical dependencies like pip or
docker, while keeping less critical ones like npm weekly. Modify the
schedule.interval values accordingly for each ecosystem to implement this
differentiated update frequency.

10 changes: 10 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[pytest]
testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*
addopts = -v --tb=short
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
integration: marks tests as integration tests
unit: marks tests as unit tests
4 changes: 4 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pytest>=6.0.0
pytest-mock>=3.0.0
pytest-cov>=2.0.0
mock>=4.0.0
Comment on lines +1 to +4
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Consider using more specific version constraints for testing dependencies.

Using >= constraints can lead to unexpected breaking changes when new major versions are released. For test dependencies, it's often better to pin to specific major versions to ensure consistent test environments.

Consider using more specific version constraints:

-pytest>=6.0.0
-pytest-mock>=3.0.0
-pytest-cov>=2.0.0
-mock>=4.0.0
+pytest>=6.0.0,<9.0.0
+pytest-mock>=3.0.0,<4.0.0
+pytest-cov>=2.0.0,<5.0.0
+mock>=4.0.0,<6.0.0
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
pytest>=6.0.0
pytest-mock>=3.0.0
pytest-cov>=2.0.0
mock>=4.0.0
pytest>=6.0.0,<9.0.0
pytest-mock>=3.0.0,<4.0.0
pytest-cov>=2.0.0,<5.0.0
mock>=4.0.0,<6.0.0
🤖 Prompt for AI Agents
In requirements-test.txt lines 1 to 4, the version constraints for testing
dependencies use '>=' which can cause instability with new major releases.
Change these to specify compatible major versions using a format like
'pytest>=6.0.0,<7.0.0' to pin the major version and avoid unexpected breaking
changes while allowing minor and patch updates.

Loading
Loading