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 \
graphviz-devel
......@@ -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" "../"
python3 set_inheritance_diagram.py
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 https://git.rwth-aachen.de/acs/core/cim/cimgen.git
$ cd cimgen
$ git clone https://git.rwth-aachen.de/acs/public/cim/cimpy
$ cd cimpy
$ python setup.py develop
Usage
......@@ -50,7 +45,7 @@ Optional Arguments:
Output:
:res: A map containing the CIMpy objects with the UUID as map key
`Example for CIM Import <https://git.rwth-aachen.de/acs/core/cim/cimgen/blob/cimexport/examples/quickstart/readCIGREMV.py>`_
`Example for CIM Import <https://git.rwth-aachen.de/acs/public/cim/cimpy/blob/master/examples/quickstart/readCIGREMV.py>`_
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):
Arguments:
: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
Output:
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 <https://git.rwth-aachen.de/acs/core/cim/cimgen/blob/cimexport/examples/quickstart/exportCIGREMV.py>`_
`Example for CIM Generate <https://git.rwth-aachen.de/acs/public/cim/cimpy/blob/master/examples/quickstart/exportCIGREMV.py>`_
......@@ -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 'conf.py' in os.listdir(directory):
conf_file = os.path.abspath('conf.py')
conf_file = os.path.abspath(os.path.join(directory, 'conf.py'))
real_conf_file = os.path.abspath('real_conf.py')
remove(conf_file)
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')
remove(index_file)
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:
continue
......@@ -39,6 +39,6 @@ for file in os.listdir(directory):
new_file.write('')
new_file.write('')
remove(file_path)
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