From bc44b9d15bcea539554acf00766130f20fc7b025 Mon Sep 17 00:00:00 2001 From: Sarath Menon Date: Tue, 28 Nov 2023 16:10:51 +0100 Subject: [PATCH] update env --- _config.yml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ _toc.yml | 11 ++++++++++ docs/examples.md | 29 +++++++++++++++++++++++++++ docs/intro.ipynb | 49 +++++++++++++++++++++++++++++++++++++++++++++ environment.yml | 3 ++- 5 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 _config.yml create mode 100644 _toc.yml create mode 100644 docs/examples.md create mode 100644 docs/intro.ipynb diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..d22f0d1 --- /dev/null +++ b/_config.yml @@ -0,0 +1,52 @@ +# Book settings +# Learn more at https://jupyterbook.org/customize/config.html + +title: "pyscal-rdf" +#author: The Jupyter Book Community +logo: docs/source/_static/logo.png + +# Force re-execution of notebooks on each build. +# See https://jupyterbook.org/content/execute.html +execute: + execute_notebooks: "auto" + +only_build_toc_files: true + +# Define the name of the latex output file for PDF builds +latex: + latex_documents: + targetname: book.tex + +# Information about where the book exists on the web +repository: + url: https://github.com/pyscal/pyscal_rdf + path_to_book: book + branch: main + +notebook_interface : "notebook" + +# Add GitHub buttons to your book +# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository +html: + use_issues_button: false + use_repository_button: true + +parse: + myst_enable_extensions: + # don't forget to list any other extensions you want enabled, + # including those that are enabled by default! + - html_image + - amsmath + - dollarmath + - linkify + - substitution + - colon_fence + +sphinx: + config: + mathjax_path: https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js + html_theme: pydata_sphinx_theme + html_js_files: + - https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js + html_sidebars: + "**": [] diff --git a/_toc.yml b/_toc.yml new file mode 100644 index 0000000..372691e --- /dev/null +++ b/_toc.yml @@ -0,0 +1,11 @@ +# Table of contents +# Learn more at https://jupyterbook.org/customize/toc.html + +format: jb-book +root: docs/intro +chapters: + - file: docs/examples.md + sections: + - file: examples/01_getting_started + - file: examples/02_grain_boundaries + diff --git a/docs/examples.md b/docs/examples.md new file mode 100644 index 0000000..c167174 --- /dev/null +++ b/docs/examples.md @@ -0,0 +1,29 @@ +# Examples + +The gallery of examples below cover different ways in which pyscal-rdf can be used. + +::::{grid} 1 1 2 3 +:class-container: text-center +:gutter: 3 + +:::{grid-item-card} +:link: ../examples/01_getting_started +:link-type: doc +:class-header: bg-light +Getting started with pyscal +^^^ +Learn the very basis, including the concepts of `System` and `Atoms`. +::: + +:::{grid-item-card} +:link: ../examples/02_grain_boundaries +:link-type: doc +:class-header: bg-light +Creating structures +^^^ +Create common atomic structures like bcc, fcc; and custom ones. Save and read from files. +::: + +:::: + + diff --git a/docs/intro.ipynb b/docs/intro.ipynb new file mode 100644 index 0000000..34414de --- /dev/null +++ b/docs/intro.ipynb @@ -0,0 +1,49 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "6f84b291-5802-4ebe-95b3-1b1ea097c466", + "metadata": {}, + "source": [ + "# pyscal-rdf" + ] + }, + { + "cell_type": "markdown", + "id": "d28592f2-8d81-4625-857c-0f3fc5c8a0b3", + "metadata": {}, + "source": [ + "`pyscal_rdf` is a python tool for ontology-based creation, manipulation, and quering of structures. `pyscal_rdf` uses the [Computational Material Sample Ontology (CMSO)](https://github.com/Materials-Data-Science-and-Informatics/cmso-ontology)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6ca98bd2-e238-4283-b29f-25eb86e72af3", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.13" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/environment.yml b/environment.yml index 220002a..d9b32f5 100644 --- a/environment.yml +++ b/environment.yml @@ -16,4 +16,5 @@ dependencies: - pandas - owlready2 - sqlalchemy <2.0.0 - - rdflib-sqlalchemy \ No newline at end of file + - rdflib-sqlalchemy + - jupyter-book