Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add filtering options to get_dataset #46

Merged

Conversation

Moohan
Copy link
Member

@Moohan Moohan commented Nov 13, 2024

I needed this for another project, so had a look and realised it was quite simple. This closes #8

I added some tests and spent a bit of time improving the error messages around the checking of the args (parse_col_select() and parse_row_filter())

@Moohan Moohan requested a review from csillasch November 13, 2024 18:43
@Moohan Moohan self-assigned this Nov 13, 2024
@Moohan
Copy link
Member Author

Moohan commented Nov 13, 2024

Looks like checks are failing, I need to make the row_filter test less strict to accept a named vector as well as a list (in fact at the moment it only checks for a list but really it needs to quite specifically be a 'depth=1' list with names...

@Moohan Moohan force-pushed the feature/get_dataset_filter branch from eb9de37 to c83f57f Compare November 14, 2024 08:42
Something must have changed with factors between v4.0.1 and now...
@Moohan
Copy link
Member Author

Moohan commented Nov 14, 2024

I should have stopped with just the row and column filters on get_dataset()!

I think everything is working now - all the issues I ended up having were to do with me trying to improve / make stricter the parse_* functions.

@Moohan Moohan requested a review from a team November 14, 2024 15:50
Copy link
Contributor

@csillasch csillasch left a comment

Choose a reason for hiding this comment

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

Looks good!
Am wondering about the error handling now that weve switched to retry - for example when trying to select a column that doesnt exist (or is mistyped) I think the call should fail and return the error message immediately rather than retrying. What do you think?

@csillasch csillasch merged commit 3898526 into Public-Health-Scotland:master Nov 14, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Col select for get_dataset
2 participants