# Path: grace/error.py
# class CreateFolderError(Error):
#     pass
# 
# class FileNotWritableError(Error):
#     pass
# 
# class RemoveFolderError(Error):
#     pass


from builtins import object
from .error import CreateFolderError, FileNotWritableError, RemoveFolderError
from shutil import rmtree
import grace.py27.pyjsdoc
import os
from __future__ import absolute_import


class Doc(object):
    def __init__(self, config):
        self._cwd = os.getcwd()
        self._config = config

        if 'doc_path' not in self._config:
            self._doc_path = None
        else:
            self._doc_path = os.path.join(self._config['doc_path'], self._config['name'])

        self._lib_path = os.path.join(self._cwd, 'src', 'lib')


# Path: grace/error.py
# class CreateFolderError(Error):
#     pass
# 
# class FileNotWritableError(Error):
#     pass
# 
# class RemoveFolderError(Error):
#     pass


# Path: grace/doc.py
from builtins import object
from .error import CreateFolderError, FileNotWritableError, RemoveFolderError
from shutil import rmtree
import grace.py27.pyjsdoc
import os

from __future__ import absolute_import


class Doc(object):
    def __init__(self, config):
        self._cwd = os.getcwd()
        self._config = config

        if 'doc_path' not in self._config:
            self._doc_path = None
        else:
            self._doc_path = os.path.join(self._config['doc_path'], self._config['name'])

        self._lib_path = os.path.join(self._cwd, 'src', 'lib')


    def run(self, with_libs=False):