Commit 27b530e5 authored by Philipp Reuber's avatar Philipp Reuber
Browse files

modify Dockerfile to build documentation

parent 2f562d28
......@@ -14,7 +14,6 @@ RUN dnf -y update
RUN dnf -y install \
make \
python3-sphinx \
python3-pip \
......@@ -23,6 +22,8 @@ RUN dnf --refresh -y install \
RUN pip3 install sphinx_rtd_theme
RUN pip3 install sphinx==2.2.0
# ADD . /cimpy
# WORKDIR /cimpy
\ No newline at end of file
sphinx-apidoc -F -f -H "cimpy" -o "./" "../"
sphinx-apidoc -F -f -H "cimpy" -o "../documentation" "../"
cd ../documentation
make html
......@@ -18,7 +18,7 @@ sys.path.insert(0, os.path.abspath('../'))
# -- Project information -----------------------------------------------------
project = 'cimpy'
copyright = '2019, Author'
copyright = '2019, ACS RWTH Aachen University'
author = 'Author'
.. cimgen documentation master file, created by
sphinx-quickstart on Thu Oct 24 10:37:56 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to cimgen's documentation!
Welcome to cimpy's documentation!
Cimgen is a tool for generation and modification of CIM data.
Cimpy is a tool for generation of CIM data.
Package Content
......@@ -24,8 +19,8 @@ Installation
.. code-block:: bash
$ git clone
$ cd cimgen
$ git clone
$ cd cimpy
$ python develop
......@@ -50,7 +45,7 @@ Optional Arguments:
:res: A map containing the CIMpy objects with the UUID as map key
`Example for CIM Import <>`_
`Example for CIM Import <>`_
CIM Export
......@@ -59,16 +54,17 @@ Function for serialization of CIMpy objects to XML files.
.. code-block::
cimpy.cim_export(res, namespaces_dict, file_name, version):
cimpy.cim_export(res, namespaces_dict, file_name, version, acitiveProfileList):
:res: A dictionary containing all CIMpy objects accessible via the UUID
:namespaces_dict: A dictionary containing the namespaces of the original XML files
:file_name: String containing the name for the XML files.
:version: String containing the CGMES version
:activeProfileList: A list containing all profiles which are active for the export
One XML file for each package in the CGMES version. The package name is added to the file name like [file_name]_[package].xml
`Example for CIM Generate <>`_
`Example for CIM Generate <>`_
......@@ -3,16 +3,16 @@ import os
from tempfile import mkstemp
from shutil import move, copy
directory = os.getcwd()
directory = os.path.abspath(os.path.join('..', 'documentation'))
if '' in os.listdir(directory):
conf_file = os.path.abspath('')
conf_file = os.path.abspath(os.path.join(directory, ''))
real_conf_file = os.path.abspath('')
copy(real_conf_file, conf_file)
if 'index.rst' in os.listdir(directory):
index_file = os.path.abspath('index.rst')
index_file = os.path.abspath(os.path.join(directory, 'index.rst'))
real_index_file = os.path.abspath('real_index.rst')
copy(real_index_file, index_file)
......@@ -23,7 +23,7 @@ for file in os.listdir(directory):
file_path = os.path.abspath(file)
fh, abs_path = mkstemp()
with open(fh, 'w') as new_file:
with open(file) as old_file:
with open(os.path.join(directory, file)) as old_file:
for line in old_file:
if 'undoc-members' in line:
......@@ -39,6 +39,6 @@ for file in os.listdir(directory):
move(abs_path, file_path)
remove(os.path.join(directory, file))
move(abs_path, os.path.join(directory, file))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment