<commit_before>import os

from datetime import datetime

from rs_data_readers.GLDAS_NOAH.interface import GLDAS025Img


def test_GLDAS025Img_img_reading():

    parameter = ['086_L2', '086_L1', '085_L1', '138', '132', '051']
    img = GLDAS025Img(data_path=os.path.join(os.path.dirname(__file__),
                                             'image_data'),
                      parameter=parameter)

    data, metadata, timestamp, lon, lat, time = img.read_img(datetime(2015, 1, 1, 0))

    assert sorted(data.keys()) == sorted(parameter)
    assert timestamp == datetime(2015, 1, 1, 0)
    assert data['086_L1'][998529] == 30.7344
    assert data['086_L2'][998529] == 93.138
    assert data['085_L1'][206360] == 285.19
    assert data['138'][998529] == 237.27
    assert data['051'][998529] == 0
    assert lon.shape == (360 * 180 * (1/0.25)**2,)
    assert lon.shape == lat.shape
<commit_msg>change path to test-data submodule<commit_after>import os

from datetime import datetime

from rs_data_readers.GLDAS_NOAH.interface import GLDAS025Img


def test_GLDAS025Img_img_reading():

    parameter = ['086_L2', '086_L1', '085_L1', '138', '132', '051']
    img = GLDAS025Img(data_path=os.path.join(os.path.dirname(__file__),
                                             '..', 'test-data',
                                             'GLDAS_NOAH_image_data'),
                      parameter=parameter)

    data, metadata, timestamp, lon, lat, time = img.read_img(datetime(2015, 1, 1, 0))

    assert sorted(data.keys()) == sorted(parameter)
    assert timestamp == datetime(2015, 1, 1, 0)
    assert data['086_L1'][998529] == 30.7344
    assert data['086_L2'][998529] == 93.138
    assert data['085_L1'][206360] == 285.19
    assert data['138'][998529] == 237.27
    assert data['051'][998529] == 0
    assert lon.shape == (360 * 180 * (1/0.25)**2,)
    assert lon.shape == lat.shape

{'fraction_non_alphanumeric': 0.15058324496288442, 'fraction_numerical': 0.1325556733828208, 'mean_word_length': 2.8353658536585367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7131019', 'n_tokens_mistral': 796, 'n_tokens_neox': 635, 'n_words': 135}