From a2bb8591c48078cb8bb92ee70abb468f33ccca80 Mon Sep 17 00:00:00 2001 From: "Noe S. Sanchez" <79063530+Noe-Sanchez@users.noreply.github.com> Date: Sun, 28 Jan 2024 01:37:45 -0600 Subject: [PATCH] Initial commit --- .gitignore | 1 + LICENSE | 21 +++++++++++++++++ README.md | 4 ++++ doc/Makefile | 20 +++++++++++++++++ doc/another-feature.md | 51 ++++++++++++++++++++++++++++++++++++++++++ doc/conf.py | 28 +++++++++++++++++++++++ doc/index.rst | 14 ++++++++++++ doc/make.bat | 35 +++++++++++++++++++++++++++++ doc/some-feature.md | 14 ++++++++++++ src/README.md | 1 + 10 files changed, 189 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 doc/Makefile create mode 100644 doc/another-feature.md create mode 100644 doc/conf.py create mode 100644 doc/index.rst create mode 100644 doc/make.bat create mode 100644 doc/some-feature.md create mode 100644 src/README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..69fa449 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +_build/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5e93c8a --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) CodeRefinery + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..16f870d --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Documentation example + +We use this example in the lesson +[How to document your research software](https://coderefinery.github.io/documentation/). diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..d4bb2cb --- /dev/null +++ b/doc/Makefile @@ -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) diff --git a/doc/another-feature.md b/doc/another-feature.md new file mode 100644 index 0000000..28125ea --- /dev/null +++ b/doc/another-feature.md @@ -0,0 +1,51 @@ +# More features here + + +## Some text + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod +tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, +quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo +consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse +cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non +proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + + +## Table + +| No. | Prime | +| ---- | ------ | +| 1 | No | +| 2 | Yes | +| 3 | Yes | +| 4 | No | + + + +## Code blocks + +The following is a Python code block: +```python + def hello(): + print("Hello world") +``` + +And this is a C code block: +```c +#include +int main() +{ + printf("Hello, World!"); + return 0; +} +``` + + +## Math + +This creates an equation: +```{math} +a^2 + b^2 = c^2 +``` + +This is an in-line equation, {math}`a^2 + b^2 = c^2`, embedded in text. diff --git a/doc/conf.py b/doc/conf.py new file mode 100644 index 0000000..7bf72f5 --- /dev/null +++ b/doc/conf.py @@ -0,0 +1,28 @@ +# 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 = 'Example' +copyright = 'workshop participant' +author = 'workshop participant' +release = '0.1' + + +# -- 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'] + + +# -- 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'] diff --git a/doc/index.rst b/doc/index.rst new file mode 100644 index 0000000..a3c60e0 --- /dev/null +++ b/doc/index.rst @@ -0,0 +1,14 @@ +.. Example documentation master file, created by + sphinx-quickstart on Sat Sep 23 20:35:12 2023. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to Example's documentation! +=================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + some-feature.md + another-feature.md diff --git a/doc/make.bat b/doc/make.bat new file mode 100644 index 0000000..32bb245 --- /dev/null +++ b/doc/make.bat @@ -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 diff --git a/doc/some-feature.md b/doc/some-feature.md new file mode 100644 index 0000000..cd6ac9f --- /dev/null +++ b/doc/some-feature.md @@ -0,0 +1,14 @@ +# Some feature + +## Subsection + +Exciting documentation in here. +Let's make a list (empty surrounding lines required): + +- item 1 + + - nested item 1 + - nested item 2 + +- item 2 +- item 3 diff --git a/src/README.md b/src/README.md new file mode 100644 index 0000000..7bd5761 --- /dev/null +++ b/src/README.md @@ -0,0 +1 @@ +Here can be the source code files for your project ...