예제 #1
0
        mss_settings_file_fs.writetext("mss_settings.json", option_value)
        mss_settings_file_fs.close()


if os.getenv("TESTS_VISIBLE") == "TRUE":
    Display = None
else:
    try:
        from pyvirtualdisplay import Display
    except ImportError:
        Display = None

if not constants.SERVER_CONFIG_FS.exists(constants.SERVER_CONFIG_FILE):
    print('\n configure testdata')
    # ToDo check pytest tmpdir_factory
    examples = DataFiles(data_fs=constants.DATA_FS,
                         server_config_fs=constants.SERVER_CONFIG_FS)
    examples.create_server_config(detailed_information=True)
    examples.create_data()

if not constants.SERVER_CONFIG_FS.exists(constants.MSCOLAB_CONFIG_FILE):
    config_string = f'''# -*- coding: utf-8 -*-
"""

    mslib.mscolab.conf.py.example
    ~~~~~~~~~~~~~~~~~~~~

    config for mscolab.

    This file is part of mss.

    :copyright: Copyright 2019 Shivashis Padhi
예제 #2
0
파일: conf.py 프로젝트: Marilyth/MSS
        epsg_file = os.path.join(proj_lib, 'epsg')
        if not os.path.exists(epsg_file):
            with open(os.path.join(proj_lib, 'epsg'), 'w') as fid:
                fid.write("# Placeholder for epsg data")

# Generate plot gallery
import fs
sys.path.insert(0,
                os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
from mslib.mswms.demodata import DataFiles

root_fs = fs.open_fs("~/")
if not root_fs.exists("mss/testdata"):
    root_fs.makedirs("mss/testdata")

examples = DataFiles(data_fs=fs.open_fs("~/mss/testdata"),
                     server_config_fs=fs.open_fs("~/mss"))
examples.create_server_config(detailed_information=True)
examples.create_data()

sys.path.insert(0, os.path.join(os.path.expanduser("~"), "mss"))

import mslib.mswms.wms
import mslib.mswms.gallery_builder

# Generate template plots
from docs.gallery.plot_examples import HS_template, VS_template
dataset = [next(iter(mslib.mswms.wms.mss_wms_settings.data))]
mslib.mswms.wms.mss_wms_settings.register_horizontal_layers = [
    (HS_template.HS_Template, dataset)
]
mslib.mswms.wms.mss_wms_settings.register_vertical_layers = [