def __init__(self): if 'REAHLWORKSPACE' in os.environ: workspace_dir = os.environ['REAHLWORKSPACE'] else: workspace_dir = os.path.expanduser('~') print('REAHLWORKSPACE environment variable not set, defaulting to %s' % workspace_dir, file=sys.stderr) work_directory = os.path.abspath(os.path.expanduser(workspace_dir)) self.workspace = Workspace(work_directory) self.workspace.read() super().__init__()
class WorkspaceCommand(Command): """A specialised form of Command which is used in development. Its operations are assumed to often involve the development workspace. """ def __init__(self): if 'REAHLWORKSPACE' in os.environ: workspace_dir = os.environ['REAHLWORKSPACE'] else: workspace_dir = os.path.expanduser('~') print('REAHLWORKSPACE environment variable not set, defaulting to %s' % workspace_dir, file=sys.stderr) work_directory = os.path.abspath(os.path.expanduser(workspace_dir)) self.workspace = Workspace(work_directory) self.workspace.read() super().__init__()
def bootstrap_workspace(workspace_dir, core_project_dirs): make_core_projects_importable(core_project_dirs) from reahl.dev.devdomain import Project, Workspace workspace = Workspace(workspace_dir) for project_dir in core_project_dirs: Project.from_file(workspace, os.path.join(os.getcwd(), project_dir)) core_projects = [Project.from_file(workspace, os.path.join(os.getcwd(), project_dir)) for project_dir in core_project_dirs] return workspace, core_projects
# GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # -*- coding: utf-8 -*- # import sys, os, datetime # 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 # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) from reahl.dev.devdomain import Workspace, ChickenProject reahl_project = ChickenProject.from_file(Workspace('/tmp'), '../../') for i in reahl_project.egg_project_names: sys.path.insert(0, os.path.abspath('../../%s' % i)) # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc','sphinxcontrib.plantuml'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates']