Skip to content

Add needed modules to requirements-testing.txt #8229

Open
g1rly-c0d3r wants to merge 2 commits into
mainfrom
issue-8228
Open

Add needed modules to requirements-testing.txt #8229
g1rly-c0d3r wants to merge 2 commits into
mainfrom
issue-8228

Conversation

@g1rly-c0d3r

@g1rly-c0d3r g1rly-c0d3r commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Fixes #8228

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone

Testing instructions

  • Uncomment
    # RUN ve/bin/pip install --no-cache-dir -r /home/specify/requirements-testing.txt
  • build and start specify
  • run run docker exec -it specify7 /opt/specify7/ve/bin/python3 -m coverage run --source=specifyweb -m pytest
  • ensure the unit tests run, and afterwards a .coverage file is created in the docker container's /opt/specify7 directory

Summary by CodeRabbit

  • Chores
    • Expanded the testing dependencies to include additional tooling for coverage and XML-related support.
    • Updated the test runner configuration to automatically use the project’s specified settings module during pytest runs.

@g1rly-c0d3r g1rly-c0d3r added this to the 7.12.1 milestone Jun 22, 2026
@g1rly-c0d3r g1rly-c0d3r requested review from a team and CarolineDenis June 22, 2026 14:50
@github-project-automation github-project-automation Bot moved this to 📋Back Log in General Tester Board Jun 22, 2026
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 59c0ea7a-ecf0-4fc9-8f9f-06cbdfd5d5ad

📥 Commits

Reviewing files that changed from the base of the PR and between 2c1e6a1 and 18c15fe.

📒 Files selected for processing (1)
  • pytest.ini
✅ Files skipped from review due to trivial changes (1)
  • pytest.ini

📝 Walkthrough

Walkthrough

Testing dependencies are added to requirements-testing.txt, and pytest.ini is configured to use specifyweb.settings for pytest.

Changes

Testing Setup

Layer / File(s) Summary
Add testing packages
requirements-testing.txt
Adds lxml, coverage, and pytest-django to the testing requirements file.
Configure pytest settings
pytest.ini
Sets DJANGO_SETTINGS_MODULE to specifyweb.settings in the pytest configuration.
🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR improves test setup, but it does not show pytest being added, so issue #8228's core missing dependency remains unaddressed. Add pytest to requirements-testing.txt and verify the test suite runs successfully in the Docker-based workflow.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: updating testing dependencies in requirements-testing.txt.
Out of Scope Changes check ✅ Passed The added pytest.ini setting and extra testing dependencies are still related to making the test environment work.
Automatic Tests ✅ Passed The PR only updates testing config/dependencies; it doesn’t change app logic, and existing CI already runs the backend suite, so no new tests were necessary.
Testing Instructions ✅ Passed The PR’s steps are clear and target the changed test setup: enabling the test-requirements install, then running pytest/coverage to validate the new deps and pytest.ini settings.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-8228

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
requirements-testing.txt (1)

6-8: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Consider explicitly adding pytest to the requirements.

The PR objectives identify pytest itself as the critical missing dependency that prevented tests from running. While pytest-django (added on line 8) will transitively pull in pytest as a dependency, explicitly listing pytest would be more transparent and robust. This ensures:

  1. Clear documentation of all top-level testing dependencies
  2. Reproducibility across environments (per the PR objective of being "complete and reproducible")
  3. Protection against future changes to pytest-django's dependency chain
✅ Proposed addition
+pytest
 lxml
 coverage
 pytest-django
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@requirements-testing.txt` around lines 6 - 8, The requirements-testing.txt
file includes pytest-django but does not explicitly list pytest as a direct
dependency, even though it is the critical missing dependency mentioned in the
PR objectives. Add pytest as an explicit entry in the requirements-testing.txt
file alongside the other testing dependencies like lxml, coverage, and
pytest-django to ensure clear documentation of all top-level testing
dependencies and improve reproducibility across environments.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@requirements-testing.txt`:
- Around line 6-8: The requirements-testing.txt file includes pytest-django but
does not explicitly list pytest as a direct dependency, even though it is the
critical missing dependency mentioned in the PR objectives. Add pytest as an
explicit entry in the requirements-testing.txt file alongside the other testing
dependencies like lxml, coverage, and pytest-django to ensure clear
documentation of all top-level testing dependencies and improve reproducibility
across environments.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e9a366a-106e-4edd-ae83-f0e6975bea26

📥 Commits

Reviewing files that changed from the base of the PR and between 3d13255 and 2c1e6a1.

📒 Files selected for processing (1)
  • requirements-testing.txt

@CarolineDenis CarolineDenis self-requested a review June 23, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📋Back Log

Development

Successfully merging this pull request may close these issues.

Testing requirements not included in requirements-testing.txt

2 participants