Commit 697ff86c authored by Luigi Sbailo's avatar Luigi Sbailo
Browse files

Adapt naming of tutorial_template

parent 5f5f42c9
# analytics-tutorial-template
This repository contains a skeleton of a tutorial with all of the templates.
To create/integrate a new tutorial there are a few requirements that has to be fulfilled.
Each tutorial has to have a to be installable.
File structure af a tutorial:
- `metainfo.json`: contains some data about the tutorial. This file is used to update the information on the website. The same data can be used for the python packeage as well.
- `setup.py`: provides an easy way to access any code available in the python environments. Most importantly it should contain all of the dependencies of the tutorial
- `data`: folder that stores all the data required in this folder.
- `assets`: folder for storing any additional materials (logos, figure, etc.)
## Tips and tricks
- Please note that during the deployment these folders (`data`, `assets`) from other tutorials will be merged so if you want to be on the safe side you can use sub-folders as well.
- the namo of th jupyter notebook could be the same as the name of repository.
## Notes
- More information about the python `setup.py` file: https://docs.python.org/3/distutils/setupscript.html
- `json` vs. `yaml`: Yaml looks nicer but currently only the json format is supported natively by Python.
\ No newline at end of file
# Ignore everything in this directory
*
# Except this file
!.gitignore
\ No newline at end of file
{
"authors": [
"Surname, First names",
"Surname, First names"
],
"email": "user@domain.com",
"title": "Title of the tutorial",
"description": "In this tutorial we will ...",
"url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-tutorial-template",
"link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/{tutorial}.ipynb",
"link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/{tutorial}.ipynb",
"updated": "2020-04-09",
"flags":{
"featured": true,
"top_of_list": false
},
"labels": {
"application_keyword": [
"keyword1",
"keyword2"
],
"application_section": [
"Materials property prediction"
],
"application_system": [
"System"
],
"category": [
"Tutorial"
],
"data_analytics_method": [
"Clustering"
],
"platform": [
"jupyter"
]
}
}
\ No newline at end of file
import json
from setuptools import setup, find_packages
with open('metainfo.json') as file:
metainfo = json.load(file)
setup(
name='{tutorial}',
version='1.0',
author=', '.join(metainfo['authors']),
author_email=metainfo['email'],
url=metainfo['url'],
description=metainfo['title'],
long_description=metainfo['description'],
packages=find_packages(),
install_requires=['numpy', 'scipy'],
)
%% Cell type:markdown id: tags:
***
<img width="25%" style="float: right;" src=https://nomad-coe.eu/uploads/nomad/images/NOMAD_Logo2.png>
# The title of the tutorial
created by: ... Matthias Scheffler<sup>1</sup> and Luca Ghiringhelli<sup> 1</sup>
***
<sup>1</sup> Fritz Haber Institute of the Max Planck Society, Faradayweg 4-6, D-14195 Berlin, Germany
***
%% Cell type:markdown id: tags:
This interactive notebook ...
%% Cell type:markdown id: tags:
# Markdown cheatsheet
## Headings
```
# Heading 1
# Heading 2
## Heading 2.1
## Heading 2.2
```
## Emphasis
- Bold: __string__ or **string**
- Italic: _string_ or *string*
- Indented quoting:
> Hello world!
## Bullets/Numbered lists
- item1
- item2
- subitem1
- subitem2
1. item1
2. item2
1. subitem1
2. subitem2
## Links
- Internal: [section title](#Import-modules)
- External: [Nomad Analytics](https://www.nomad-coe.eu/index.php?page=bigdata-analyticstoolkit)
## Graphics
<img width="25%" src="https://nomad-coe.eu/uploads/nomad/images/NOMAD_Logo2.png" title="Title text" >
## Mathematical symbols:
- Inline: $e^{i\pi} + 1 = 0$ or
$$e^x=\sum_{i=0}^\infty \frac{1}{i!}x^i$$
## Emeded code
```python
def f(x):
"""a docstring"""
return x**2
```
or refering to a `function`.
## Table
| This | is |
|------|------|
| a | table|
## Horizontal lines
***
or
---
%% Cell type:markdown id: tags:
## Import modules
%% Cell type:code id: tags:
``` python
import numpy as np
import matplotlib.pyplot as plt
```
%% Cell type:code id: tags:
``` python
```
# Ignore everything in this directory
*
# Except this file
!.gitignore
\ No newline at end of file
Supports Markdown
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