diff --git a/README.md b/README.md index fe5ee6e36df315802fb5687e708b4bf0d172e414..3f6eb6fd4c70ec81b113e2c2eff13dde80c6abc5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ # 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 diff --git a/assets/.gitignore b/assets/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..86d0cb2726c6c7c179b99520c452dd1b68e7a813 --- /dev/null +++ b/assets/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore \ No newline at end of file diff --git a/data/.gitignore b/data/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..86d0cb2726c6c7c179b99520c452dd1b68e7a813 --- /dev/null +++ b/data/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore \ No newline at end of file diff --git a/metainfo.json b/metainfo.json new file mode 100644 index 0000000000000000000000000000000000000000..dbc4bbaf16807668f41704e314d7f67007e72769 --- /dev/null +++ b/metainfo.json @@ -0,0 +1,39 @@ +{ + "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 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000000000000000000000000000000000..9de81df45e8f1e44f17afc3bafe9ce2c5dd95bd5 --- /dev/null +++ b/setup.py @@ -0,0 +1,17 @@ +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'], +)