Skip to content

docs: add more docstrings to mbtiles#1786

Merged
nyurik merged 5 commits intomaplibre:mainfrom
CommanderStorm:mbtiles-docs
Apr 12, 2025
Merged

docs: add more docstrings to mbtiles#1786
nyurik merged 5 commits intomaplibre:mainfrom
CommanderStorm:mbtiles-docs

Conversation

@CommanderStorm
Copy link
Member

I did a bit of investigation what changes would be nessesary to support #580 and these are the changes where I worked myself through the functions in said crate.

Most are not related to the actual investigation, don't infer too much from which functions I looked at.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

mbtiles/src/mbtiles.rs:136

  • [nitpick] Consider using consistent naming for the Mbtiles struct in the documentation. Change MBTiles to Mbtiles to match the struct name defined in the code.
/// See [`MBTiles::get_tile_and_hash`] if you need the hash too

Copy link
Member Author

@CommanderStorm CommanderStorm left a comment

Choose a reason for hiding this comment

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

xD
well, they don't exist (yet)

Copy link
Member

@nyurik nyurik left a comment

Choose a reason for hiding this comment

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

thanks!

@nyurik nyurik merged commit e08f8aa into maplibre:main Apr 12, 2025
19 of 20 checks passed
@CommanderStorm CommanderStorm deleted the mbtiles-docs branch April 12, 2025 18:27
CommanderStorm added a commit that referenced this pull request Apr 15, 2025
(PR is based on #1786 => merge said PR first before looking at this
one.)

This PR adds support to the `mbtiles` crate to hand out which hash
corresponds to a tile.

The flat case might be debatable: Here I chose to md5 hash it to make
upstream code more readable. The alternative would be to in this case
return `None` for the hash.

This looks more intimidating than it actully is. Most of the lines are
unit-tests.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com>
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.

3 participants