crate / crate/sphinx-csv-filter

Allow regex-based include/exclude filters on colums as well?

Open
#35 5 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Python
Stars
8
Forks
5
PR merge metrics
No merged PRs in 30d

Description

First off, thanks for this plugin. It's very helpful for the current issues I'm facing in documenting some matrices in sphinx.

I've had to adapt your plugin in order for it to be useable for me though. In my use case, I have the same labels in the header row (column 0) as in the row 0, something like this:

![image](https://user-images.githubusercontent.com/5442584/142621852-a9fb16aa-fd0d-4895-9e3e-90b6efcc5bff.png)

Now, I'd like to be able to filter this table, for example by showing only "condition1" and "condition2", so the filter needs to be applied both to the rows as to the columns, based on a regex (the `included_cols` option is not useable as the indices are not known beforehand)

I have a quick-and-dirty solution for this ready that works fine for my use case, but I'm wondering it this is something that you would accept to include as a feature in the main project as well. If so, I can make a proposal for what the configuration could look like

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing row filtering behavior and the included_cols option described in the issue. Define how regex-based column inclusion and exclusion should interact with row filtering, then verify that tables can be filtered by matching column labels such as condition1 and condition2.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.