コード例 #1
0
ファイル: t999_test.py プロジェクト: inowas/pymake
def test_previous_assets():
    # hack for failure of OSX on github actions
    env = "GITHUB_ACTIONS"
    # os.environ[env] = "true"
    allow_failure = False
    if env in os.environ:
        if sys.platform.lower() == "darwin":
            if os.environ.get(env) == "true":
                allow_failure = True

    mfexes_repo_name = "MODFLOW-USGS/modflow6"
    version = "6.1.0"
    assets = pymake.get_repo_assets(mfexes_repo_name,
                                    version=version,
                                    error_return=True)
    msg = "failed to get release {} ".format(
        version) + "from the '{}' repo".format(mfexes_repo_name)
    if allow_failure:
        if not isinstance(assets, dict):
            print(msg)
        else:
            print("available assets: {}".format(", ".join(assets.keys())))
    else:
        assert isinstance(assets, dict), msg
        print("available assets: {}".format(", ".join(assets.keys())))
コード例 #2
0
ファイル: t999_test.py プロジェクト: Hofer-Julian/pymake
def test_previous_assets():
    mfexes_repo_name = 'MODFLOW-USGS/modflow6'
    version = '6.0.4'
    assets = pymake.get_repo_assets(mfexes_repo_name, version=version)
    msg = "failed to get release {} ".format(version) + \
          "from the '{}' repo".format(mfexes_repo_name)
    assert isinstance(assets, dict), msg
    return
コード例 #3
0
ファイル: t999_test.py プロジェクト: Hofer-Julian/pymake
def test_latest_assets():
    mfexes_repo_name = 'MODFLOW-USGS/executables'
    assets = pymake.get_repo_assets(mfexes_repo_name)
    keys = assets.keys()
    test_keys = ['mac.zip', 'linux.zip', 'win32.zip', 'win64.zip']
    for key in keys:
        msg = 'unknown key ({}) found in github repo assets'.format(key)
        assert key in test_keys, msg
    return
コード例 #4
0
ファイル: t999_test.py プロジェクト: inowas/pymake
def test_latest_assets():
    mfexes_repo_name = "MODFLOW-USGS/executables"
    assets = pymake.get_repo_assets(mfexes_repo_name)
    keys = assets.keys()
    test_keys = ["mac.zip", "linux.zip", "win32.zip", "win64.zip"]
    for key in keys:
        print("evaluating the availability of...{}".format(key))
        msg = "unknown key ({}) found in github repo assets".format(key)
        assert key in test_keys, msg
    return
コード例 #5
0
ファイル: ci_get_exes.py プロジェクト: wha7/modflow6-examples
import numpy as np
import matplotlib as mpl
import flopy
import pymake

# Print python package versions
flopypth = flopy.__path__[0]
pymakepth = pymake.__path__[0]
print("python version:     {}".format(sys.version))
print("numpy version:      {}".format(np.__version__))
print("matplotlib version: {}".format(mpl.__version__))
print("flopy version:      {}".format(flopy.__version__))
print("pymake version:     {}".format(pymake.__version__))
print("")
print("flopy is installed in:  {}".format(flopypth))
print("pymake is installed in: {}".format(pymakepth))

# Update flopy from GitHub repo
flopy.mf6.utils.generate_classes(branch="develop", backup=False)

# Get executables
bin_pth = os.path.join("..", "bin")
if not os.path.isdir(bin_pth):
    os.makedirs(bin_pth)
pymake.getmfexes(bin_pth, verbose=True)

# Replace MODFLOW 6 executables with the latest versions
url = pymake.get_repo_assets(
    "MODFLOW-USGS/modflow6-nightly-build")["linux.zip"]
pymake.download_and_unzip(url, bin_pth, verbose=True)