Esempio n. 1
0
def main():
    now = datetime.utcnow().strftime('%d %B %Y %H:%m')
    git_sha = requests.get('http://www.metarelate.net/metOcean/latest_sha').text
    with FusekiServer() as fuseki:
        build_um_cf_map(fuseki, FILE_UM_CF, now, git_sha)
        build_grib_cf_map(fuseki, FILE_GRIB_CF, now, git_sha)
    if (git_sha !=
        requests.get('http://www.metarelate.net/metOcean/latest_sha').text):
        raise ValueError('The metarelate translation store has altered during'
                         'your retrieval, the results may not be stable.\n'
                         'Please rerun your retrieval.')
Esempio n. 2
0
def main():
    now = datetime.utcnow().strftime('%d %B %Y %H:%m')
    git_sha = requests.get(
        'http://www.metarelate.net/metOcean/latest_sha').text
    gen_path = os.path.abspath(sys.modules['__main__'].__file__)
    iris_path = os.path.dirname(os.path.dirname(gen_path))
    with FusekiServer() as fuseki:
        build_um_cf_map(fuseki, now, git_sha, iris_path)
        build_grib_cf_map(fuseki, now, git_sha, iris_path)

    if (git_sha != requests.get(
            'http://www.metarelate.net/metOcean/latest_sha').text):
        raise ValueError('The metarelate translation store has altered during'
                         'your retrieval, the results may not be stable.\n'
                         'Please rerun your retrieval.')
Esempio n. 3
0
def main():
    desc = 'Update translations from metarelate into your source tree'
    parser = argparse.ArgumentParser(desc)
    helptxt = ('The location of your local checkout of iris-grib checkout'
               ' where the updated translations are to be stored.')
    parser.add_argument('--iris_grib', action='store', help=helptxt)
    args = parser.parse_args()
    now = datetime.utcnow().strftime('%d %B %Y %H:%m')
    git_sha = requests.get(
        'http://www.metarelate.net/metOcean/latest_sha').text
    gen_path = os.path.abspath(sys.modules['__main__'].__file__)
    iris_path = os.path.dirname(os.path.dirname(gen_path))
    with FusekiServer() as fuseki:
        build_um_cf_map(fuseki, now, git_sha, iris_path)
        if args.iris_grib:
            build_grib_cf_map(fuseki, now, git_sha, args.iris_grib)

    if (git_sha != requests.get(
            'http://www.metarelate.net/metOcean/latest_sha').text):
        raise ValueError('The metarelate translation store has altered during'
                         'your retrieval, the results may not be stable.\n'
                         'Please rerun your retrieval.')
Esempio n. 4
0
 def setUpClass(cls):
     cls.fuseki = FusekiServer(test=True)
     cls.fuseki.load()
     cls.fuseki.start()
Esempio n. 5
0
def main():
    with FusekiServer() as fuseki:
        fuseki.load()
        build_um_cf_map(fuseki, FILE_UM_CF)
        build_grib_cf_map(fuseki, FILE_GRIB_CF)