Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PCT functions, close #89 #90

Merged
merged 5 commits into from
Oct 29, 2024
Merged

Conversation

Robinlovelace
Copy link
Collaborator

No description provided.

@Robinlovelace Robinlovelace linked an issue Oct 29, 2024 that may be closed by this pull request
5 tasks
Copy link
Collaborator

@dabreegster dabreegster left a comment

Choose a reason for hiding this comment

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

I pushed a commit to wire this up. In the config json, they're called GovTargetSchool and GoDutchSchool

@Robinlovelace
Copy link
Collaborator Author

Perfect, quite easy to extend. Will try to add some tests before merging.

@dabreegster
Copy link
Collaborator

Sure, tests would be good. You could follow the example of

and just dump output to a CSV file and do something to manually compare. Or if you want to assert a few input values produce the expectd output, that's easy too

@Robinlovelace
Copy link
Collaborator Author

See the simpler spot checks I've done. What's the chance of the spot checks passing but the function being wrong? Close to 0.

@Robinlovelace
Copy link
Collaborator Author

Good to merge? First Rust code I've written in a while and pretty happy if so!

@Robinlovelace
Copy link
Collaborator Author

Tests passing locally:

cargo test
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.14s
     Running unittests src/lib.rs (target/debug/deps/lts-6c66a489189eafb7)

running 1 test
test tests::test_bike_ottawa ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/od2net-c465a29c5326b2f8)

running 3 tests
test network::tests::speed_slope_test ... ok
test plugins::uptake::tests::test_school ... ok
test plugins::uptake::tests::test_pct ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

     Running unittests src/main.rs (target/debug/deps/od2net-44ec9ba0516d0294)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/lib.rs (target/debug/deps/wasm_od2net-692a233dc88a845d)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests lts

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests od2net

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests wasm_od2net

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

@Robinlovelace Robinlovelace merged commit 83a1b6d into main Oct 29, 2024
@Robinlovelace Robinlovelace deleted the 89-new-pct-uptake-functions branch October 29, 2024 17:02
@Robinlovelace
Copy link
Collaborator Author

Note: I only understand the checks for the school uptake functions but can do spot checks for the other ones at some point also.

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.

New PCT uptake functions
2 participants