[MNT] Complete Test for Sparse Dataset Row ID and Ignore Attributes Inclusion
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- data, testing-qa
Research direction
Start in tests/test_datasets/test_dataset.py at test_get_sparse_dataset_rowid_and_ignore_and_target, then run that test to inspect its current sparse-dataset behavior. Extend or add the case using target="class", include_row_id=True, and include_ignore_attribute=True. Done means the assertions cover the expected output shape, row IDs, excluded ignored columns, and updated categorical indicators.
Written by the indexing model from the issue text.
Description
The test test_get_sparse_dataset_rowid_and_ignore_and_target in test_dataset.py#L382 currently sets ignore_attribute and row_id_attribute on a sparse dataset but calls get_data() with include_row_id=False and include_ignore_attribute=False. This means the test doesn't verify behavior when these attributes are actually included in the output.
Steps:
- Add a new test case or extend the existing one to call
get_data(target="class", include_row_id=True, include_ignore_attribute=True). - Assert the correct output shape (should exclude the ignored columns and include row IDs if applicable).
- Verify that categorical indicators are updated accordingly.
- Run the test to ensure it passes with the sparse dataset.
The test should validate that sparse datasets handle row ID and ignore attributes correctly when included, improving test coverage for edge cases.
Source: Mentioned TODO in source code (same line)
- Dominant language
- Python
- Stars
- 361
- Forks
- 296
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openml/openml-python
-
Documentation Good First Issue
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
openml/openml-python#1708 · 6 comments ·
-
Good First Issue module:Run testing
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
openml/openml-python#1646 · 7 comments · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
openml/openml-python#1714 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
openml/openml-python#1711 · 1 comment ·
-
[MNT] `mypy` fixes Open
Difficulty 5/5 Over a week Newbie friendliness 30/100
openml/openml-python#1696 · 3 comments ·
All issues in openml/openml-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Openarea: ci bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/clickhouse-connect#1057 ·