Cleanup justfile and fix tests

This commit is contained in:
Austen Adler 2023-02-28 09:36:36 -05:00
parent 5644403081
commit 8b6e3b5d1a
5 changed files with 15 additions and 8 deletions

View File

@ -14,6 +14,7 @@ docs-build:
RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y install bison flex libffi-dev libxml2-dev libgdk-pixbuf2.0-dev libcairo2-dev libpango1.0-dev fonts-lyx cmake
RUN gem install asciidoctor-mathematical
COPY ./README.adoc docs/index.adoc
COPY --dir ./docs .
RUN asciidoctor -r asciidoctor-mathematical -a mathematical-format=svg -a "!webfonts" -- ./docs/*.adoc
@ -35,11 +36,7 @@ docs:
RUN minify --version
RUN minify --sync --recursive --output output/ ./docs/
# RUN mv output/static/* output/
# RUN rmdir output/static
SAVE ARTIFACT output/* AS LOCAL build/docs/
all:
BUILD +docs-build
BUILD +docs

View File

@ -1,15 +1,24 @@
build: fmt build-rust build-wasm build-js
all: clean build # build-docs
rsync -ha ./web-frontend/build/ build/
du -shc build/* | sort -h
build-rust:
cargo build --all
# wasm-pack build --target bundler this_algorithm-wasm
build-wasm:
wasm-pack build --target web this_algorithm-wasm
build-js: build-wasm
yarn --cwd ./web-frontend/ build
clean:
rm -rf build
build-docs:
earthly +docs
# TODO: Clippy
watch-rust:
cargo watch -x fmt -x check -x build
@ -18,6 +27,7 @@ watch-js:
yarn --cwd ./web-frontend/ dev
fmt:
# just --fmt --unstable
cargo fmt
yarn --cwd ./web-frontend/ format

View File

@ -1,4 +1,4 @@
lat,lon,cell_id
lat,lon,cellid
-17.809140292940967,-35.93589607080025,516919724103364369
-37.862625988222774,-127.5110541239105,11495546181747075815
-77.44058476056603,-49.02738412279285,13473910998651833901

Can't render this file because it is too large.

View File

@ -44,7 +44,7 @@ int main(int argc, char **argv) {
string header;
getline(file, header, '\n');
ofile << header << ",cell_id" << "\n";
ofile << header << ",cellid" << "\n";
while (getline(file, latString, ',')) {
getline(file, lonString, '\n') ;

View File

@ -40,7 +40,7 @@ pub fn test_events() -> Vec<TestEntry> {
pub struct TestEntry {
pub lat: f64,
pub lon: f64,
pub cell_id: u64,
pub cellid: u64,
}
/// Bitmask to preserve all data bits at level 23