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

Update load_dataframe #1

Merged
merged 10 commits into from
Oct 10, 2024
Merged

Update load_dataframe #1

merged 10 commits into from
Oct 10, 2024

Conversation

peterrrock2
Copy link

Main thing in this PR are some updates to the load_dataframe function. I did some major refactoring of the function and added a lot of validation to the client side so that we can narrow the scope of allowable behavior for users. I also tried to make sure that the error messages that are spat out are intelligible and give the user a hint as to how to fix whatever part of their workflow is messed up.

The other small thing in this is that the normalize_path function has been updated to disallow certain substrings that can cause issues when querying the API.

@bailliekova
Copy link

todo at some point in the future- make sure we're importing the projection constant everywhere it's used.

Copy link

@bailliekova bailliekova left a comment

Choose a reason for hiding this comment

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

Approved with some nits and heartfelt desire for passing tests

values: dict[Union[str, Geography], Any],
) -> None:
"""Sets the values of a column on a collection of geographies.

Args:
path_or_col: Short identifier for the column or a `Column` metadata object.
path: Short identifier for the column. Only this or `col` should be provided.

Choose a reason for hiding this comment

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

Can you update this comment about the behavior of the function when both path and col are passed?

values: dict[Union[str, Geography], Any],
client: Optional[httpx.AsyncClient] = None,
) -> None:
"""Asynchronously sets the values of a column on a collection of geographies.

Args:
path_or_col: Short identifier for the column or a `Column` metadata object.
path: Short identifier for the column. Only this or `col` should be provided.

Choose a reason for hiding this comment

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

same as above, pls clarify behavior for different combinations of path or col provided

@peterrrock2 peterrrock2 merged commit 0ec6f71 into mggg:dev Oct 10, 2024
2 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.

2 participants