* Add justfile to simplify running all the tests
* Save all PBF outputs to the text files
* Consolidate all tests to reuse the same code
* Consolidate database initialization
* updated readme with the new instructions
Note that while this PR creates "expected" files, the CI cannot validate
the generated results because the output is not stable. Eventually we
may try to output just the non-geometry values to have reasonable tests
comparing against the expected results.
This PR re-uses some ideas by @gbip from #448
* move all CI github workflow tests into the dedicated shell scripts
* consolitade two database initialization scripts into one
* Detect all unrecognized config file values, and report them. Ideally
we want to use `serde-ignored` crate, but it doesn't work with flattened
structs (yet). So using a bad workaround.
* CI test has been using all sorts of somewhat duplicated temporary pbf
files - cleaned up to `tmp.pbf`, and made sure curl only shows errors,
not download stats.
* In CI, crash psql instead of silently ignoring errors
* Don't serialize optional config values as nulls
* Tiny error message cleanup
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.13 to
0.9.14.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/serde-yaml/releases">serde_yaml's
releases</a>.</em></p>
<blockquote>
<h2>0.9.14</h2>
<ul>
<li>Implement <code>Deserializer</code> for <code>TaggedValue</code> and
<code>&TaggedValue</code> (<a
href="https://github-redirect.dependabot.com/dtolnay/serde-yaml/issues/339">#339</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8948d368c0"><code>8948d36</code></a>
Release 0.9.14</li>
<li><a
href="8d95125eed"><code>8d95125</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/dtolnay/serde-yaml/issues/339">#339</a>
from dtolnay/deserializertaggedvalue</li>
<li><a
href="371f764d32"><code>371f764</code></a>
Implement Deserializer for TaggedValue and &TaggedValue</li>
<li><a
href="c5523fe475"><code>c5523fe</code></a>
Replace nonstandard SError name used only in Value Deserialize</li>
<li><a
href="516fdff567"><code>516fdff</code></a>
Ignore uninlined_format_args pedantic clippy lint</li>
<li><a
href="31fa98e396"><code>31fa98e</code></a>
Pull in unsafe-libyaml 0.2.4</li>
<li>See full diff in <a
href="https://github.com/dtolnay/serde-yaml/compare/0.9.13...0.9.14">compare
view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_yaml&package-manager=cargo&previous-version=0.9.13&new-version=0.9.14)](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>
Migrates the HTML test files to use `maplibre-gl` instead of `mapbox-gl`. I kept the same version as in `tests/debug-maplibre.html` and used the Carto Positron style on `tests/debug.html` because it was the closet to Mapbox's light style.
* remove most of the utils:: and dev:: namespace usage
* rename `configure_db_source` to `configure_db_sources`
* use defaults from other table info objects (using the `..obj` syntax)
* use doc comments vs regular comment in a few places
* refactor server_test.rs to make it more readable and much shorter
* use a macro for identical code
* use a test_get() for identical GET request
* rename fn test_foo() into fn foo() for simplicity
A few minor simplifications in the config and appstate:
* default srid seems to be unused.
* simplify Config struct to have non-optional table and function sources. Ok to be empty.
* add a parsing unit test
* rename configs to distinct names for simplicity
I am making this as a separate PR to keep things easier -- the big upcoming PR will use a dynamic dispatch system for all types of sources
Getting ready for multi-backend system, where each backend would have its own configuration.
All 3 config structs (clap args, config, and configbuilder) are now separated into 3 files - the main one, one for service (actix stuff), and one for PostgreSQL.
The files have been moved to `/pg` and `/srv`, but otherwise the logic should be mostly intact.
* Use latest Clap-derive (currently v4rc, but should be public within a few days)
* reorganize configuration to streamline different config sources into one Config (using multiple ConfigBuilders)
Use attribute-based routing, and support HEAD requests (same as GET)
attribute routes are better because they keep route declaration (i.e. parameters) together with the code that uses it.
Note that I manually published [maplibre/martin:latest](https://hub.docker.com/r/maplibre/martin) to docker, so it might be able to pass CI ok. I have not looked deeply into the existing CI workflow - @stepankuzmin any suggestions on changes to that? The github actions are now setup
P.S. I am not certain what that whole `brew/tap` thing is - don't know enough about Macs