Skip to content

Conversation

@konnerhorton
Copy link
Contributor

Fixes issue #6 by adding to bedrock_ge.ags.read

  • Add read_ags_source to read filepath or file-like objects (returns a context manager stream
  • Add detect_encoding to infer encoding from object (user can provide encoding)
  • use the two functions above in ags_to_dfs to read the source

Add test for detect_encoding and ags3 sample data.

Add `detect_encoding` to be called in `ags_to_dfs`
Add `read_ags_source` to be called in `ags_to_dfs` (
Update `ags3_to_dfs` for same
Update `ags4_to_dfs` for same
Add docstring to `coerce_string`
`test_detect_encoding` was also testing strings containing ags data (which is not needed), causing github workflows to fail.
@JoostGevaert
Copy link
Contributor

Thanks for this amazing PR, Konner!
I'm working on it, but realized that I actually also need to make an update to the automated tests.

Update docstrings to remove relic args
Update docstrings for typos
@JoostGevaert
Copy link
Contributor

Awesome, I think I'm done with the review. Now I need to redo the automated test on the Kai Tak Hong Kong example marimo notebook a bit, then we can see if that notebook needs any changing due to the new way of handling files that you implemented, and then this PR can be merged.

@JoostGevaert
Copy link
Contributor

Hi @konnerhorton, we've updated the test that runs the Kai Tak, HK example marimo notebook in the dev branch. Could you please merge the dev branch into your branch and then push that merge commit to make sure we're running that updated test on the code you are contributing?

@konnerhorton
Copy link
Contributor Author

Done, looks like the automated tests passed.

@JoostGevaert
Copy link
Contributor

Oke, then still something isn't going quite right with the tests, because the notebook shouldn't be able to run anymore, because previously the notebook was performing the AGS 3 data to dataframes operation on a string, and now that shouldn't be possible anymore.

Nonetheless, I'll merge this PR and have a look at what is going on here exactly in a different PR myself.

Thanks a million for the fantastic work @konnerhorton!

@JoostGevaert JoostGevaert merged commit f88feff into bedrock-engineer:dev May 26, 2025
4 checks passed
@JoostGevaert
Copy link
Contributor

Ah, I think that the problem is that I'm still running the marimo notebook with uv run rather than python, which still causes uv to create a new virtual env with the latest version of bedrock-ge from PyPI insteaed of the local code, so I actually still didn't solve that issue with my latest PR into dev.
Just FYI :)

@konnerhorton konnerhorton deleted the read-files branch May 29, 2025 17:35
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