<commit_before>#include <Python.h>
#include <faidx.h>
#include "structmember.h"
#include "base.h"
#include "fasta.h"

/* Fasta file iterator functions */
PyMethodDef Fasta_methods[] = {
    {"jump", (PyCFunction)Fasta_jump, METH_VARARGS, "jump to a position"},
    {"slice", (PyCFunction)Fasta_slice, METH_VARARGS, "slice a range"},
    {"__enter__", (PyCFunction)Fasta_enter, METH_VARARGS, "context entry"},
    {"__exit__", (PyCFunction)Fasta_exit, METH_VARARGS, "context exit"},
    {NULL}
};

PyMemberDef Fasta_members[] = {
    {"contig", T_OBJECT_EX, offsetof(tactmod_FastaObject, contig), 0, "name"},
    {NULL}
};

PyTypeObject tactmod_FastaType = {
    PyObject_HEAD_INIT(NULL)
    0,"tactmod.Fasta", sizeof(tactmod_FastaObject),
    0,
    (destructor)Fasta_dealloc,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    "Fasta file object",
    0,0,0,0,0,0,
    Fasta_methods,
    Fasta_members,
    0,0,0,0,0,0,
    (initproc)Fasta_init,
    0,
    Fasta_new
};

PyTypeObject tactmod_FastaIterType = {
    PyObject_HEAD_INIT(NULL)
    0,"tactmod.FastaIter",sizeof(tactmod_FastaIter),
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER,
    "Fasta file iterator object",
    0,0,0,0,
    tactmod_FastaIter_iter,
    tactmod_FastaIter_next,
};

PyObject *
Fasta_enter(PyObject *self)
{
    trace("context entry");
    return self;
}

PyObject *
Fasta_exit(PyObject *self)
{
    trace("context exit");
    return self;
}

PyObject *
tactmod_FastaIter_iter(PyObject *self)
{
    Py_INCREF(self);
    return self;
}

PyObject *
tactmod_FastaIter_next(PyObject *self)<commit_msg>removing traces<commit_after>#include <Python.h>
#include <faidx.h>
#include "structmember.h"
#include "base.h"
#include "fasta.h"

/* Fasta file iterator functions */
PyMethodDef Fasta_methods[] = {
    {"jump", (PyCFunction)Fasta_jump, METH_VARARGS, "jump to a position"},
    {"slice", (PyCFunction)Fasta_slice, METH_VARARGS, "slice a range"},
    {"__enter__", (PyCFunction)Fasta_enter, METH_VARARGS, "context entry"},
    {"__exit__", (PyCFunction)Fasta_exit, METH_VARARGS, "context exit"},
    {NULL}
};

PyMemberDef Fasta_members[] = {
    {"contig", T_OBJECT_EX, offsetof(tactmod_FastaObject, contig), 0, "name"},
    {NULL}
};

PyTypeObject tactmod_FastaType = {
    PyObject_HEAD_INIT(NULL)
    0,"tactmod.Fasta", sizeof(tactmod_FastaObject),
    0,
    (destructor)Fasta_dealloc,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    "Fasta file object",
    0,0,0,0,0,0,
    Fasta_methods,
    Fasta_members,
    0,0,0,0,0,0,
    (initproc)Fasta_init,
    0,
    Fasta_new
};

PyTypeObject tactmod_FastaIterType = {
    PyObject_HEAD_INIT(NULL)
    0,"tactmod.FastaIter",sizeof(tactmod_FastaIter),
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER,
    "Fasta file iterator object",
    0,0,0,0,
    tactmod_FastaIter_iter,
    tactmod_FastaIter_next,
};

PyObject *
Fasta_enter(PyObject *self)
{
    return self;
}

PyObject *
Fasta_exit(PyObject *self)
{
    return self;
}

PyObject *
tactmod_FastaIter_iter(PyObject *self)
{
    Py_INCREF(self);
    return self;
}

PyObject *
tactmod_FastaIter_next(PyObject *self)
{'fraction_non_alphanumeric': 0.14448903982710712, 'fraction_numerical': 0.031491200987959246, 'mean_word_length': 4.724381625441696, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3651656', 'n_tokens_mistral': 1347, 'n_tokens_neox': 1355, 'n_words': 208}