Adding documentation

* Adding script to generate and upload documentation.
 * Updated some dependencies.
This commit is contained in:
2020-04-01 15:17:02 +02:00
parent 781b7d1c10
commit 8eb533afc8
11 changed files with 348 additions and 324 deletions

585
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -27,7 +27,7 @@ This enables the index implementations to be agnostic from the underlying data s
* Clone the workspace, which will take care of bringing all the repositories needed.
```sh
git clone --recurse <repository URI>
git clone --recurse https://github.com/epfl-dias/mercator
```
The following steps assume the working directory is the root of the mercator repository.
@@ -49,31 +49,47 @@ This enables the index implementations to be agnostic from the underlying data s
done
```
* Index the data:
* Index the data (assuming the datasets generated above):
```sh
cargo run --release -- 1k 10k 100k
mv *.index ../mercator_service
```
* Run the Spatial Index, while providing the path to the datasets.
```sh
cd mercator_service
RUST_LOG="warn,actix_web=info,mercator_service=trace" \
MERCATOR_DATA="../mercator_indexer/" \
MERCATOR_ALLOWED_ORIGINS="http://localhost:3200" \
cargo run --release
```
## Documentation
For more information, please refer to the [documentation](https://epfl-dias.github.io/mercator/).
For more information, please refer to each sub projects, as well as the on-line help for the tools & utilities.
If you want to build the documentation and access it locally, you can use:
### Tools
```sh
cargo doc --open
```
* Mercator Service
**[[src](https://github.com/epfl-dias/mercator_service), [doc](https://epfl-dias.github.io/mercator_service/)]**
* Mercator Indexer
**[[src](https://github.com/epfl-dias/mercator_indexer)]**
### Utilities
* Mercator Data Generator
**[[src](https://github.com/epfl-dias/mercator_data_generator/)]**
### Libraries
* IronSea Index
**[[src](https://github.com/epfl-dias/ironsea_index/), [doc](https://epfl-dias.github.io/ironsea_index/)]**
* IronSea Index HashMap
**[[src](https://github.com/epfl-dias/ironsea_index_hashmap/), [doc](https://epfl-dias.github.io/ironsea_index_hashmap/)]**
* IronSea Index SFC-DBC
**[[src](https://github.com/epfl-dias/ironsea_index_sfc_dbc/), [doc](https://epfl-dias.github.io/ironsea_index_sfc_dbc/)]**
* Mercator DB
**[[src](https://github.com/epfl-dias/mercator_db/), [doc](https://epfl-dias.github.io/mercator_db/)]**
* Mercator Parser **[[src](https://github.com/epfl-dias/mercator_parser/), [doc](https://epfl-dias.github.io/mercator_parser/), [query language](https://epfl-dias.github.io/mercator_parser/book/)]**
## Acknowledgements

33
upload_docs.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/sh
: ${TRAVIS_REPO_SLUG="epfl-dias/${PROJECT}"}
if [ -z ${GH_TOKEN+yes} ]; then
echo "GH_TOKEN unset, exiting..."
exit 1
fi
if [ -z ${PROJECT+yes} ]; then
echo "PROJECT unset, exiting..."
exit 1
fi
# Generate the documentation
cargo doc --release --target-dir=target
cat > target/doc/index.html <<EOT
<meta http-equiv=refresh content=0;url=${PROJECT}/index.html>
EOT
# If a book folder exists, and mdbook is available, build it.
if /usr/bin/which -s mdbook && test -d book; then
mdbook build --dest-dir ../target/doc/book book
fi
# Upload it to GitHub.
MSG=$(git log -1 --pretty=format:'doc: %ci: %h - %s')
[ -e ../ghp-import/ghp_import.py ] || git clone https://github.com/davisp/ghp-import.git ../ghp-import
../ghp-import/ghp_import.py -n -p -f \
-m "${MSG}" \
-r "https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git" \
target/doc