<commit_before>from .{{ element.name }} import getEClassifier, eClassifiers
from .{{ element.name }} import name, nsURI, nsPrefix, eClass
from .{{ element.name }} import {{ element.eClassifiers | join(', ', attribute='name') }}

{%- if not element.eSuperPackage %}
    {%- with %}
        {%- set containing_types = element | all_contents(ecore.EClassifier) | map(attribute='eContainingClass') | list %}
        {%- set referenced_types = element | all_contents(ecore.EReference) | map(attribute='eType') | list %}
        {%- set types = containing_types + referenced_types %}
        {%- for sub in element | all_contents(ecore.EPackage) %}
from {{ sub | pyfqn }} import {{ types | selectattr('ePackage', sub) | join(', ') }}
        {% endfor -%}
    {% endwith -%}
{% endif %}
from . import {{ element.name }}

{%- if element.eSuperPackage %}
from .. import {{ element.eSuperPackage.name }}
{% endif %}

{%- for sub in element.eSubpackages %}
from . import {{ sub.name }}
{% endfor %}

__all__ = [{{ element.eClassifiers | map(attribute='name') | map('pyquotesingle') | join(', ') }}]

eSubpackages = [{{ element.eSubpackages | map(attribute='name') | join(', ') }}]
eSuperPackage = {{ element.eSuperPackage.name | default('None') }}
{% if not element.eSuperPackage %}
    {%- for e in element | all_contents(ecore.EReference) | rejectattr('eOpposite') %}
{{ e.eContainingClass.name }}.{{ e.name }}.eType = {{ e.eType.name }}
    {%- endfor %}
    {%- with opposites = element | all_contents(ecore.EReference) | selectattr('eOpposite') | list %}
        {%- for e in opposites %}
{{ e.eContainingClass.name }}.{{ e.name }}.eType = {{ e.eType.name }}
            {%- if e is opposite_before_self(opposites) %}
{{ e.eContainingClass.name }}.{{ e.name }}.eOpposite = {{ e.eOpposite.eContainingClass.name }}.{{ e.eOpposite.name }}
            {%- endif %}
        {%- endfor %}
    {%- endwith %}
{%- endif %}<commit_msg>generated remaining package initialization<commit_after>from .{{ element.name }} import getEClassifier, eClassifiers
from .{{ element.name }} import name, nsURI, nsPrefix, eClass
from .{{ element.name }} import {{ element.eClassifiers | join(', ', attribute='name') }}

{%- if not element.eSuperPackage %}
    {%- with %}
        {%- set containing_types = element | all_contents(ecore.EClassifier) | map(attribute='eContainingClass') | list %}
        {%- set referenced_types = element | all_contents(ecore.EReference) | map(attribute='eType') | list %}
        {%- set types = containing_types + referenced_types %}
        {%- for sub in element | all_contents(ecore.EPackage) %}
from {{ sub | pyfqn }} import {{ types | selectattr('ePackage', sub) | join(', ') }}
        {% endfor -%}
    {% endwith -%}
{% endif %}
from . import {{ element.name }}

{%- if element.eSuperPackage %}
from .. import {{ element.eSuperPackage.name }}
{% endif %}

{%- for sub in element.eSubpackages %}
from . import {{ sub.name }}
{% endfor %}

__all__ = [{{ element.eClassifiers | map(attribute='name') | map('pyquotesingle') | join(', ') }}]

eSubpackages = [{{ element.eSubpackages | map(attribute='name') | join(', ') }}]
eSuperPackage = {{ element.eSuperPackage.name | default('None') }}
{% if not element.eSuperPackage %}
    {%- for e in element | all_contents(ecore.EReference) | rejectattr('eOpposite') %}
{{ e.eContainingClass.name }}.{{ e.name }}.eType = {{ e.eType.name }}
    {%- endfor %}
    {%- with opposites = element | all_contents(ecore.EReference) | selectattr('eOpposite') | list %}
        {%- for e in opposites %}
{{ e.eContainingClass.name }}.{{ e.name }}.eType = {{ e.eType.name }}
            {%- if e is opposite_before_self(opposites) %}
{{ e.eContainingClass.name }}.{{ e.name }}.eOpposite = {{ e.eOpposite.eContainingClass.name }}.{{ e.eOpposite.name }}
            {%- endif %}
        {%- endfor %}
    {%- endwith %}
{%- endif %}

otherClassifiers = [{{ element.eClassifiers | select('type', ecore.EEnum) | map(attribute='name') | join(', ') }}]

for classif in otherClassifiers:
    eClassifiers[classif.name] = classif
    classif._container = {{ element.name }}

for classif in eClassifiers.values():
    eClass.eClassifiers.append(classif.eClass)

for subpack in eSubpackages:
    eClass.eSubpackages.append(subpack.eClass)
{'fraction_non_alphanumeric': 0.18739751698289997, 'fraction_numerical': 0.0, 'mean_word_length': 3.616216216216216, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5192095', 'n_tokens_mistral': 1488, 'n_tokens_neox': 1369, 'n_words': 275}