-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
1,366 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: "Sphinx: Render docs" | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
env: | ||
GIT_USER_NAME: BattINFO Developers | ||
GIT_USER_EMAIL: "BattINFO@big-map.org" | ||
|
||
jobs: | ||
|
||
updatepages: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 #Uses python install action from here: https://github.com/marketplace?type=actions | ||
with: | ||
python-version: '3.10' # Replace with the desired Python version | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install Markdown==3.4.3 rdflib==6.3.2 # Add any other dependencies if needed | ||
- name: Render documentation from ttl | ||
run: python sphinx/ttl_to_rst.py | ||
|
||
- name: Build HTML | ||
uses: ammaraskar/sphinx-action@master | ||
with: | ||
docs-folder: "sphinx/" | ||
pre-build-command: "apt-get update -y; apt-get install -y pandoc" | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: documentationHTML | ||
path: sphinx/_build/html/ | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: github.ref == 'refs/heads/main' | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: sphinx/_build/html | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: "Sphinx: Render docs" | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
env: | ||
GIT_USER_NAME: BattINFO Developers | ||
GIT_USER_EMAIL: "BattINFO@big-map.org" | ||
|
||
jobs: | ||
|
||
updatepages: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 #Uses python install action from here: https://github.com/marketplace?type=actions | ||
with: | ||
python-version: '3.10' # Replace with the desired Python version | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install Markdown==3.4.3 rdflib==6.3.2 # Add any other dependencies if needed | ||
|
||
- name: Render documentation from ttl | ||
run: python sphinx/ttl_to_rst.py | ||
|
||
- name: Build HTML | ||
uses: ammaraskar/sphinx-action@master | ||
with: | ||
docs-folder: "sphinx/" | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: documentationHTML | ||
path: sphinx/_build/html/ | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: github.ref == 'refs/heads/master' | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: sphinx/_build/html | ||
|
||
- name: Commit updated documentation | ||
run: | | ||
cd ${GITHUB_WORKSPACE} | ||
git config --global user.email "${GIT_USER_EMAIL}" | ||
git config --global user.name "${GIT_USER_NAME}" | ||
git config pull.rebase false | ||
git add . | ||
git commit --allow-empty -m "Automatic update of github pages" | ||
git push origin master | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= -v | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#+TITLE: Documentation generation for BattInfo | ||
* Requirements | ||
** sphinx | ||
installation instruction described [[https://www.sphinx-doc.org/en/master/usage/installation.html][here]] | ||
#+begin_src | ||
pip install sphinx | ||
#+end_src | ||
** install sphinx pydata theme | ||
https://pydata-sphinx-theme.readthedocs.io/en/latest/index.html | ||
#+begin_src | ||
pip install pydata-sphinx-theme | ||
#+end_src | ||
** globabsubs extension | ||
#+begin_src | ||
pip install sphinxcontrib-globalsubs | ||
#+end_src | ||
** autosectionlabel | ||
- part of default distribution | ||
- We use ~autosectionlabel_prefix_document = True~ which means that the internal link must be prefixed by the file | ||
name and a semi-column, see [[https://www.sphinx-doc.org/en/master/usage/extensions/autosectionlabel.html][here]]. | ||
|
||
* Workflow for editing | ||
|
||
In the ~Documentation~ directory, run from terminal | ||
#+BEGIN_SRC sh | ||
make html | ||
#+END_SRC | ||
|
||
The command generates all the files for a static website and writes them in ~Documentation/_build/html~ | ||
|
||
All the files in this directory must then be copied to the ~BattInfo-doc~ [[https://github.com/BattMoTeam/BattMo-doc][repo]]. From there, make a *force* push. We do | ||
not keep track of the history of the ouput files (html), but we of course keep track of the documentation source, directly in the | ||
main repo ~BattInfo~. | ||
|
||
The deployment of the webpage can be followed from the [[https://github.com/BattMoTeam/BattMo-doc/actions][github pages section]] | ||
|
||
The result can be view at | ||
|
||
https://battmoteam.github.io/Battinfo-doc/ | ||
|
||
* Interesting Manuals | ||
** sphinx manual | ||
https://www.sphinx-doc.org/en/master/contents.html | ||
** reStucturedText (rst) format | ||
https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html | ||
* Configuration file | ||
- ~conf.py~ see https://www.sphinx-doc.org/en/master/usage/configuration.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
td.element-table-key, td.element-table-value { | ||
vertical-align: top; | ||
} | ||
|
||
td.element-table-key { | ||
text-align: right; | ||
padding-right: 2mm; | ||
width: 20%; | ||
} | ||
|
||
span.element-table-key { | ||
font-weight: bold; | ||
} | ||
|
||
table.element-table { | ||
width: 100%; | ||
text-align: left; | ||
} | ||
|
||
html table.element-table tr:nth-child(odd) td{ | ||
background-color: Gainsboro; | ||
} | ||
|
||
table.element-table tr:nth-child(even) td{ | ||
background-color: GhostWhite; | ||
} | ||
|
||
html[data-theme=dark] table.element-table tr:nth-child(odd) td{ | ||
background-color: black; | ||
} | ||
|
||
html[data-theme=dark] table.element-table tr:nth-child(even) td{ | ||
background-color: black; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
.. toctree:: | ||
:hidden: | ||
|
||
example_person_jsonld_nb.ipynb | ||
|
||
|
||
Chemical Substance Domain Ontology | ||
================================== | ||
|
||
Overview | ||
-------- | ||
|
||
The Chemical Substance Domain Ontology is a specialized ontology | ||
designed to provide persistent machine-readable identifiers for chemical | ||
substances within the broader context of the Elementary Multiperspective | ||
Materials Ontology (EMMO). It plays a crucial role in enhancing the | ||
semantic representation of chemical entities and their relationships | ||
within materials science and related domains. | ||
|
||
Integration with EMMO | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
The primary purpose of the Chemical Substance Domain Ontology is to | ||
seamlessly integrate chemical substances into the EMMO ontology | ||
ecosystem. EMMO serves as the top-level ontology for materials science | ||
and modeling, providing a standardized framework for describing | ||
materials, processes, and phenomena. By establishing a domain ontology | ||
for chemical substances, we bridge the gap between materials modeling | ||
and chemistry, ensuring consistent and interoperable knowledge | ||
representation. | ||
|
||
Persistent Identifiers | ||
~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
This ontology assigns persistent machine-readable identifiers to | ||
chemical substances. These identifiers are essential for accurate | ||
referencing and linking of chemical data, ensuring data consistency, and | ||
facilitating data exchange and interoperability among various tools and | ||
systems. It includes annotations to other sources of information | ||
including `PubChem <https://pubchem.ncbi.nlm.nih.gov/>`__ and | ||
`Wikidata <https://www.wikidata.org/>`__. | ||
|
||
Standardized Nomenclature | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
The ontology includes standardized nomenclature for chemical substances, | ||
relying on `IUPAC <https://iupac.org/what-we-do/nomenclature/>`__ | ||
recommendations for naming coneventions. IUPAC is the | ||
universally-recognized authority on chemical nomenclature and | ||
terminology. This consistency in naming conventions enhances | ||
collaboration and data sharing. | ||
|
||
Key Features | ||
------------ | ||
|
||
- Seamless integration with the EMMO ontology. | ||
- Provides persistent machine-readable identifiers for chemical | ||
substances. | ||
- Standardized nomenclature for chemical entities. | ||
- Facilitates data exchange and interoperability within the EMMO | ||
ecosystem. | ||
|
||
Usage | ||
----- | ||
|
||
Researchers, domain experts, and developers within the materials science | ||
and chemistry communities can utilize the Chemical Substance Domain | ||
Ontology for various purposes, including: | ||
|
||
- Incorporating consistent and standardized chemical substance | ||
information into their modeling and simulation activities. | ||
- Enhancing data interoperability between materials modeling tools, | ||
databases, and platforms. | ||
- Supporting research projects that require precise and standardized | ||
chemical entity representation. | ||
- Building applications, databases, or knowledge graphs that leverage | ||
EMMO and require chemical substance information. | ||
|
||
Contributing | ||
------------ | ||
|
||
We welcome contributions from the community to enhance and expand the | ||
Chemical Substance Domain Ontology. If you have suggestions, | ||
improvements, or additional chemical substance information to | ||
contribute, please refer to our :ref:`contributing guidelins<contribute:Contributing to the ontology>`. | ||
|
||
Acknowledgements | ||
---------------- | ||
|
||
This project has received support from European Unition research and | ||
innovation programs, under grant agreement numbers: | ||
|
||
- 957189 - `BIG-MAP <http://www.big-map.eu/>`__ | ||
|
||
License | ||
------- | ||
|
||
The Chemical Substance Domain Ontology is released under the `Creative | ||
Commons Attribution 4.0 | ||
International <https://creativecommons.org/licenses/by/4.0/legalcode>`__ | ||
license (CC BY 4.0). | ||
|
||
Please cite this content using the following DOI: | ||
`10.5281/zenodo.10254978 <https://zenodo.org/doi/10.5281/zenodo.10254978>`__ | ||
|
||
.. |DOI| image:: https://zenodo.org/badge/697870611.svg | ||
:target: https://zenodo.org/doi/10.5281/zenodo.10254978 |
Oops, something went wrong.