<commit_before>#!/usr/bin/env python3

import os
import subprocess
import sys


cc_mapping = {'gcc': 'g++', 'clang': 'clang++'}
thisdir = os.path.dirname(os.path.abspath(__file__))

def update(branch, cc):
    gdt_super_dir = os.path.join(thisdir, '..', '..',)
    dockerfile = os.path.join(thisdir, 'dune-gdt-testing', 'Dockerfile')

    os.chdir(gdt_super_dir)

    cxx = cc_mapping[cc]
    branch = branch.replace('/', '_')
    repo = 'dunecommunity/dune-gdt-testing_{}'.format(cc)
    subprocess.check_call(['docker', 'build', '--no-cache=true', '-f', dockerfile,
                        '-t', '{}:{}'.format(repo, branch), '--build-arg', 'cc={}'.format(cc),
                        '--build-arg', 'cxx={}'.format(cxx), '--build-arg', 'branch={}'.format(branch),
                        .])
    subprocess.check_call(['docker', '--log-level="debug"', 'push', repo])

if __name__ == '__main__':
    if len(sys.argv) > 2:
        ccs = [sys.argv[1]]
        branches = [sys.argv[2]]
    else:
        ccs = list(cc_mapping.keys())
        branches = ['master']

    subprocess.check_call(['docker', 'pull', 'dunecommunity/testing-base:latest'])
    for b in branches:
        for c in ccs:
            update(b, c)<commit_msg>fixup! [travis/docker] fix wrong builddir for docker<commit_after>#!/usr/bin/env python3

import os
import subprocess
import sys


cc_mapping = {'gcc': 'g++', 'clang': 'clang++'}
thisdir = os.path.dirname(os.path.abspath(__file__))

def update(branch, cc):
    gdt_super_dir = os.path.join(thisdir, '..', '..',)
    dockerfile = os.path.join(thisdir, 'dune-gdt-testing', 'Dockerfile')

    os.chdir(gdt_super_dir)

    cxx = cc_mapping[cc]
    branch = branch.replace('/', '_')
    repo = 'dunecommunity/dune-gdt-testing_{}'.format(cc)
    subprocess.check_call(['docker', 'build', '--no-cache=true', '-f', dockerfile,
                        '-t', '{}:{}'.format(repo, branch), '--build-arg', 'cc={}'.format(cc),
                        '--build-arg', 'cxx={}'.format(cxx), '--build-arg', 'branch={}'.format(branch),
                        '.'])
    subprocess.check_call(['docker', '--log-level="debug"', 'push', repo])

if __name__ == '__main__':
    if len(sys.argv) > 2:
        ccs = [sys.argv[1]]
        branches = [sys.argv[2]]
    else:
        ccs = list(cc_mapping.keys())
        branches = ['master']

    subprocess.check_call(['docker', 'pull', 'dunecommunity/testing-base:latest'])
    for b in branches:
        for c in ccs:
            update(b, c)
{'fraction_non_alphanumeric': 0.2066479775730877, 'fraction_numerical': 0.0032038446135362435, 'mean_word_length': 2.7620481927710845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '218923', 'n_tokens_mistral': 917, 'n_tokens_neox': 885, 'n_words': 159}