Expand description
ZinZen scheduler
The ZinZen scheduler is a “calendar as a function”.
Input: A calendar start datetime and end datetime, plus some Goals with flexible time constraints.
Output: A calendar that successfully allocates all Goals - or the maximum amount of Goals in that time period.
use scheduler::models::input::Input;
let json_input: serde_json::Value = serde_json::json!({
"startDate": "2022-01-01T00:00:00",
"endDate": "2022-01-09T00:00:00",
"goals": {
"uuid1": {
"id": "uuid1",
"title": "sleep",
"min_duration": 8,
"repeat": "daily",
"filters": {
"after_time": 22,
"before_time": 8
}
}
}
});
let input: Input = serde_json::from_value(json_input).unwrap();
let output = scheduler::run_scheduler(input);
Getting Started
This project is hosted on Github. The Docs.rs / Crates.io version is probably (far) behind.
Please submit an issue there if you’ve found something we need to improve or have a question regarding how things work.
For more explanation, see the crate documentation. There are no features to configure.
Special Considerations
We’re not at 1.0 major version yet.
Expect breaking changes for every minor (y in 0.x.y) release!
Contributing
Read the standard Contributor Covenant Code of Conduct.
TL;DR : Be nice.
We also use the principles of Robert C. Martin’s ‘Clean Code’ - nicely summarized on this Gist.
If you find documentation missing, this is considered a bug, so please submit a bug report!
License and legal stuff
AGPL 3.0 See LICENSE file.
©2020-now ZinZen®
This code is licensed under AGPLv3 but this license does not implicitly grant permission to use the trade names, trademarks, service marks, or product names of the licensor, except as required for reasonable and customary use in describing the origin of the Work and the content of the notice/attribution file.
ZinZen® supports an open and collaborative process. Registering the ZinZen® trademark is a tool to protect the ZinZen® identity and the quality perception of the ZinZen® projects.
Modules
- Mocking module to generate objects for testing
- The data structures
- The services handling the data structures
Functions
- The main binary function to call
- The main wasm function to call