Skip to content
Snippets Groups Projects
Commit e38b29b4 authored by Jutta Schnabel's avatar Jutta Schnabel
Browse files

setting up sphinx building

parent 6121c7ca
Branches
No related tags found
No related merge requests found
image: python:3.11
stages:
- build
- deploy
variables:
DOCS_DIR: docs
BUILD_DIR: public
PAGES_BRANCH: "basic_setup"
before_script:
- python -m pip install --upgrade pip
- pip install -r requirements.txt
build_docs:
stage: build
script:
- sphinx-build -b html $DOCS_DIR/source $BUILD_DIR
artifacts:
paths:
- $BUILD_DIR
only:
- $PAGES_BRANCH
pages:
image: docker.km3net.de/base/texlive:2023
script:
- make
- mkdir public
- cp km3net-dataformat-specifications.pdf public/
artifacts:
paths:
- public
stage: deploy
script:
- mv $BUILD_DIR public
artifacts:
paths:
- public
only:
- $PAGES_BRANCH
\begin{center} Git release: , date . \end{center}
# 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)
- glossary
- build from folders
- intro.json
- specs document
\ No newline at end of file
\documentclass[a4paper, 11pt]{article}
\usepackage{graphicx}
\usepackage{color}
\usepackage{hyperref}
\begin{document}
\title{KM3NeT Dataformat Specifications}
\author{Tamas Gal and Mieke Bouwhuis}
\date{\today}
\maketitle
\tableofcontents
\section{Detector Description (DETX, DATX)...}
The corresponding Google drive document: https://drive.google.com/open?id=0B6l8SNtndcwaUTZPOWZOXzd6R3M
\end{document}
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)
if "%1" == "" goto help
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
project = 'KM3NeT Dataformat Specifications'
copyright = '2024, The KM3NeT Collaboration'
author = 'The KM3NeT Collaboration'
# The full version, including alpha/beta/rc tags
release = '0.1'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx-jsonschema'
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
.. KM3NeT Dataformat Specifications documentation master file, created by
sphinx-quickstart on Tue Aug 20 09:58:21 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to KM3NeT Dataformat Specifications's documentation!
============================================================
.. toctree::
:maxdepth: 2
:caption: Contents:
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
{
"description": "An introduction to the format",
"references":
{
"key":
{
"title": "x",
"reference": "URL"
}
}
}
\ No newline at end of file
{
"title": "Extended name",
"description": "An introduction to the format",
"version": "",
"filename_convention":
{
"namestring": "",
"placeholder": {"abbrev": "description"}
},
"related_software": "",
"filetype": "",
"fields":
{
"name": "",
"description": "",
"ismandatory": "",
"datatype": "",
"contraints": ""
},
"headers": {},
"metadata": {},
"example": {},
"validator": {},
"references":
{
"key":
{
"title": "x",
"reference": "URL"
}
}
}
\ No newline at end of file
# Data format specifications
How to add ...
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Example Data Format",
"description": "This schema defines the format for the example data used in our physics experiment.",
"type": "object",
"properties": {
"experiment_id": {
"type": "string",
"description": "Unique identifier for the experiment.",
"examples": ["EXP12345"]
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the data was collected.",
"examples": ["2024-08-19T14:31:00Z"]
},
"sensor_data": {
"type": "array",
"description": "Array of sensor readings collected during the experiment.",
"items": {
"type": "object",
"properties": {
"sensor_id": {
"type": "string",
"description": "Unique identifier for the sensor.",
"examples": ["SENSOR001"]
},
"value": {
"type": "number",
"description": "The reading value from the sensor.",
"examples": [23.5]
},
"unit": {
"type": "string",
"description": "The unit of the sensor reading.",
"enum": ["Celsius", "Kelvin", "Fahrenheit"],
"examples": ["Celsius"]
}
},
"required": ["sensor_id", "value", "unit"]
}
},
"metadata": {
"type": "object",
"description": "Additional metadata about the experiment.",
"properties": {
"location": {
"type": "string",
"description": "Location where the experiment was conducted.",
"examples": ["Lab A"]
},
"operator": {
"type": "string",
"description": "Name or ID of the person who conducted the experiment.",
"examples": ["John Doe"]
}
},
"required": ["location"]
}
},
"required": ["experiment_id", "timestamp", "sensor_data"],
"additionalProperties": false
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment