Exemple #1
0
def execute(context):
    version = context.config("eqasim_version")

    # Normal case: we clone eqasim
    if context.config("eqasim_path") == "":
        # Clone repository and checkout version
        git.run(context, [
            "clone", context.config("eqasim_repository"),
            "--branch", context.config("eqasim_branch"),
            "--single-branch", "eqasim-java",
            "--depth", "1"
        ])

        # Build eqasim
        maven.run(context, ["-Pstandalone", "--projects", "ile_de_france", "--also-make", "package"], cwd = "%s/eqasim-java" % context.path())
        jar_path = "%s/eqasim-java/ile_de_france/target/ile_de_france-%s.jar" % (context.path(), version)

    # Special case: We provide the jar directly. This is mainly used for
    # creating input to unit tests of the eqasim-java package.
    else:
        os.makedirs("%s/eqasim-java/ile_de_france/target" % context.path())
        shutil.copy(context.config("eqasim_path"),
            "%s/eqasim-java/ile_de_france/target/ile_de_france-%s.jar" % (context.path(), version))

    return "eqasim-java/ile_de_france/target/ile_de_france-%s.jar" % version
Exemple #2
0
def execute(context):
    version = context.config("pt2matsim_version")
    branch = context.config("pt2matsim_branch")

    # Clone repository and checkout version
    git.run(context, [
        "clone", "https://github.com/matsim-org/pt2matsim.git", "--branch",
        branch, "--single-branch", "pt2matsim", "--depth", "1"
    ])

    # git.run(context, [
    #     "clone",  "/home/valoo/Projects/IFSTTAR/pt2matsim",
    #     "pt2matsim"
    # ])

    # Build pt2matsim
    maven.run(context, ["package"], cwd="%s/pt2matsim" % context.path())
    jar_path = "%s/pt2matsim/target/pt2matsim-%s-shaded.jar" % (context.path(),
                                                                version)

    # Test pt2matsim
    java.run(context, "org.matsim.pt2matsim.run.CreateDefaultOsmConfig",
             ["test_config.xml"], jar_path)

    assert os.path.exists("%s/test_config.xml" % context.path())
Exemple #3
0
def execute(context):
    version = context.config("pt2matsim_version")

    # Clone repository and checkout version
    git.run(context, [
        "clone", "https://github.com/matsim-org/pt2matsim.git", "--branch",
        "v%s" % version, "--single-branch", "pt2matsim", "--depth", "1"
    ])

    # Build pt2matsim
    maven.run(context, ["package"], cwd="%s/pt2matsim" % context.path())
    jar_path = "%s/pt2matsim/target/pt2matsim-%s-shaded.jar" % (context.path(),
                                                                version)
Exemple #4
0
def execute(context):
    version = context.config("eqasim_version")

    # Clone repository and checkout version
    git.run(context, [
        "clone", "https://github.com/eqasim-org/eqasim-java.git",
        "--branch", "v%s" % version,
        "--single-branch", "eqasim-java",
        "--depth", "1"
    ])

    # Build eqasim
    maven.run(context, ["-Pstandalone", "package"], cwd = "%s/eqasim-java" % context.path())
    jar_path = "%s/eqasim-java/ile_de_france/target/ile_de_france-%s.jar" % (context.path(), version)

    return "eqasim-java/ile_de_france/target/ile_de_france-%s.jar" % version
Exemple #5
0
def execute(context):
    version = context.config("eqasim_version")
    eqasim_java_package = context.config("eqasim_java_package")

    # Clone repository and checkout version
    git.run(context, [
        "clone", "https://github.com/eqasim-org/eqasim-java.git", "--branch",
        "develop", "--single-branch", "eqasim-java", "--depth", "1"
    ])

    # Build eqasim
    maven.run(context, ["-Pstandalone", "package"],
              cwd="%s/eqasim-java" % context.path())
    jar_path = "%s/eqasim-java/%s/target/%s-%s.jar" % (
        context.path(), eqasim_java_package, eqasim_java_package, version)

    return "eqasim-java/san_francisco/target/san_francisco-%s.jar" % version