-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Towards creating a documentation page #110
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Simple workflow for deploying content to GitHub Pages | ||
name: Deploy static content to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["master"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Single deploy job since we're just deploying | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
# Use python sphinx to build html pages | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.12' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r docs/requirements.txt | ||
- name: Build docs | ||
# Make makefile-html in docs folder | ||
run: | | ||
make -C docs html | ||
# Default from Github | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: 'docs/build/html/' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
__pycache__ | ||
|
||
*.pyc | ||
|
||
docs/build/ |
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 ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
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) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## Editing, building, and publishing extension documentation | ||
|
||
|
||
[Sphinx](https://www.sphinx-doc.org/en/master/index.html#) is used for document generation. | ||
|
||
### Local testing | ||
|
||
``` | ||
pip install sphinx sphinx_rtd_theme | ||
``` | ||
|
||
Then build the documentation locally: | ||
|
||
``` | ||
make -C docs html | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we make it so just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure we can modify it.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can change that on the final version. This is just preview to have discussion at next meeting. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tested and verified: if you go into docs: "make html" does everything |
||
``` | ||
|
||
Navigate to `docs/build/` and open `index.html`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
alabaster==1.0.0 | ||
babel==2.16.0 | ||
certifi==2024.12.14 | ||
charset-normalizer==3.4.1 | ||
docutils==0.21.2 | ||
idna==3.10 | ||
imagesize==1.4.1 | ||
Jinja2==3.1.5 | ||
MarkupSafe==3.0.2 | ||
packaging==24.2 | ||
Pygments==2.19.1 | ||
requests==2.32.3 | ||
snowballstemmer==2.2.0 | ||
Sphinx==8.1.3 | ||
sphinx-rtd-theme==3.0.2 | ||
sphinxcontrib-applehelp==2.0.0 | ||
sphinxcontrib-devhelp==2.0.0 | ||
sphinxcontrib-htmlhelp==2.1.0 | ||
sphinxcontrib-jquery==4.1 | ||
sphinxcontrib-jsmath==1.0.1 | ||
sphinxcontrib-qthelp==2.0.0 | ||
sphinxcontrib-serializinghtml==2.0.0 | ||
urllib3==2.3.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.. _PASTA: | ||
|
||
Screenshots after importing .eln files into PASTA-ELN | ||
***************************************************** | ||
|
||
.. image:: kadi4mat_1.png | ||
:width: 600 | ||
:alt: screenshot of examples/kadi4mat/collections-example.eln | ||
|
||
.. image:: kadi4mat_2.png | ||
:width: 600 | ||
:alt: screenshot of examples/kadi4mat/records-example.eln | ||
|
||
.. image:: OpenSemanticLab.png | ||
:width: 600 | ||
:alt: screenshot of examples/OpenSemanticLab/MinimalExample.osl.eln | ||
|
||
.. image:: PASTA.png | ||
:width: 600 | ||
:alt: screenshot of examples/PASTA/PASTA.eln | ||
|
||
.. image:: SampleDB.png | ||
:width: 600 | ||
:alt: screenshot of examples/SampleDB/sampledb_export.eln | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = 'The ELN file format' | ||
copyright = '2024, The ELN Consortium' | ||
author = 'The ELN Consortium' | ||
release = '1.1' | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [] | ||
|
||
templates_path = ['_templates'] | ||
exclude_patterns = [] | ||
|
||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = 'sphinx_rtd_theme' | ||
html_static_path = ['_static'] | ||
html_logo = '_static/Consortium.png' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The ELN file format | ||
=================== | ||
|
||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Contents: | ||
|
||
PASTA/PASTA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this makefile correct? For reference, a complete one: https://github.com/elabftw/elabdoc/blob/master/doc/Makefile
seems the
.PHONY:
line is missinghtml
target at leastThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makefile was autobuild by sphinx and not modified by me. One should only modify the conf.py file, as I did.
Seems different sphinx versions autocreate different makefile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can change that on the final version. This is just preview to have discussion at next meeting.