Skip to content
Snippets Groups Projects
Commit 55d7e2f9 authored by Mayr, Hannes's avatar Mayr, Hannes Committed by Hock, Martin
Browse files

Docs

parent a05d5b53
Branches
Tags
2 merge requests!19merge dev for new release v.0.1.2,!18Docs
...@@ -11,6 +11,7 @@ image: python:latest ...@@ -11,6 +11,7 @@ image: python:latest
stages: stages:
- linting - linting
- testing - testing
- docs
# Change pip's cache directory to be inside the project directory since we can # Change pip's cache directory to be inside the project directory since we can
# only cache local items. # only cache local items.
...@@ -28,27 +29,26 @@ cache: ...@@ -28,27 +29,26 @@ cache:
# - venv/ # # - venv/ #
before_script: before_script:
- python --version # For debugging - python --version # For debugging
- pip install -r requirements.txt # install dependencies from file - pip install -r requirements.txt # install dependencies from file
- pip install flake8
- pip install pylint
# - pip install virtualenv # - pip install virtualenv
# - virtualenv venv # - virtualenv venv
# - source venv/bin/activate # - source venv/bin/activate
PEP8: PEP8:
stage: linting stage: linting
# allow_failure: true script:
script: flake8 --count . # PEP8 linting - pip install flake8
- flake8 --count . # PEP8 linting
Pylint: Pylint:
stage: linting stage: linting
# allow_failure: true # allow_failure: true
script: find . -type f -name '*.py' | xargs pylint -rn --rcfile='plotid/.pylintrc' # Find all python files and check the code with pylint. script:
- pip install pylint
- find . -type f -name '*.py' | xargs pylint -rn --rcfile='plotid/.pylintrc' # Find all python files and check the code with pylint.
test: test:
stage: testing stage: testing
...@@ -61,6 +61,19 @@ test: ...@@ -61,6 +61,19 @@ test:
# - pip install tox flake8 # you can also use tox # - pip install tox flake8 # you can also use tox
# - tox -e py36,flake8 # - tox -e py36,flake8
pages:
stage: docs
when: manual
script:
- pip install -U sphinx sphinx-autoapi sphinx_rtd_theme # sphinx_panels
- cd docs
- make html
- mv build/html/ ../public
artifacts:
paths:
- public
# Commenting out all other stages and jobs # Commenting out all other stages and jobs
#run: #run:
# script: # script:
...@@ -72,14 +85,3 @@ test: ...@@ -72,14 +85,3 @@ test:
# paths: # paths:
# - dist/*.whl # - dist/*.whl
#pages:
# script:
# - pip install sphinx sphinx-rtd-theme
# - cd doc
# - make html
# - mv build/html/ ../public/
# artifacts:
# paths:
# - public
# rules:
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
...@@ -99,5 +99,5 @@ If you want to build plotID yourself, follow these steps: ...@@ -99,5 +99,5 @@ If you want to build plotID yourself, follow these steps:
## Documentation ## Documentation
If you have more questions about plotID, please have a look at the [documentation](link-to-docs). If you have more questions about plotID, please have a look at the [documentation](https://plotid.pages.rwth-aachen.de/plotid_python).
Also have a look at the example.py that is shipped with plotID. Also have a look at the example.py that is shipped with plotID.
"""
# Configuration file for the Sphinx documentation builder. # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full # This file only contains a selection of the most common options. For a full
# list see the documentation: # list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html # https://www.sphinx-doc.org/en/master/usage/configuration.html
"""
# -- Path setup -------------------------------------------------------------- # -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory, # 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 # 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. # documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os import os
# import sys import sys
# sys.path.insert(0, os.path.abspath('../../plotid')) sys.path.insert(0, os.path.abspath('../..'))
from plotid import __version__, __author__ # noqa: E402
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
project = 'PlotID' project = 'plotID'
copyright = '2022, Example Author' copyright = '2022, ' + __author__
author = 'Example Author' author = __author__
# The full version, including alpha/beta/rc tags # The full version, including alpha/beta/rc tags
release = '0.0.6' release = __version__
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
...@@ -31,6 +35,7 @@ release = '0.0.6' ...@@ -31,6 +35,7 @@ release = '0.0.6'
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. # ones.
extensions = [ extensions = [
'sphinx.ext.napoleon',
'autoapi.extension' 'autoapi.extension'
] ]
autoapi_type = 'python' autoapi_type = 'python'
...@@ -50,7 +55,7 @@ exclude_patterns = [] ...@@ -50,7 +55,7 @@ exclude_patterns = []
# The theme to use for HTML and HTML Help pages. See the documentation for # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # a list of builtin themes.
# #
html_theme = 'alabaster' html_theme = 'sphinx_rtd_theme'
# Add any paths that contain custom static files (such as style sheets) here, # 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, # relative to this directory. They are copied after the builtin static files,
......
"""
plotID for Python.
This is the python plotID project.
plotID is a program connected to Research Data Management (RDM).
It has two main functionalities:
1. Tag your plot with an identifier.
2. Export the resulting file to a specified directory along the corresponding
research data, the plot is based on. Additionally, the script that created the
plot will also be copied to the directory.
"""
__version__ = '0.1.0'
__author__ = 'Institut Fluidsystemtechnik within nfdi4ing at TU Darmstadt'
...@@ -44,7 +44,7 @@ FIGS_AS_LIST = [FIG1, FIG2] ...@@ -44,7 +44,7 @@ FIGS_AS_LIST = [FIG1, FIG2]
IMGS_AS_LIST = [IMG1, IMG2] IMGS_AS_LIST = [IMG1, IMG2]
# Example for how to use tagplot with matplotlib figures # Example for how to use tagplot with matplotlib figures
[TAGGED_FIGS, ID] = tagplot('FIGS_AS_LIST', 'matplotlib', prefix=PROJECT_ID, [TAGGED_FIGS, ID] = tagplot(FIGS_AS_LIST, 'matplotlib', prefix=PROJECT_ID,
id_method='time', location='west') id_method='time', location='west')
# Example for how to use tagplot with image files # Example for how to use tagplot with image files
...@@ -55,6 +55,6 @@ IMGS_AS_LIST = [IMG1, IMG2] ...@@ -55,6 +55,6 @@ IMGS_AS_LIST = [IMG1, IMG2]
# Arguments: Source directory or files as list, destination directory, figures, # Arguments: Source directory or files as list, destination directory, figures,
# plots or images. # plots or images.
publish(['../README.md', '../dist', '../LICENSE'], publish(['../README.md', '../docs', '../LICENSE'],
'/home/chief/Dokumente/fst/plotid_python/data', '/home/chief/Dokumente/fst/plotid_python/data',
TAGGED_FIGS, 'Bild') TAGGED_FIGS, 'Bild')
[metadata] [metadata]
name = plotID name = plotID
version = 0.1.0 version = attr: plotid.__version__
author = Institut Fluidsystemtechnik within nfdi4ing at TU Darmstadt author = attr: plotid.__author__
author_email = nfdi4ing@fst.tu-darmstadt.de author_email = nfdi4ing@fst.tu-darmstadt.de
description = The plotID toolkit supports researchers in tracking and storing relevant data in plots. Plots are labelled with an ID and the corresponding data is stored. description = The plotID toolkit supports researchers in tracking and storing relevant data in plots. Plots are labelled with an ID and the corresponding data is stored.
license = Apache License, Version 2.0 license = Apache License, Version 2.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment