Skip to content

[test]: preserve imported data and mapping#8342

Open
rijulpoudel wants to merge 2 commits into
mainfrom
issue-8338
Open

[test]: preserve imported data and mapping#8342
rijulpoudel wants to merge 2 commits into
mainfrom
issue-8338

Conversation

@rijulpoudel

@rijulpoudel rijulpoudel commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Fixes #8338

Summary by CodeRabbit

  • Tests
    • Added coverage to verify that imported dataset data, column mappings, row values, and upload plans remain unchanged when a dataset is retrieved after updates.

@github-actions

Copy link
Copy Markdown

Warning

One or more dependencies are approaching or past End-of-Life.
Please plan upgrades accordingly.

STATUS=WARNING
NODE_VERSION=20
NODE_CYCLE=20
EOL_DATE=2026-04-30
DAYS_REMAINING=-83

--- Node.js ---
Version: 20
EOL: 2026-04-30
Status: WARNING

STATUS=OK
PYTHON_VERSION=3.12
PYTHON_CYCLE=3.12
EOL_DATE=2028-10-31
DAYS_REMAINING=832

--- Python ---
Version: 3.12
EOL: 2028-10-31
Status: OK

STATUS=WARNING
DJANGO_VERSION=4.2
DJANGO_CYCLE=4.2
EOL_DATE=2026-04-07
DAYS_REMAINING=-106

--- Django ---
Version: 4.2
EOL: 2026-04-07
Status: WARNING


@coderabbitai

coderabbitai Bot commented Jul 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: 65619ed5-2d14-4e1b-998e-2dd8830495a6

📥 Commits

Reviewing files that changed from the base of the PR and between 7c0e603 and ad91a09.

📒 Files selected for processing (1)
  • specifyweb/backend/workbench/tests.py

📝 Walkthrough

Walkthrough

Adds a Django test that creates a WorkBench dataset with imported data, applies an upload plan, retrieves the dataset, and verifies the columns, rows, and mapping are preserved.

Changes

Imported dataset preservation

Layer / File(s) Summary
Dataset preservation validation
specifyweb/backend/workbench/tests.py
Adds coverage for creating imported dataset data, updating its uploadplan, retrieving it, and validating preserved columns, rows with a trailing empty value, and mapping.
🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Testing Instructions ⚠️ Warning The PR template’s Testing instructions section is left blank; only the issue reference is provided, so verification steps aren’t clear. Add concise steps to verify the WorkBench dataset change, e.g. run the relevant dataset API test or describe the manual GET/PUT reopen flow.
✅ 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 clearly matches the PR’s main change: adding a test to preserve imported data and mapping.
Linked Issues check ✅ Passed The added test directly verifies that imported data and its mapping are preserved in a WorkBench dataset, matching #8338.
Out of Scope Changes check ✅ Passed The change appears scoped to the requested test coverage and does not introduce unrelated modifications.
Automatic Tests ✅ Passed PASS: The PR adds an automated regression test, test_preserve_imported_data_and_mapping, in specifyweb/backend/workbench/tests.py.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-8338

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.

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@specifyweb/backend/workbench/tests.py`:
- Around line 168-172: Update the row assertion in the affected test to compare
dataset["rows"] directly with rows rather than slicing each row to len(columns).
Keep the existing column assertion and ensure the test enforces complete row
payload and row/column alignment.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0b066057-831c-46bf-bf03-0017c08cfb7d

📥 Commits

Reviewing files that changed from the base of the PR and between 7c0e603 and fdc6ff2.

📒 Files selected for processing (1)
  • specifyweb/backend/workbench/tests.py

Comment thread specifyweb/backend/workbench/tests.py
@github-project-automation github-project-automation Bot moved this from 📋Back Log to Dev Attention Needed in General Tester Board Jul 22, 2026
@rijulpoudel

Copy link
Copy Markdown
Collaborator Author

@CodeRabbit Full review

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@specify specify deleted a comment from coderabbitai Bot Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Dev Attention Needed

Development

Successfully merging this pull request may close these issues.

[test]: Preserve imported data and mapping in a WorkBench dataset

2 participants