Skip to content

Adds tool: redact_metadata#406

Merged
Oddant1 merged 9 commits into
qiime2:devfrom
Macabe222:Paired-metadata-redact
Jul 6, 2026
Merged

Adds tool: redact_metadata#406
Oddant1 merged 9 commits into
qiime2:devfrom
Macabe222:Paired-metadata-redact

Conversation

@Macabe222

@Macabe222 Macabe222 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a tool that removes all metadata files from a given artifact.
Linked to: rachis-org/rachis#947
Succeeds #399

AI Disclosure

  • NO AI USED.
  • AI USED.

AI Usage Details

@Oddant1 Oddant1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  1. Use term Result not Artifact because Result encompasses Artifacts and Visualizations
  2. The Results used in the tests don't exist, so the tests are failing

Comment thread q2cli/builtin/tools.py Outdated
Comment thread q2cli/builtin/tools.py Outdated
Comment thread q2cli/builtin/tools.py Outdated
Comment thread q2cli/builtin/tools.py Outdated
Comment thread q2cli/builtin/tools.py Outdated
Comment thread q2cli/builtin/tools.py Outdated
Comment thread q2cli/tests/test_tools.py Outdated
Comment thread q2cli/tests/test_tools.py Outdated
Comment on lines +2022 to +2024
self.tax_fp = os.path.join(datadir, 'taxonomy.qza')
self.tax_bar_fp = os.path.join(datadir, 'taxa-bar-plots.qzv')
self.demux_fp = os.path.join(datadir, 'demux.qza')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These three Results don't actually exist. You'll need to create dummy_plugin Results to use for this. You can probably make them in code instead of creating test data in the data dir.

Comment thread q2cli/tests/test_tools.py Outdated
Comment thread q2cli/tests/test_tools.py Outdated


class TestRedactMetadata(unittest.TestCase):
def setUp(self):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Aim to make this setUpClass if possible.

@Oddant1

Oddant1 commented Jun 30, 2026

Copy link
Copy Markdown
Member

@Macabe222 don't use them big ole test Artifacts.

Use this dummy_plugin method to create test data with Metadata in the prov.

Also, don't worry about the CI failure. That's my fault lol. I'll make sure things work before merging.

@Oddant1 Oddant1 mentioned this pull request Jun 30, 2026
2 tasks
@Oddant1 Oddant1 merged commit 220f764 into qiime2:dev Jul 6, 2026
3 of 6 checks passed
@github-project-automation github-project-automation Bot moved this from In Development to Changelog Needed in 2026.7 🐐 Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Changelog Needed

Development

Successfully merging this pull request may close these issues.

3 participants