Exemple #1
0
def test_load_commits():
    commits = load_commits("matplotlib", "matplotlib", data_home=DATA_HOME)
    clear_data_home(data_home=DATA_HOME)
    assert_equal(commits, None)

    # Now use some mockdata
    data_home = os.path.join(dirname(__file__), "../mockdata")
    commits = load_commits("matplotlib", "matplotlib", data_home=data_home)
    assert_true(len(commits) == 3)
Exemple #2
0
def test_load_issues():
    issues = load_issues("matplotlib", "matplotlib", data_home=DATA_HOME)
    clear_data_home(data_home=DATA_HOME)
    assert_equal(issues, None)

    # Now use some mockdata
    data_home = os.path.join(dirname(__file__), "../mockdata")
    issues = load_issues("matplotlib", "matplotlib", data_home=data_home)
    assert_true(len(issues) == 32)
Exemple #3
0
def test_get_PRs():
    PRs = get_PRs("matplotlib", "matplotlib", data_home=DATA_HOME)
    clear_data_home(data_home=DATA_HOME)
    assert_equal(PRs, None)

    # Now use some mockdata
    data_home = os.path.join(dirname(__file__), "../mockdata")
    PRs = get_PRs("matplotlib", "matplotlib", data_home=data_home)
    assert_true(len(PRs) == 21)
Exemple #4
0
def test_load_commits():
    commits = load_commits("matplotlib", "matplotlib", data_home=DATA_HOME)
    clear_data_home(data_home=DATA_HOME)
    assert_equal(commits, None)

    # Now use some mockdata
    data_home = _fake_datasets.get_mock_directory_path()
    commits = load_commits("matplotlib", "matplotlib", data_home=data_home)
    assert_true(len(commits) == 3)
Exemple #5
0
def test_load_issues():
    issues = load_issues("matplotlib", "matplotlib", data_home=DATA_HOME)
    clear_data_home(data_home=DATA_HOME)
    assert_equal(issues, None)

    # Now use some mockdata
    data_home = _fake_datasets.get_mock_directory_path()
    issues = load_issues("matplotlib", "matplotlib", data_home=data_home)
    assert_true(len(issues) == 32)
Exemple #6
0
def test_data_home():
    # get_data_home will point to a pre-existing folder
    data_home = get_data_home(data_home=DATA_HOME)
    assert_equal(data_home, DATA_HOME)
    assert_true(os.path.exists(data_home))

    # clear_data_home will delete both the content and the folder it-self
    clear_data_home(data_home=data_home)
    assert_false(os.path.exists(data_home))

    # if the folder is missing it will be created again
    data_home = get_data_home(data_home=DATA_HOME)
    assert_true(os.path.exists(data_home))
"""Update the project registration CSV with the latest version on dropbox"""
import mne
from watchtower._config import clear_data_home

clear_data_home()

# Projects
url_proj = "https://www.dropbox.com/s/0xendp6g404ntzh/Docathon%20Project%20registration%20%28Responses%29%20-%20Form%20Responses%201.csv?dl=0"
url_proj = url_proj.replace('www.dropbox.com', 'dl.dropboxusercontent.com')
mne.utils._fetch_file(url_proj, '../data/docathon_project_registration.csv')

# Users
url_user = "******"
url_user = url_user.replace('www.dropbox.com', 'dl.dropboxusercontent.com')
mne.utils._fetch_file(url_user, '../data/docathon_user_registration.csv')
print('Finished downloading files...')