<commit_before>"""
test_json2owl.py: Convert paper.json into paper.owl.
"""

import pytest
import os

def test_json_to_owl(paper_json):
    """ Convert paper.json file to paper.owl via labeled.owl. """
    path = paper_json[:-11]
    
    labeled_json = paper_json[:-10] + "labeled.owl"
    paper_owl = paper_json[:-5] + ".owl"

    # For now, let's just use 
    # Since these are all Python tasks, eventually we should be able to
    # execute them straight from Python.
    current_path = os.getcwd()
    os.chdir(path)

    try:
        assert os.system('python ../add-labels.py paper.json -o labeled.json') == 0
        assert os.system('rdfpipe -i json-ld -o xml labeled.json > paper.owl') == 0

        # On Windows, this will end up being Unicode 16 -- which is fine,<commit_msg>Poke, Travis.<commit_after>"""
test_json2owl.py: Convert paper.json into paper.owl.
"""

import pytest
import os

def test_json_to_owl(paper_json):
    """ Convert paper.json file to paper.owl via labeled.owl. """
    path = paper_json[:-11]
    
    labeled_json = paper_json[:-10] + "labeled.owl"
    paper_owl = paper_json[:-5] + ".owl"

    # For now, let's just use 
    # Since these are all Python tasks, eventually we should be able to
    # execute them straight from Python.

    current_path = os.getcwd()
    try:
        os.chdir(path)
        assert os.system('python ../add-labels.py paper.json -o labeled.json') == 0
        assert os.system('rdfpipe -i json-ld -o xml labeled.json > paper.owl') == 0

        # On Windows, this will end up being Unicode 16 -- which is fine,
{'fraction_non_alphanumeric': 0.12547528517110265, 'fraction_numerical': 0.012674271229404309, 'mean_word_length': 2.7865707434052758, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '2846280', 'n_tokens_mistral': 551, 'n_tokens_neox': 505, 'n_words': 162}