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

Adding output formatters #20

Merged
merged 13 commits into from
May 22, 2024
Merged

Adding output formatters #20

merged 13 commits into from
May 22, 2024

Conversation

stuartlynn
Copy link
Contributor

@stuartlynn stuartlynn commented May 10, 2024

This PR adds

  • A trait and enum for different output formats. This gives us save and format functions to take the data request result and turn it in to either a string or a written file.
  • Implementations of this format for CSV output format
  • Code that invokes the CSV formatter as part of the data request

TODO

  • Tests
  • CSV formatter
  • GeoJSON formatter
  • GeoJSONSeq formatter
  • Implement formatter options for different formatter types

@stuartlynn stuartlynn changed the title WIP: Adding output formatters Adding output formatters May 16, 2024
@stuartlynn stuartlynn requested a review from yongrenjie May 16, 2024 11:02
src/formatters.rs Outdated Show resolved Hide resolved
src/formatters.rs Outdated Show resolved Hide resolved
src/formatters.rs Outdated Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
src/formatters.rs Outdated Show resolved Hide resolved
@sgreenbury
Copy link
Contributor

Looks great! Just left a few small comments/suggestions in the code including some that would be better as new issues rather than changed here if implemented.

stuartlynn and others added 4 commits May 22, 2024 11:41
Avoid unwrap by mapping error

Co-authored-by: Sam Greenbury <[email protected]>
Co-authored-by: Sam Greenbury <[email protected]>
Co-authored-by: Sam Greenbury <[email protected]>
@stuartlynn
Copy link
Contributor Author

Thanks @sgreenbury merging this in

@stuartlynn stuartlynn merged commit 9ea552e into main May 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done:
Development

Successfully merging this pull request may close these issues.

2 participants