Skip to content

Commit 427a7bf

Browse files
committed
feat: production rework of package, services, CI, and packaging
Python package. Removes the defunct VesselFinder and MarineTraffic web scrapers (anti-bot walls and paywalls broke them; issue #81), keeping the local metadata database read path used by network_graph and examples. Fixes the latitude/longitude copy-paste bug in raster lookups, the bathymetry segment-boundary indexing bugs, the meaningless coordinate range assert, and local-timezone epoch parsing. Positional interpolation now routes lat/lon through projected space instead of interpolating raw degrees. Domain accepts MultiPolygon zones and gains Domain.from_geodataframe with CRS normalization (issue #133). visualize() accepts host and port parameters (issue #97) and is exported from the package root. SQL built from user-facing values is now bound or coerced, month identifiers are validated, and Postgres aggregation matches SQLite semantics. Version is read from package metadata, dropping the toml dependency. Dead modules, ignored parameters, commented-out blocks, and duplicate docstrings are gone. Rust workspace. All six pyfunctions now catch panics at the FFI boundary and raise Python exceptions, with real errors for empty input, unknown file types, and out-of-range timestamps. MMSI parsing no longer panics on malformed CSV rows and short rows are tolerated. The receiver flushes both message buffers on a timer and on shutdown so a crash cannot drop buffered data (issue #117). database_server is ported from removed nightly generator features to stable Rust, de-panicked on the request path, and unified on tungstenite 0.21. The WebAssembly client builds again, dead experiments and unused dependencies are removed, and wildcard dependency versions are pinned. Tests and CI. The suite runs green end to end (60 passed locally, PostgreSQL and TimescaleDB paths included). Multi-gigabyte raster download tests are opt-in via AISDB_RASTER_TESTS. The pipeline gains rust fmt/clippy/test and database_server jobs, a uv wheel-install smoke test guarding against the malformed-wheel regression, a docs build, and secret fallbacks; 32-bit wheel targets are dropped and deprecated actions replaced. Dependabot, CODEOWNERS, and a pull request template are added. Dependency bumps from PRs #114 and #160 are applied across all lockfiles. Packaging and docs. pyproject declares the real dependency set, Python 3.10 as the floor, a pinned maturin range, and consolidated pytest and coverage configuration. Raster archives are now served from this repository release assets instead of a university server. README, CONTRIBUTING, and SECURITY are rewritten to current practice.
1 parent 08830f7 commit 427a7bf

72 files changed

Lines changed: 6392 additions & 5901 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coveragerc

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @gabrielspadon

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Pull Request
2+
3+
## Summary
4+
5+
Describe what this pull request does and why it is needed.
6+
7+
## Changes
8+
9+
- List the main changes introduced by this pull request.
10+
11+
## Testing
12+
13+
Describe how the changes were tested (unit tests, integration tests, manual verification).
14+
15+
## Checklist
16+
17+
- [ ] I have read [CONTRIBUTING.md](../CONTRIBUTING.md) and followed the quality gates described there.
18+
- [ ] Rust changes pass `cargo fmt --check`, `cargo clippy`, and `cargo test` in the affected crates.
19+
- [ ] Python changes pass `pytest ./aisdb/tests/`.
20+
- [ ] All SQL statements are parameterized.
21+
- [ ] Documentation was updated where relevant.

.github/dependabot.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directories:
5+
- "/"
6+
- "/aisdb_lib"
7+
- "/receiver"
8+
- "/client_webassembly"
9+
- "/database_server"
10+
schedule:
11+
interval: "weekly"
12+
groups:
13+
cargo-dependencies:
14+
patterns:
15+
- "*"
16+
17+
- package-ecosystem: "npm"
18+
directories:
19+
- "/aisdb_web"
20+
- "/docs"
21+
schedule:
22+
interval: "weekly"
23+
groups:
24+
npm-dependencies:
25+
patterns:
26+
- "*"
27+
28+
- package-ecosystem: "pip"
29+
directory: "/"
30+
schedule:
31+
interval: "weekly"
32+
groups:
33+
python-dependencies:
34+
patterns:
35+
- "*"
36+
37+
- package-ecosystem: "github-actions"
38+
directory: "/"
39+
schedule:
40+
interval: "weekly"
41+
groups:
42+
actions-dependencies:
43+
patterns:
44+
- "*"

.github/workflows/API_doc_manual.yml

Lines changed: 28 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -16,45 +16,36 @@ jobs:
1616
contents: read
1717
pages: write
1818
id-token: write
19-
strategy:
20-
matrix:
21-
target: [ x86_64 ]
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
2222
steps:
23-
- uses: actions/checkout@v4
24-
25-
- uses: actions/setup-python@v5
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
2628
with:
2729
python-version: '3.10'
2830

29-
- name: Install dependencies
30-
run: |
31-
if command -v yum &> /dev/null; then
32-
sudo yum update -y && sudo yum install -y perl-core openssl openssl-devel pkgconfig libatomic clang gcc-multilib
33-
# If we're running on i686 we need to symlink libatomic
34-
# in order to build openssl with -latomic flag.
35-
if [[ ! -d "/usr/lib64" ]]; then
36-
sudo ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
37-
fi
38-
39-
echo "finished yum install"
40-
else
41-
# If we're running on debian-based system.
42-
sudo apt update -y && sudo apt-get install -y libssl-dev openssl pkg-config zlib1g-dev clang gcc-multilib
43-
44-
echo "finished apt install"
45-
fi
46-
47-
- name: Install Rust Target for wasm
31+
- name: Set up Node.js
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: '20'
35+
36+
- name: Install system dependencies
4837
run: |
49-
rustup target add wasm32-unknown-unknown
50-
51-
- name: install wasm-pack
38+
sudo apt-get update -y
39+
sudo apt-get install -y libssl-dev openssl pkg-config zlib1g-dev clang
40+
41+
- name: Add wasm target
42+
run: rustup target add wasm32-unknown-unknown
43+
44+
- name: Install wasm-pack
5245
run: |
53-
cargo install --locked wasm-pack --verbose
54-
cargo install --locked wasm-bindgen-cli --verbose
55-
cargo install --locked wasm-opt --verbose
46+
cargo install --locked wasm-pack wasm-bindgen-cli wasm-opt
5647
wasm-pack --version
57-
48+
5849
- name: Build AISdb
5950
run: |
6051
python -m venv .venv
@@ -66,28 +57,24 @@ jobs:
6657
- name: Install dependencies for API docs
6758
run: |
6859
source .venv/bin/activate || exit 1
69-
python -m pip install --upgrade pip || exit 1
7060
python -m pip install sphinx sphinx-rtd-theme matplotlib joblib || exit 1
71-
61+
7262
- name: Build docs
7363
run: |
7464
source .venv/bin/activate || exit 1
75-
ls
7665
sphinx-apidoc --separate --force --implicit-namespaces --module-first -o docs/source/api aisdb aisdb/tests/* || exit 1
7766
python -m sphinx -a -j auto -b=html docs/source docs/dist_sphinx || exit 1
7867
7968
- name: Upload Pages artifact
8069
uses: actions/upload-pages-artifact@v3
8170
with:
8271
path: docs/dist_sphinx
83-
72+
8473
- name: Deploy to GitHub Pages
8574
id: deployment
8675
uses: actions/deploy-pages@v4
87-
88-
- name: Clean Up
76+
77+
- name: Clean up
8978
run: |
90-
source .venv/bin/activate || exit 1
91-
rm -rf gh-pages || exit 1
9279
rm -rf docs/dist_sphinx
93-
rm -rf .venv
80+
rm -rf .venv

0 commit comments

Comments
 (0)