Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ If you intend to develop the code for your proposes or contribute to the open so
* Run tests
`python -m pytest`

### Building the documentation
* Activate virtual env (see Install from source)
* Install sphinx and myst-parser
`pip install sphinx myst-parser`
* Run sphinx-build command
`sphinx-build ./docs ./dist/docs`


### Commands:

Expand Down
20 changes: 20 additions & 0 deletions docs/Makefile
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 = .
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)
31 changes: 31 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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 = 'qct-parse'
copyright = '2024, AMIA Open-Source'
author = 'AMIA Open-Source'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['myst_parser']

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

source_suffix = {
'.rst': 'restructuredtext',
'.txt': 'markdown',
'.md': 'markdown',
}

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']
29 changes: 29 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Development Information

## Configure Development Environment

* Create a new Python Virtual Environment for qct_parse
* Unix based (Mac or Linux):
`python3 -m venv name_of_env`
* Windows:
`py -m venv name_of_env`
(where 'name_of_env' is replaced with the name of your virtual environment)
* Activate virtual env
* Unix based (Mac or Linux):
`source ./name_of_env/bin/activate`
* Windows:
`name_of_env\scripts\activate`
* Install Package as editable package
* Navigate to the repo root directory `path/to/qct-parse/`
* Run the command:
`python -m pip install -e .`

## Run Tests

If you intend to develop the code for your proposes or contribute to the open source project, a test directory is provided in the repo.
* Activate virtual env (see Configure Development Environment)
* Install pytest
`pip install pytest`
* Run tests
`python -m pytest`

14 changes: 14 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. qct-parse documentation master file, created by
sphinx-quickstart on Tue Dec 3 20:53:22 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

qct-parse documentation
=======================

.. toctree::
:maxdepth: 2
:caption: Contents:

readme
development
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
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
2 changes: 2 additions & 0 deletions docs/readme.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.. include:: ../README.md
:parser: myst_parser.sphinx_
Loading