示例#1
0
def test_newProject() -> None:
    """Test creating a new project"""
    from datapaths import path_project_new
    from resistics.project.io import newProject

    proj = newProject(path_project_new, "2020-01-01 12:00:00")
    assert proj.refTime.strftime("%Y-%m-%d %H:%M:%S.%f") == "2020-01-01 12:00:00.000000"
    assert proj.sites == []
示例#2
0
from datapaths import projectPath
from resistics.project.io import newProject

refTime = "2016-01-18 00:00:00"
newProject(projectPath, refTime)
示例#3
0
from datapaths import intersitePath
from resistics.project.io import newProject

refTime = "2019-05-27 00:00:00"
newProject(intersitePath, refTime)
示例#4
0
from datapaths import projectPath  # import the project path
from resistics.project.io import newProject

# define reference time for project
referenceTime = "2018-01-01 00:00:00"
# create a new project and print infomation
projData = newProject(projectPath, referenceTime)
projData.printInfo()
# create a new site
projData.createSite("site1")
projData.printInfo()
示例#5
0
from datapaths import preprocessPath
from resistics.project.io import newProject

refTime = "2012-02-10 00:00:00"
newProject(preprocessPath, refTime)
示例#6
0
from datapaths import path_integrated_singlesite
from resistics.project.io import newProject

# project 1
newProject(path_integrated_singlesite, "2016-02-18 12:00:00")
示例#7
0
from datapaths import remotePath
from resistics.project.io import newProject

# define the project path. The project will be created under this project path.
# If the path does not exist, it will be created
projData = newProject(remotePath, "2016-01-18 00:00:00")

# let's create 2 sites
# M6 is the location of interest. Remote is a remote reference station.
projData.createSite("M6")
projData.createSite("RemoteSPAM")