Skip to content
Snippets Groups Projects
Commit 1421083c authored by Adam Fekete's avatar Adam Fekete
Browse files

sample structure

parent 645dcfc1
No related branches found
No related tags found
No related merge requests found
# 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.)
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.
## 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
# Ignore everything in this directory
*
# Except this file
!.gitignore
\ No newline at end of file
{
"authors": [
"John, Doe",
"Bob, Alice",
],
"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/Welcome.ipynb",
"created": "",
"updated": "",
"flags":{
"isPublic": false,
"featured": false,
"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
setup.py 0 → 100644
import json
from setuptools import setup, find_packages
with open('metainfo.json') as file:
metainfo = json.load(file)
setup(
name='tutorial_template',
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'],
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment