Commit Graph

139 Commits

Author SHA1 Message Date
Yuri Astrakhan
b5e81a8604 update lock 2023-09-06 00:30:40 -04:00
rstanciu
875a942fcf
Add integrity and global hash check to validation (#851)
Co-authored-by: rstanciu <rstanciu@rivian.com>
2023-08-31 03:40:40 +00:00
Yuri Astrakhan
f5e633f3dd Update lock and bump sqlite-hashes 2023-08-27 23:26:51 -04:00
Yuri Astrakhan
1131c28c99
cleanup func docs, lints (#842)
this also fixes new rust version lints
2023-08-28 09:07:29 +08:00
Lucas
b3fb720a94
Retrieve function source description from comments (#829)
If a PostgreSQL function has an SQL comment, it will try to parse as
JSON and use its values to override the auto-generated TileJSON. It is
recommended to use this form when creating comments to ensure valid JSON
values.

```sql
DO $do$ BEGIN
    EXECUTE 'COMMENT ON FUNCTION YOUR_FUNCTION (ARG1_TYPE,ARG2_TYPE,..ARGN_TYPE) IS $tj$' || $$
    {
      "description": "description override",
      ...
    }
    $$::json || '$tj$';
END $do$;
```

Partially implements #822
2023-08-27 16:46:56 +00:00
dependabot[bot]
9a5ba73b31
chore(deps): Bump tokio from 1.31.0 to 1.32.0 (#818)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.31.0 to 1.32.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/tokio/releases">tokio's
releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.32.0</h2>
<h3>Fixed</h3>
<ul>
<li>sync: fix potential quadradic behavior in
<code>broadcast::Receiver</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5925">#5925</a>)</li>
</ul>
<h3>Added</h3>
<ul>
<li>process: stabilize <code>Command::raw_arg</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5930">#5930</a>)</li>
<li>io: enable awaiting error readiness (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5781">#5781</a>)</li>
</ul>
<h3>Unstable</h3>
<ul>
<li>rt(alt): improve the scalability of alt runtime as the number of
cores grows (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5935">#5935</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/tokio/issues/5925">#5925</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5925">tokio-rs/tokio#5925</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5930">#5930</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5930">tokio-rs/tokio#5930</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5781">#5781</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5781">tokio-rs/tokio#5781</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5935">#5935</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5935">tokio-rs/tokio#5935</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a7d52c2fed"><code>a7d52c2</code></a>
chore: prepare Tokio v1.32.0 release (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5937">#5937</a>)</li>
<li><a
href="f5f2b58b8d"><code>f5f2b58</code></a>
rt: improve docs for Builder::max_blocking_threads (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5793">#5793</a>)</li>
<li><a
href="718dcc8dff"><code>718dcc8</code></a>
docs: BytesMut::with_capacity does not guarantee exact capacity (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5870">#5870</a>)</li>
<li><a
href="10e141d211"><code>10e141d</code></a>
io: add <code>Ready::ERROR</code> and report error readiness (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5781">#5781</a>)</li>
<li><a
href="6e42c26c80"><code>6e42c26</code></a>
rt(alt): tweak some constants to improve scalability (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5935">#5935</a>)</li>
<li><a
href="82bef00db4"><code>82bef00</code></a>
io: minor tweaks to <code>AsyncFd</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5932">#5932</a>)</li>
<li><a
href="40633fc678"><code>40633fc</code></a>
readme: list previous LTS releases (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5931">#5931</a>)</li>
<li><a
href="3dd5f7ae2e"><code>3dd5f7a</code></a>
sync: move broadcast waiters into separate list before waking (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5925">#5925</a>)</li>
<li><a
href="2c92cad9db"><code>2c92cad</code></a>
process: stabilize <code>Command::raw_arg</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5930">#5930</a>)</li>
<li><a
href="197757d440"><code>197757d</code></a>
streams: create StreamMock for testing Streams (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5915">#5915</a>)</li>
<li>See full diff in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-1.31.0...tokio-1.32.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.31.0&new-version=1.32.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-17 00:14:40 -04:00
rstanciu
720b682b7e
Add flat hashing table format (#808)
* Add `MbtType::FlatWithHash`
* Support copying, diffing and applying diffs to and from any
`MbtTypes`s
* Support validating tile data if hash is contained in `*.mbtiles` file
(i.e it is of `MbtType::FlatWithHash` or `MbtType::Normalized`)

---------

Co-authored-by: rstanciu <rstanciu@rivian.com>
Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com>
2023-08-16 10:22:01 -07:00
dependabot[bot]
7b765af89d
chore(deps): Bump tokio from 1.30.0 to 1.31.0 (#806)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.30.0 to 1.31.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/tokio/releases">tokio's
releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.31.0</h2>
<h3>Fixed</h3>
<ul>
<li>io: delegate <code>WriteHalf::poll_write_vectored</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5914">#5914</a>)</li>
</ul>
<h3>Unstable</h3>
<ul>
<li>rt(unstable): fix memory leak in unstable next-gen scheduler
prototype (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5911">#5911</a>)</li>
<li>rt: expose mean task poll time metric (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5927">#5927</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/tokio/issues/5914">#5914</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5914">tokio-rs/tokio#5914</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5911">#5911</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5911">tokio-rs/tokio#5911</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5927">#5927</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5927">tokio-rs/tokio#5927</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8b8005ebdd"><code>8b8005e</code></a>
chore: prepare Tokio v1.31.0 release (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5928">#5928</a>)</li>
<li><a
href="6cb106c353"><code>6cb106c</code></a>
rt: unstable EWMA poll time metric (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5927">#5927</a>)</li>
<li><a
href="dd23f08c3a"><code>dd23f08</code></a>
rt(alt): fix memory leak and increase max preemption when running Loom
CI tes...</li>
<li><a
href="5d29bdfb0c"><code>5d29bdf</code></a>
io: delegate <code>WriteHalf::poll_write_vectored</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5914">#5914</a>)</li>
<li>See full diff in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-1.30.0...tokio-1.31.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.30.0&new-version=1.31.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-15 14:44:01 -04:00
dependabot[bot]
d878189881
chore(deps): Bump tokio from 1.29.1 to 1.30.0 (#798)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.29.1 to 1.30.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/tokio/releases">tokio's
releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.30.0</h2>
<h1>1.30.0 (August 9, 2023)</h1>
<p>This release bumps the MSRV of Tokio to 1.63. (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5887">#5887</a>)</p>
<h3>Changed</h3>
<ul>
<li>tokio: reduce LLVM code generation (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5859">#5859</a>)</li>
<li>io: support <code>--cfg mio_unsupported_force_poll_poll</code> flag
(<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5881">#5881</a>)</li>
<li>sync: make <code>const_new</code> methods always available (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5885">#5885</a>)</li>
<li>sync: avoid false sharing in mpsc channel (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5829">#5829</a>)</li>
<li>rt: pop at least one task from inject queue (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5908">#5908</a>)</li>
</ul>
<h3>Added</h3>
<ul>
<li>sync: add <code>broadcast::Sender::new</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5824">#5824</a>)</li>
<li>net: implement <code>UCred</code> for espidf (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5868">#5868</a>)</li>
<li>fs: add <code>File::options()</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5869">#5869</a>)</li>
<li>time: implement extra reset variants for <code>Interval</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5878">#5878</a>)</li>
<li>process: add <code>{ChildStd*}::into_owned_{fd, handle}</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5899">#5899</a>)</li>
</ul>
<h3>Removed</h3>
<ul>
<li>tokio: removed unused <code>tokio_*</code> cfgs (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5890">#5890</a>)</li>
<li>remove build script to speed up compilation (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5887">#5887</a>)</li>
</ul>
<h3>Documented</h3>
<ul>
<li>sync: mention lagging in docs for <code>broadcast::send</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5820">#5820</a>)</li>
<li>runtime: expand on sharing runtime docs (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5858">#5858</a>)</li>
<li>io: use vec in example for <code>AsyncReadExt::read_exact</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5863">#5863</a>)</li>
<li>time: mark <code>Sleep</code> as <code>!Unpin</code> in docs (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5916">#5916</a>)</li>
<li>process: fix <code>raw_arg</code> not showing up in docs (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5865">#5865</a>)</li>
</ul>
<h3>Unstable</h3>
<ul>
<li>rt: add runtime ID (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5864">#5864</a>)</li>
<li>rt: initial implementation of new threaded runtime (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5823">#5823</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/tokio/issues/5820">#5820</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5820">tokio-rs/tokio#5820</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5823">#5823</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5823">tokio-rs/tokio#5823</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5824">#5824</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5824">tokio-rs/tokio#5824</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5829">#5829</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5829">tokio-rs/tokio#5829</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5858">#5858</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5858">tokio-rs/tokio#5858</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5859">#5859</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5859">tokio-rs/tokio#5859</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5863">#5863</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5863">tokio-rs/tokio#5863</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5864">#5864</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5864">tokio-rs/tokio#5864</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5865">#5865</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5865">tokio-rs/tokio#5865</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5868">#5868</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5868">tokio-rs/tokio#5868</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5869">#5869</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5869">tokio-rs/tokio#5869</a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4c220af777"><code>4c220af</code></a>
chore: prepare Tokio v1.30.0 release (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5917">#5917</a>)</li>
<li><a
href="0a631f88e8"><code>0a631f8</code></a>
process: add <code>{ChildStd*}::into_owned_{fd, handle}</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5899">#5899</a>)</li>
<li><a
href="ee44dc98d8"><code>ee44dc9</code></a>
ci: fix MIRI tests (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5919">#5919</a>)</li>
<li><a
href="51cffbb74f"><code>51cffbb</code></a>
time: mark <code>Sleep</code> as <code>!Unpin</code> in docs (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5916">#5916</a>)</li>
<li><a
href="8832e936b1"><code>8832e93</code></a>
rt(alt): fix a number of concurrency bugs (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5907">#5907</a>)</li>
<li><a
href="dbda2045f1"><code>dbda204</code></a>
time: implement extra reset variants for <code>Interval</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5878">#5878</a>)</li>
<li><a
href="7c54fdce3e"><code>7c54fdc</code></a>
rt: pop at least one task from inject queue (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5908">#5908</a>)</li>
<li><a
href="38d1bcd9df"><code>38d1bcd</code></a>
sync: avoid false sharing in mpsc channel (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5829">#5829</a>)</li>
<li><a
href="52e6510215"><code>52e6510</code></a>
runtime: fix flaky test <code>wake_while_rt_is_dropping</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5905">#5905</a>)</li>
<li><a
href="e5e88551d2"><code>e5e8855</code></a>
Update CI config (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5893">#5893</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-1.29.1...tokio-1.30.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.29.1&new-version=1.30.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-10 15:50:13 -04:00
baishikele
e1f7436d62
Debian package (#730)
Add deb package  by [cargo-deb](https://crates.io/crates/cargo-deb)
- [ ] add deb package metadata
- [ ] more research on systemd integration

To inspect the package:
```shell
# install cargo-deb dependices
sudo apt install dpkg
sudo apt install dpkg-dev
sudo apt install liblzma-dev

cargo install cargo-deb
cd martin
cargo deb
The Debian package will be created in `target/debian/martin_0.8.7_amd64.deb` . 
```

To decompress this package:
```shell
dpkg -x martin_0.8.7_amd64.deb path_of_decompress  
```

---------

Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com>
2023-07-10 18:38:48 +00:00
Yuri Astrakhan
4664d5ad8a update lock, minor toml sort cleanup 2023-07-05 20:56:23 -04:00
Yuri Astrakhan
144e10ff20
Upgrade sqlx to v0.7 (#743)
This is mostly a noop, just updating to the new way of storing cached
queries and a few other changes per
https://github.com/launchbadge/sqlx/blob/main/CHANGELOG.md#070---2023-06-30

Note that this uses some of the code from #729 (thanks @upsicleclown !)

A minor unrelated change - a reformat of `martin/release.toml`
2023-07-04 08:05:23 -04:00
Pirmin Kalberer
aabcb0aa0a
Add sqlx-rustls support (#720)
I'd like to add optional rustls support for SQLx. This PR implements the
required features, but tests using `--all-features` fail, because
runtime selection features are not additive. I didn't find a solution
apart from avoiding `--all-features`.

---------

Co-authored-by: Yuri Astrakhan <YuriAstrakhan@gmail.com>
2023-07-03 21:29:44 +00:00
dependabot[bot]
8f74a6881a
chore(deps): Bump tokio from 1.29.0 to 1.29.1 (#736)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.29.0 to 1.29.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/tokio/releases">tokio's
releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.29.1</h2>
<h3>Fixed</h3>
<ul>
<li>rt: fix nesting two <code>block_in_place</code> with a
<code>block_on</code> between (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5837">#5837</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/tokio/issues/5837">#5837</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5837">tokio-rs/tokio#5837</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1b1b9dc7e3"><code>1b1b9dc</code></a>
chore: prepare Tokio v1.29.1 release</li>
<li><a
href="012c848401"><code>012c848</code></a>
rt: fix nesting block_in_place with block_on (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5837">#5837</a>)</li>
<li>See full diff in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-1.29.0...tokio-1.29.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.29.0&new-version=1.29.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-30 03:36:18 +00:00
dependabot[bot]
fbbd5025b1
chore(deps): Bump tokio from 1.28.2 to 1.29.0 (#733)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.28.2 to 1.29.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/tokio/releases">tokio's
releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.29.0</h2>
<p>Technically a breaking change, the <code>Send</code> implementation
is removed from
<code>runtime::EnterGuard</code>. This change fixes a bug and should not
impact most users.</p>
<h3>Breaking</h3>
<ul>
<li>rt: <code>EnterGuard</code> should not be <code>Send</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5766">#5766</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>fs: reduce blocking ops in <code>fs::read_dir</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5653">#5653</a>)</li>
<li>rt: fix possible starvation (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5686">#5686</a>,
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5712">#5712</a>)</li>
<li>rt: fix stacked borrows issue in <code>JoinSet</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5693">#5693</a>)</li>
<li>rt: panic if <code>EnterGuard</code> dropped incorrect order (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5772">#5772</a>)</li>
<li>time: do not overflow to signal value (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5710">#5710</a>)</li>
<li>fs: wait for in-flight ops before cloning <code>File</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5803">#5803</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>rt: reduce time to poll tasks scheduled from outside the runtime (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5705">#5705</a>,
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5720">#5720</a>)</li>
</ul>
<h3>Added</h3>
<ul>
<li>net: add uds doc alias for unix sockets (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5659">#5659</a>)</li>
<li>rt: add metric for number of tasks (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5628">#5628</a>)</li>
<li>sync: implement more traits for channel errors (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5666">#5666</a>)</li>
<li>net: add nodelay methods on TcpSocket (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5672">#5672</a>)</li>
<li>sync: add <code>broadcast::Receiver::blocking_recv</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5690">#5690</a>)</li>
<li>process: add <code>raw_arg</code> method to <code>Command</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5704">#5704</a>)</li>
<li>io: support PRIORITY epoll events (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5566">#5566</a>)</li>
<li>task: add <code>JoinSet::poll_join_next</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5721">#5721</a>)</li>
<li>net: add support for Redox OS (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5790">#5790</a>)</li>
</ul>
<h3>Unstable</h3>
<ul>
<li>rt: add the ability to dump task backtraces (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5608">#5608</a>,
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5676">#5676</a>,
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5708">#5708</a>,
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5717">#5717</a>)</li>
<li>rt: instrument task poll times with a histogram (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5685">#5685</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/tokio/issues/5766">#5766</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5766">tokio-rs/tokio#5766</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5653">#5653</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5653">tokio-rs/tokio#5653</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5686">#5686</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5686">tokio-rs/tokio#5686</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5712">#5712</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5712">tokio-rs/tokio#5712</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5693">#5693</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5693">tokio-rs/tokio#5693</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5772">#5772</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5772">tokio-rs/tokio#5772</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5710">#5710</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5710">tokio-rs/tokio#5710</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5803">#5803</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5803">tokio-rs/tokio#5803</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5705">#5705</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5705">tokio-rs/tokio#5705</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5720">#5720</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5720">tokio-rs/tokio#5720</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5659">#5659</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/5659">tokio-rs/tokio#5659</a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="48c55768fd"><code>48c5576</code></a>
chore: prepare Tokio v1.29.0 release (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5826">#5826</a>)</li>
<li><a
href="657fd883d2"><code>657fd88</code></a>
task: add guarantee about when a spawned task may be polled (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5816">#5816</a>)</li>
<li><a
href="6b076a2743"><code>6b076a2</code></a>
fs: wait for in-flight ops before cloning <code>File</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5803">#5803</a>)</li>
<li><a
href="910a1e2fcf"><code>910a1e2</code></a>
io: fix <code>futures_io::AsyncSeek</code> implementaion for
<code>Compat</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5783">#5783</a>)</li>
<li><a
href="6d25a00145"><code>6d25a00</code></a>
fs: update cfg attr in <code>fs::read_dir</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5806">#5806</a>)</li>
<li><a
href="78bf8a9e5e"><code>78bf8a9</code></a>
sync: replace Poll::Ready with Ready (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5815">#5815</a>)</li>
<li><a
href="b8af5aad16"><code>b8af5aa</code></a>
task: add spawn_blocking methods to JoinMap (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5797">#5797</a>)</li>
<li><a
href="2e62374e4a"><code>2e62374</code></a>
rt: pad the task struct to avoid false sharing (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5809">#5809</a>)</li>
<li><a
href="56c4365584"><code>56c4365</code></a>
tokio: improve taskdump documentation (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5805">#5805</a>)</li>
<li><a
href="fb0d305a7a"><code>fb0d305</code></a>
ci: build tokio for redox-os (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/5800">#5800</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-1.28.2...tokio-1.29.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.28.2&new-version=1.29.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-28 02:14:48 -04:00
Yuri Astrakhan
71f9ee6c7d Ver bump, doc cleanup, readying for release 2023-06-22 23:24:31 -04:00
Yuri Astrakhan
a187e6e1da cleanup cargo optional dep: in features 2023-06-16 19:31:51 -04:00
Yuri Astrakhan
a5c5505713
Add dynamic sprites support (#715)
Dynamically create image sprites for MapLibre rendering, given a
directory with images.

### TODO
* [x] Work with @flother to merge these PRs
  * [x] https://github.com/flother/spreet/pull/59  (must have)
  * [x] https://github.com/flother/spreet/pull/57
  * [x] https://github.com/flother/spreet/pull/56
* [ ] https://github.com/flother/spreet/pull/62 (not required but nice
to have, can upgrade later without any code changes)
* [x] Add docs to the book
* [x] Add CLI param, e.g. `--sprite <dir_path>`
* [x] Don't output `.sprites` in auto-genned config when not in use

### API
Per [MapLibre sprites
API](https://maplibre.org/maplibre-style-spec/sprite/), we need to
support the following:
* `/sprite/<sprite_id>.json` metadata about the sprite file - all coming
from a single directory
* `/sprite/<sprite_id>.png` all images combined into a single PNG
* `/sprite/<sprite_id>@2x.json` same but for high DPI devices
* `/sprite/<sprite_id>@2x.png`

Multiple sprite_id values can be combined into one sprite with the same
pattern as for tile joining:
`/sprite/<sprite_id1>,<sprite_id2>,...,<sprite_idN>[.json|.png|@2x.json|@2x.png]`.
No ID renaming is done, so identical names will override one another.

### Configuration
[Config file](https://maplibre.org/martin/config-file.html) and possibly
CLI should have a simple option to serve sprites. The configuration may
look similar to how mbtiles and pmtiles are configured:

```yaml
# Publish sprite images
sprites:
  paths:
    # scan this whole dir, matching all image files, and publishing it as "my_images" sprite source
    - /path/to/my_images
  sources:
    # named source matching source name to a directory
    my_sprites: /path/to/some_dir
```

Implement #705
2023-06-16 08:19:47 -04:00
Yuri Astrakhan
99ea3ff9a2 Disable mbtiles default features, reserve keywords 2023-06-14 16:42:31 -04:00
Yuri Astrakhan
b147c27380
Move Martin crate to its own subdir (#699)
This cleans up the code a bit, making all crates to be on the same
level.
2023-06-04 02:50:55 +00:00
Yuri Astrakhan
2cdd373044
Refactor mbtiles lib, mbtiles tool tests & CI (#702)
* Broke up martin-mbtiles into multiple files
* Made all mbtiles functions take a `SqliteExecutor` -- this way they
can be used with any SQLX connection structs - either a pool connection
or an individual non-pooled connection.
* Simplified mbtiles bin a bit - I realized there is really no need to
pretty print the output for the single value retrieval. Easier to just
dump it to console as is.
* Bump martin-mbtiles to v0.2.0
* Minor fixes in tools docs, cargo.toml, and justfile
* MBTiles tool Integration tests and release publishing

Major thanks to the
[stackoverflow](https://stackoverflow.com/questions/76394665/how-to-pass-sqlx-connection-a-mut-trait-as-a-fn-parameter-in-rust/76395111)
quick reply by @cafce25 on how to use generic sql executor!
2023-06-04 00:54:50 +02:00
rstanciu
78e67c3ad2
Add mbtiles meta-get utility (#701)
* Add functionality to retrieve a metadata value in an mbtiles file by
key; simple implementation for one of the items in #667
* Also, disable TTY in docker-up `just` target
2023-06-03 00:40:22 +00:00
Yuri Astrakhan
21e1efc9a3
Implement rudimentary mbtiles binary (#696)
This will be the entry point for #667
2023-06-01 10:13:20 -04:00
Yuri Astrakhan
18770664e1
Consolidate all crate dependencies (#694)
This moves all dependency version management to one location
2023-06-01 09:05:06 -04:00
Yuri Astrakhan
44424730d2 Bump deps, prep v0.8.4 release 2023-05-25 12:03:14 -04:00
dependabot[bot]
843c21050d
chore(deps): Bump criterion from 0.4.0 to 0.5.0 (#673)
Bumps [criterion](https://github.com/bheisler/criterion.rs) from 0.4.0
to 0.5.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md">criterion's
changelog</a>.</em></p>
<blockquote>
<h2>[0.5.0] - 2023-05-23</h2>
<h3>Changed</h3>
<ul>
<li>Replaced lazy_static dependency with once_cell</li>
<li>Improved documentation of the <code>html_reports</code> feature</li>
<li>Replaced atty dependency with is-terminal</li>
<li>MSRV bumped to 1.64</li>
<li>Upgraded clap dependency to v4</li>
<li>Upgraded tempfile dependency to v3.5.0</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Quick mode (<code>--quick</code>) no longer outputs 1ms for measured
times over 5 seconds</li>
<li>Documentation updates</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4a560cb8d8"><code>4a560cb</code></a>
release version 0.5 (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/683">#683</a>)</li>
<li><a
href="3e2849ebf8"><code>3e2849e</code></a>
Post v0.4 CHANGELOG updates (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/680">#680</a>)</li>
<li><a
href="637010e50d"><code>637010e</code></a>
Bump clap to version 4 (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/679">#679</a>)</li>
<li><a
href="39d7e2f954"><code>39d7e2f</code></a>
Update to tempfile 3.5 (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/675">#675</a>)</li>
<li><a
href="8ab2752ccf"><code>8ab2752</code></a>
Fix typo in known_limitations.md (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/674">#674</a>)</li>
<li><a
href="a2112308ef"><code>a211230</code></a>
chore: replace atty with is-terminal (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/628">#628</a>)</li>
<li><a
href="a844eb226b"><code>a844eb2</code></a>
Bump MSRV to 1.60 for csv dependency (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/665">#665</a>)</li>
<li><a
href="2f53607378"><code>2f53607</code></a>
Use OR operator to specify multiple licenses (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/643">#643</a>)</li>
<li><a
href="86dcd7d323"><code>86dcd7d</code></a>
Fix bug where time over the maximum would be reported as 1ms in quick
mode. (...</li>
<li><a
href="2942aee124"><code>2942aee</code></a>
Remove unnecessary <code>pub</code> from example code (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/657">#657</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/bheisler/criterion.rs/compare/0.4.0...0.5.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=criterion&package-manager=cargo&previous-version=0.4.0&new-version=0.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-24 03:32:10 +00:00
Yuri Astrakhan
88677395a6 bump to 0.8.3, dep updates 2023-05-22 19:04:55 -04:00
Yuri Astrakhan
34d16d28fc Release 0.8.2 2023-05-09 16:45:55 -04:00
dependabot[bot]
15e60d14a6
chore(deps): Bump ctor from 0.1.26 to 0.2.0 (#617)
Bumps [ctor](https://github.com/mmastrac/rust-ctor) from 0.1.26 to
0.2.0.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/mmastrac/rust-ctor/commits">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ctor&package-manager=cargo&previous-version=0.1.26&new-version=0.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-28 20:08:13 -04:00
Yuri Astrakhan
c591658f8f crate publishing 2023-03-25 14:48:28 -04:00
Yuri Astrakhan
0ffd712927 bump versions, update lock 2023-03-25 14:41:52 -04:00
Yuri Astrakhan
9cd71476db
Prepare for sub-crate publish, detection bug fix (#615)
* tile format detection would crash on a rare edge case
* add some formatting and info about utils and mbtiles crates
2023-03-25 18:37:42 +00:00
Yuri Astrakhan
50462d5fbc
[breaking] Use table name as the layer ID for PG tables (#598)
* [BREAKING] Use source ID (table name) as the default layer ID, instead
of `schema.table.column`
* Add support for the optional `layer_id` table config parameter

Fix #595
2023-03-13 07:41:25 -04:00
Yuri Astrakhan
e92722708f
PG TileJSON changes, add vector_layers (#584)
* make tilejson's `name` be the same as the ID of the source (even if
aliased)
* `/catalog` will always show ID, but now it will hide the `name` if it
is the same as the `id`
* make `description` be the longer version, e.g. `public.table.column`
format - not guaranteed to be stable
* make `vector_layers` have the fields auto-discovered in the PG table
* preserve the order of the serialized json fields

Fixes #583
2023-02-22 16:25:48 +00:00
Yuri Astrakhan
3fcad46500
fix (re-)compression of images (#579)
Compression middleware turned out to be hard to use for image cases - it
simply looks at the content-encoding, and if not set, tries to compress
if accepted by the client.

Instead, now individual routes are configured with either that
middleware, or for tiles, I decompress and optionally recompress if
applicable.

Now encoding is tracked separately from the tile content, making it
cleaner too. Plus lots of tests for mbtiles & pmtiles.

Fixes #577
2023-02-20 10:44:22 -05:00
Yuri Astrakhan
2d2ede550e release 0.7.0 2023-02-16 20:46:21 -05:00
Yuri Astrakhan
9de4b75aec
Switch bb8 to DeadPool (#570)
DeadPool seem to be better maintained, and most importantly, it properly
reports connection errors - something bb8 does not support yet.

I also removed connection timeout config param - it was introduced while
trying to solve bb8 issue - not needed because connection string
supports it already.

This should resolve some of the issues in #496
2023-02-08 11:55:37 -05:00
Yuri Astrakhan
fbb282dcb7
Improve SSL support (#567)
This is a partial fix for #496

* BREAKING: Now Martin behaves the same way as `psql` -- by default, if
SSL is available on the server, it will be used, even though it will not
verify that the server has a valid SSL certificate
* Martin now understands `PGSSLCERT`, `PGSSLKEY`, and `PGSSLROOTCERT`
env vars (and corresponding config keys) - same as psql.
* Martin can now process `?sslmode=verify-ca` and `verify-full` (just
like psql). The verify modes require root and/or client cert & key.
* remove `danger_accept_invalid_certs` -- turns out that behavior is
expected by default unless ssl mode is set to verify - which upstream
lib [does not
support](https://github.com/sfackler/rust-postgres/issues/768) - PR
[submitted](https://github.com/sfackler/rust-postgres/pull/988).
* added connection_timeout_ms option for postgres and set it to 5
seconds by default. This way it will fail out earlier.
* added error reporting to bb8 - but it is currently [broken
upstream](https://github.com/djc/bb8/issues/151) - not sure we can fix
it easily, so may need to switch to deadpool later.
* added docker-based TLS test (horray!) - wasn't trivial at all, despite
ending up fairly simple.
2023-02-06 14:32:28 -05:00
dependabot[bot]
bea985cb2a
chore(deps): Bump indoc from 1.0.8 to 2.0.0 (#561)
Bumps [indoc](https://github.com/dtolnay/indoc) from 1.0.8 to 2.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/indoc/releases">indoc's
releases</a>.</em></p>
<blockquote>
<h2>2.0.0</h2>
<ul>
<li>Change handling of final newline at zero levels of indentation (<a
href="https://github-redirect.dependabot.com/dtolnay/indoc/issues/55">#55</a>)</li>
<li>Add <a
href="https://docs.rs/indoc/2/indoc/macro.concatdoc.html"><code>concatdoc!</code></a>
macro (<a
href="https://github-redirect.dependabot.com/dtolnay/indoc/issues/56">#56</a>)</li>
<li>Raise oldest supported rustc to 1.56</li>
</ul>
<h2>1.0.9</h2>
<ul>
<li>Fix parsing of some edge cases involving angle brackets in
writedoc's expr argument (<a
href="https://github-redirect.dependabot.com/dtolnay/indoc/issues/54">#54</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="bbbec14e9d"><code>bbbec14</code></a>
Release 2.0.0</li>
<li><a
href="24a804e0cf"><code>24a804e</code></a>
Add concatdoc docs</li>
<li><a
href="476b937436"><code>476b937</code></a>
Delete paths from .cargo/config</li>
<li><a
href="b5fb2dc83f"><code>b5fb2dc</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/dtolnay/indoc/issues/57">#57</a>
from dtolnay/fromstr</li>
<li><a
href="623d666afa"><code>623d666</code></a>
Replace TokenStream::from_str with Literal::from_str</li>
<li><a
href="28d6d25d20"><code>28d6d25</code></a>
Switch to 2021 edition</li>
<li><a
href="46d38c0fcd"><code>46d38c0</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/dtolnay/indoc/issues/56">#56</a>
from dtolnay/concat</li>
<li><a
href="4fec8a91e9"><code>4fec8a9</code></a>
Add concatdoc macro</li>
<li><a
href="1f705293a5"><code>1f70529</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/dtolnay/indoc/issues/55">#55</a>
from dtolnay/trailing</li>
<li><a
href="31694b5dca"><code>31694b5</code></a>
Preserve last newline even if not indented</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/indoc/compare/1.0.8...2.0.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=indoc&package-manager=cargo&previous-version=1.0.8&new-version=2.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-31 13:49:43 +02:00
Yuri Astrakhan
9e5ed2fc02
Add .mbtiles support (#549)
Adds a new [.mbtiles](https://github.com/mapbox/mbtiles-spec/blob/master/1.3/spec.md)
backend, without the grid support. Uses extensive tile content
detection, i.e. if the content is gzipped, png, jpeg, gif, webp.

From CLI, can be as easy as adding a path to a directory that contains a
.mbtiles file (works just like pmtiles support)

```bash
# All *.mbtiles files in this dir will be published.
# The filename will be used as the source ID
martin ./tests/fixtures
```

From configuration file, the path can be specified in a number of ways
(same as pmtiles)

```yaml
mbtiles:
  paths:
    # scan this whole dir, matching all *.mbtiles files
    - /dir-path
    # specific mbtiles file will be published as mbtiles2 source
    - /path/to/mbtiles2.mbtiles
  sources:
      # named source matching source name to a single file
      pm-src1: /tmp/mbtiles.mbtiles
      # named source, where the filename is explicitly set. This way we will be able to add more options later
      pm-src2:
        path: /tmp/mbtiles.mbtiles
```

Fixes #494
2023-01-09 00:10:23 -05:00
Yuri Astrakhan
ba65e34bef
Add .pmtiles file support (#517)
Merge after #548 

Adds a new [.pmtiles](https://protomaps.com/docs/pmtiles/) backend.
Supports all formats like png, vector, etc.

From CLI, can be as easy as adding a path to a directory that contains a
.pmtiles file:

```bash
# All *.pmtiles files in this dir will be published.
# The filename will be used as the source ID
martin ./tests/fixtures
```

From configuration file, the path can be specified in a number of ways:

```yaml
pmtiles:
  paths:
    # scan this whole dir, matching all *.pmtiles files
    - /dir-path
    # specific pmtiles file will be published as pmtiles2 source
    - /path/to/pmtiles2.pmtiles
  sources:
      # named source matching source name to a single file
      pm-src1: /tmp/pmtiles.pmtiles
      # named source, where the filename is explicitly set. This way we will be able to add more options later
      pm-src2:
        path: /tmp/pmtiles.pmtiles
```

Fixes #508
2023-01-08 14:19:11 -05:00
Yuri Astrakhan
555a1fccdd
Improve Coverage tooling (#535)
* added manual coverage justfile command
* a lot of small refactorings of config and argument parsing
* feature: support jsonb query param for functions
* cleaned up public/private access
* make all tests populate with a predefined values to avoid issues with
random data
2022-12-27 06:56:27 +00:00
Yuri Astrakhan
3a713a0269 update martin version to 0.7.0-alpha 2022-12-23 17:38:20 -05:00
Yuri Astrakhan
2b240b3a34
Implement multi-sourced postgres (#511)
* Support `postgres` config key to be either a list or an object
* Use `PathBuf` instead of `String` where dealing with files
* Merge `SrvConfigBuilder` into `SrvConfig`
* Parse keep_alive as u64
* More config tests
2022-12-22 06:35:29 +00:00
Yuri Astrakhan
126005bea0 bump to 0.6.2 2022-12-13 20:14:07 -05:00
Yuri Astrakhan
bc78cf019d
Strongly-type errors, fix bounds escaping (#516)
* Since this is a library, all errors should have a strongly typed enum.
* table bounds computing function was not escaping identifiers
* table bounds computation was also silently ignoring all errors
2022-12-13 12:02:38 +02:00
Yuri Astrakhan
2ee517d135
Support z,x,y and record-returning funcs, table rework (#380)
Can now handle several additional Postgres functions to get a tile, plus
tons of small fixes

### Multiple result variants
* `getmvt(z,x,y) -> [bytea,md5]`  (single row with two columns)
* `getmvt(z,x,y) -> [bytea]` (single row with a single column)
* `getmvt(z,x,y) -> bytea` (value)

### Multiple input parameter variants
* `getmvt(z, x, y)` or `getmvt(zoom, x, y)` (all 3 vars must be
integers)
* `getmvt(z, x, y, url_query)`, where instead of `url_query` it could be
any other name, but must be of type JSON

### Breaking
* srid is now the same type as PG -- `i32`
* renamed config vals `table_sources` and `function_sources` into
`tables` and `functions`

### Features and fixes
* if postgis is v3.1+, uses margin parameter to extend the search box by
the size of the buffer. I think we should make 3.1 minimal required.
* fixes feature ID issue from #466
* fixes mixed case names for schemas, tables and columns, functions and
parameter names per #389
 

### Notes
* More dynamic SQL generation in code instead of using external SQL
files. Those should only be used when they are not parametrized.
* The new function/table discovery mechanism: query for all functions in
the database, and match up those functions with the ones configured (if
any), plus adds all the rest of the un-declared ones if discovery mode
is on.
* During table and function discovery, the code generates a map of
`(PgSqlInfo, FunctionInfo)` (or table) tupples containing SQL needed to
get the tile.
* Auto-discovery mode is currently hidden - the discovery is on only
when no tables or functions are configured. TBD - how to configure it in
the future
* The new system allows for an easy way to auto-discover for the
specific schemas only, solving #47
* predictable order of table/function instantiation
* bounding boxes computed in parallel for all tables (when not
configured)
* proper identifier escaping
* test cleanup

fixes #378
fixes #466
fixes #65
fixes #389
2022-12-10 16:20:42 +02:00
Yuri Astrakhan
ff7c31e16f
Improve pre-push hook and debug page (#509)
* write custom git pre-push via justfile
* fix tests/debug.html incorrectly loading test page
* minor cleanup of the obsolete just targets
2022-12-10 09:40:01 +02:00
dependabot[bot]
329b9e8236
chore(deps): bump env_logger from 0.9.3 to 0.10.0 (#493)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.9.3 to
0.10.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md">env_logger's
changelog</a>.</em></p>
<blockquote>
<h2>[0.10.0] - 2022-11-24</h2>
<p>MSRV changed to 1.60 to hide optional dependencies</p>
<h3>Fixes</h3>
<ul>
<li>Resolved soundness issue by switching from <code>atty</code> to
<code>is-terminal</code></li>
</ul>
<h3>Breaking Changes</h3>
<p>To open room for changing dependencies:</p>
<ul>
<li>Renamed <code>termcolor</code> feature to <code>color</code></li>
<li>Renamed <code>atty</code> feature to <code>auto-color</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ff029fa8b6"><code>ff029fa</code></a>
chore: Release</li>
<li><a
href="389cc52d5a"><code>389cc52</code></a>
docs: Fix changelog links</li>
<li><a
href="2979c4b7b8"><code>2979c4b</code></a>
docs: Update changelog</li>
<li><a
href="4c379170f7"><code>4c37917</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/rust-cli/env_logger/issues/248">#248</a>
from epage/atty</li>
<li><a
href="d55d26980f"><code>d55d269</code></a>
style: Make clippy happy</li>
<li><a
href="066c2192c1"><code>066c219</code></a>
fix: Replace atty with is_terminal</li>
<li><a
href="4db5e87931"><code>4db5e87</code></a>
fix!: Rename termcolor/atty features</li>
<li><a
href="660cf7feb2"><code>660cf7f</code></a>
fix: Bump MSRV to 1.60.0</li>
<li><a
href="e572d04872"><code>e572d04</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/rust-cli/env_logger/issues/244">#244</a>
from epage/update</li>
<li><a
href="f1ff331fa2"><code>f1ff331</code></a>
docs: Fix typos</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-cli/env_logger/compare/v0.9.3...v0.10.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=env_logger&package-manager=cargo&previous-version=0.9.3&new-version=0.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-26 21:34:49 -05:00
Yuri Astrakhan
66b7fdc4ea
Multi-source support, new path structure (#456)
Partial implementation of the #430

* New endpoint structure:
  * `GET /` -- a placeholder for the future home page
* `GET /catalog` -- get a list of available sources, as a list of json
blobs.
* `[{id, name, description, attribution, vector_layer}, ...]` (some
fields might be missing)
* `GET /<id>` -- get tilejson for the given source, or a combination of
sources. No `.json` extension
  * `GET /<id>/<z>/<x>/<y>` -- get a tile. No format extension.
  * `GET /health` -- healthcheck
* Introduce a new tile format support crate (using code from the
maplibre/mbtileserve project)
* Removed the `/rpc/...` routes - all source IDs are accessed in the
same way
* Can print auto-generated configuration or save it to a file
* Refactored to support multiple sources from multiple backends, with a
proper naming conflict resolution

TODO:
* benchmarks need to be rewritten - they were relying on some internal
structures that are no longer there. This might be done as a separate PR
due to a very different internal architecture - might need to rethink
benchmarking approaches.
2022-11-26 04:46:40 -05:00