Commit a134fc35 authored by Robbert's avatar Robbert
Browse files

Merge branch '1-initial-version-of-data-science-template' into 'master'

Resolve "Initial version of Data Science template"

Closes #1

See merge request !1
parents d3fd9f3b ec98b6d1
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
tab_width = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 79
[*.yml]
indent_size = 2
[*.md]
trim_trailing_whitespace = false
[*.bat]
indent_style = tab
end_of_line = crlf
[LICENSE]
insert_final_newline = false
[Makefile]
indent_style = tab
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
# Translations
*.mo
*.pot
# Django stuff:
*.log
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# DotEnv configuration
.env
# Database
*.db
*.rdb
# Pycharm
.idea
# VS Code
.vscode/
# Spyder
.spyproject/
# Jupyter NB Checkpoints
.ipynb_checkpoints/
# exclude data from source control by default
data/*
# Mac OS-specific storage files
.DS_Store
# vim
*.swp
*.swo
# Mypy cache
.mypy_cache/
# History
## 0.1.0 (2020-07-15)
* First release of AskAnna Data Science template
{
"project_name": "The name of the project",
"project_directory": "The name of the directory you want to create for the project",
"project_description": "A (short) description of the project",
"project_push_target": "[OPTIONAL] copy the URL from the project in AskAnna"
}
# Environment variables go here and can be read by `python-dotenv` package.
#
# To load the variables, you can use the script below as an example.
#
# `script.py`
# ----------------------------------------------------------------
# import os
# from dotenv import find_dotenv, load_dotenv
#
# # Find .env automagically by walking up directories until it's found, then
# # load up the .env entries as environment variables
# load_dotenv(find_dotenv())
#
# example = os.getenv('EXAMPLE')
# ----------------------------------------------------------------
#
# IN CASE OF SENSITIVE INFORMATION: DO NOT ADD THIS FILE TO VERSION CONTROL!
EXAMPLE = 'test'
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
# Translations
*.mo
*.pot
# Django stuff:
*.log
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# DotEnv configuration
.env
# Database
*.db
*.rdb
# Pycharm
.idea
# VS Code
.vscode/
# Spyder
.spyproject/
# Jupyter NB Checkpoints
.ipynb_checkpoints/
# exclude data from source control by default
data/*
# exclude result from source control by default
result/*
# Mac OS-specific storage files
.DS_Store
# vim
*.swp
*.swo
# Mypy cache
.mypy_cache/
# {{ cookiecutter.project_name }}
{{ cookiecutter.project_description }}
## Project Organization
├── askanna.yml <- Configuration file for AskAnna
├── requirements.txt <- The requirements file for reproducing the analysis environment, e.g.
│ generated with `pip freeze > requirements.txt`
├── data
│   ├── input <- The original, immutable data (dump)
│   ├── interim <- Intermediate data sets
│   └── processed <- The final prepped data sets for modeling
├── docs <- Add Markdown project documentation here (see also section
| 'Introduction of Docs')
├── models <- Trained and serialized models, model predictions, or model summaries
├── notebooks <- A location for your project related Jupyter notebooks
├── result <- A location for your project related results
├── src <- Source code for use in this project
│   ├── __init__.py <- Makes code a Python module
│ │
│   ├── data <- Scripts to download or generate data
│ │ ├── create_dataset.py
│   │   └── create_features.py
│ │
│   └── models <- Scripts to train models and then use trained models to serve a result
│      ├── serve_model.py
│      └── train_model.py
├── .env <- Environment file for local development
├── .gitignore <- Files or directories that should not be pushed to AskAnna
└── README.md <- This document
## Introduction of Docs
This template documentation can be used to add documentation to your project.
You only have to clone (or download) the repository and copy the `docs` folder
to your project. Optionally you can also copy the .gitignore file as well.
The documentation is based on [Docsify](https://docsify.js.org/). Check out
their page for more information, configuration options and plugins.
### Run it locally
If you want to view this project locally, you need a local webserver. The
fastest way is by using Python. Instructions for Python 3.x:
```bash
cd docs && python -m http.server 3000
```
You can also use the Docsify CLI. First install **Node.js**:
[package manager overview](https://nodejs.org/en/download/package-manager/)
Then install Docsify:
```bash
npm i docsify-cli -g
```
And you can run the local server:
```bash
docsify serve docs
```
## Credits
This data science template is inspired by [Cookiecutter Data Science](https://drivendata.github.io/cookiecutter-data-science/).
---
push-target: {% if cookiecutter.project_push_target != "[OPTIONAL] copy the URL from the project in AskAnna" %}{{ cookiecutter.project_push_target }}{% endif %}
environment: Python 3.7
train-model:
job:
- pip install requirements.txt
- python src/models/train_model.py
output:
- models/
serve-model:
job:
- pip install requirements.txt
- python src/models/serve_model.py
result: result/prediction.json
output:
- notebooks/validation
../README.md
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Documentation {{ cookiecutter.project_name }}</title>
<link rel="icon" type="image/png" sizes="32x32" href="media/askanna-icon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="media/askanna-icon-16x16.png" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="{{ cookiecutter.project_description }}" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css">
<head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: 'Documentation {{ cookiecutter.project_name }}',
logo: 'media/askanna-logo.svg',
themeColor: '#5D3EB3',
// NAVIGATION
loadSidebar: 'sidebar.md',
maxLevel : 3,
subMaxLevel: 3,
// PLUGINS
search: {
depth : 3,
},
pagination: {
crossChapter: true,
},
}
</script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-themeable@0"></script>
<!-- Plugin for search -->
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
<!-- Plugin for pagination -->
<script src="//unpkg.com/docsify-pagination/dist/docsify-pagination.min.js"></script>
<!-- Plugin for Mermaid -->
<script src="//unpkg.com/mermaid/dist/mermaid.js"></script>
<script src="//unpkg.com/docsify-mermaid@latest/dist/docsify-mermaid.js"></script>
<script>mermaid.initialize({ startOnLoad: true });</script>
<!-- Plugin for embedding PDFs -->
<script src="//cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js"></script>
<script src="//unpkg.com/docsify-pdf-embed-plugin/src/docsify-pdf-embed.js"></script>
<!-- Plugins to format and copy code -->
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code@2"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-bash.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-git.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-yaml.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-json.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-sql.min.js"></script>
</body>
</html>
<svg width="1200" height="336" viewBox="0 0 1200 336" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M384.001 237.257L432.748 96H461.777L509.976 237.257H480.673L471.362 207.086H422.615L413.304 237.257H384.001ZM429.735 184.32H464.515L448.084 128.64H446.988L429.735 184.32ZM511.345 203.52H537.635C538.731 214.217 545.303 219.428 557.079 219.428C562.009 219.428 566.391 218.606 569.951 216.686C573.511 214.766 575.154 211.748 575.154 207.908C575.154 204.068 573.785 201.326 570.772 199.68C567.76 198.034 563.926 196.663 559.27 195.566L540.922 191.726C523.121 187.886 514.084 177.737 514.084 161.28C514.084 156.617 514.905 152.503 516.822 148.389C518.739 144.549 521.478 140.983 525.038 138.24C528.598 135.223 532.98 133.029 538.183 131.383C543.386 129.737 549.137 128.914 555.71 128.914C567.76 128.914 577.893 131.931 585.561 137.691C593.229 143.451 597.61 152.229 598.158 164.023H571.868C571.594 159.086 569.951 155.246 566.938 152.777C563.926 150.309 560.092 149.211 555.436 149.211C551.054 149.211 547.22 150.309 544.482 152.229C541.743 154.149 540.1 157.166 540.1 160.731C540.1 164.297 541.196 167.04 543.113 168.686C545.303 170.331 548.042 171.703 551.328 172.526L572.689 176.914C576.523 177.737 580.357 178.834 583.918 180.48C587.478 182.126 590.49 184.046 592.955 186.514C595.42 188.983 597.61 191.726 598.98 195.017C600.349 198.308 601.171 202.423 601.171 206.811C601.171 211.474 600.075 215.588 598.158 219.703C596.241 223.817 593.229 227.108 589.669 230.126C585.835 233.143 581.179 235.337 575.702 237.257C570.225 238.903 563.926 240 556.806 240C542.565 240 531.611 236.983 523.669 230.674C516.001 224.091 511.893 215.314 511.345 203.52ZM614.59 96V237.257H640.88V96H614.59ZM677.303 131.383L641.428 179.108L682.507 237.257H711.535L669.909 179.108L708.249 131.383H677.303ZM714.822 237.257L763.295 96H792.324L840.797 237.257H811.494L802.183 207.086H753.436L744.125 237.257H714.822ZM760.556 184.32H795.337L778.905 128.64H778.083L760.556 184.32ZM849.834 131.383V237.257H876.125V176.091C876.125 168.137 878.042 161.829 882.15 157.166C886.258 152.503 892.009 150.034 899.129 150.034C905.428 150.034 909.809 151.68 912.548 155.246C915.287 158.811 916.656 163.474 916.656 169.783V237.257H942.946V167.863C942.946 155.794 940.208 146.194 934.457 139.337C928.706 132.48 919.942 128.914 907.892 128.914C900.224 128.914 893.926 130.56 888.722 133.577C883.519 136.594 879.411 140.983 876.125 146.743V131.383H849.834ZM961.569 237.257V131.383H987.859V146.743C991.145 140.983 995.253 136.594 1000.46 133.577C1005.66 130.56 1011.96 128.914 1019.63 128.914C1031.68 128.914 1040.44 132.48 1046.19 139.337C1051.94 146.194 1054.68 155.794 1054.68 167.863V237.257H1028.39V169.783C1028.39 163.474 1027.02 158.811 1024.28 155.246C1021.54 151.68 1017.16 150.034 1010.86 150.034C1003.74 150.034 997.992 152.503 993.884 157.166C989.776 161.829 987.859 168.137 987.859 176.091V237.257H961.569ZM1076.32 184.869C1070.29 191.177 1067.28 198.583 1067.28 207.086C1067.28 212.023 1068.1 216.411 1069.74 220.251C1071.39 224.091 1073.85 227.383 1076.86 230.4C1079.88 233.417 1083.44 235.611 1087.54 237.257C1091.65 238.903 1096.03 239.726 1100.96 239.726C1109.18 239.726 1115.75 237.806 1120.95 234.514C1126.16 231.223 1130.27 226.56 1133.28 220.8H1134.1L1134.37 237.257H1176V216.96H1157.93V165.12C1157.93 153.051 1154.09 144 1146.7 137.966C1139.3 131.657 1129.17 128.64 1116.3 128.64C1110 128.64 1103.97 129.189 1098.5 130.834C1093.02 132.206 1088.09 134.4 1084.26 137.417C1080.15 140.434 1077.14 144 1074.67 148.389C1072.21 152.777 1070.84 157.989 1070.84 163.749H1097.13C1097.13 159.086 1098.77 155.246 1102.06 152.777C1105.62 150.309 1110 148.937 1115.2 148.937C1120.41 148.937 1124.51 150.034 1127.53 152.503C1130.54 154.971 1131.91 159.086 1131.91 164.571V171.429L1102.33 173.897C1091.1 174.994 1082.34 178.56 1076.32 184.869ZM1098.77 217.234C1095.76 215.588 1094.39 213.394 1094.39 210.103V201.051C1094.66 196.937 1096.58 194.468 1100.41 194.194L1131.91 191.451V195.566C1131.91 202.148 1129.99 207.908 1126.16 212.571C1122.32 217.234 1116.85 219.703 1110.27 219.703C1105.62 219.703 1101.78 218.88 1098.77 217.234Z" fill="#5D3EB3"/>
<path d="M323.979 259.94L269.958 97.4217H269.828C255.933 53.14 214.574 21 165.747 21C116.791 21 75.4307 53.2049 61.6008 97.6165H61.5359L11.7353 261.044C5.11255 288.509 25.9548 315 54.2638 315H108.934C88.936 294.612 76.1449 264.16 76.1449 230.007L80.7549 200.789L51.5368 195.465L80.8198 190.141C141.658 180.986 190.745 162.611 229.702 141.184C220.677 172.61 204.445 190.4 204.445 190.4C231.845 190.4 250.804 168.714 261.323 152.027L264.309 160.793L259.829 165.987C256.778 169.493 255.284 174.103 255.674 178.713L259.764 230.007C259.764 264.095 247.038 294.612 226.975 315H281.645C310.474 314.935 331.446 287.729 323.979 259.94Z" fill="#5D3EB3"/>
</svg>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment