Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove _internal directories #423

Merged
merged 16 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 29 additions & 6 deletions src/ga4gh/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,43 @@

"""

import warnings
from importlib.metadata import version, PackageNotFoundError

from ._internal.digests import sha512t24u
from ._internal.enderef import ga4gh_enref, ga4gh_deref
from ._internal.identifiers import (
from .digests import sha512t24u
from .enderef import ga4gh_enref, ga4gh_deref
from .identifiers import (
ga4gh_digest, ga4gh_identify, ga4gh_serialize, is_ga4gh_identifier,
parse_ga4gh_identifier, VrsObjectIdentifierIs, use_ga4gh_compute_identifier_when,
CURIE_NAMESPACE, CURIE_SEP, GA4GH_PREFIX_SEP, GA4GH_IR_REGEXP, GA4GH_DIGEST_REGEXP
)
from ._internal.pydantic import (
from .pydantic import (
is_pydantic_instance, is_curie_type, is_ga4gh_identifiable, is_literal, pydantic_copy
)
from ._internal import models as common_models
from . import models as common_models

__all__ = [
"sha512t24u",
"ga4gh_enref",
"ga4gh_deref",
"ga4gh_digest",
"ga4gh_identify",
"ga4gh_serialize",
"is_ga4gh_identifier",
"parse_ga4gh_identifier",
"VrsObjectIdentifierIs",
"use_ga4gh_compute_identifier_when",
"CURIE_NAMESPACE",
"CURIE_SEP",
"GA4GH_PREFIX_SEP",
"GA4GH_IR_REGEXP",
"GA4GH_DIGEST_REGEXP",
"is_pydantic_instance",
"is_curie_type",
"is_ga4gh_identifiable",
"is_literal",
"pydantic_copy",
"common_models"
]

try:
__version__ = version(__name__)
Expand Down
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 8 additions & 3 deletions src/ga4gh/vrs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@
from importlib.metadata import version, PackageNotFoundError

from .normalize import normalize
from ._internal.enderef import vrs_deref, vrs_enref
from ._internal import models
from .enderef import vrs_deref, vrs_enref
from . import models

__all__ = """models normalize schema_path vrs_deref vrs_enref""".split()
__all__ = [
"normalize",
"vrs_deref",
"vrs_enref",
"models"
]

try:
__version__ = version(__name__)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

from pydantic import BaseModel, Field, RootModel, StringConstraints, model_serializer

from ga4gh.core._internal.pydantic import (
from ga4gh.core.pydantic import (
is_ga4gh_identifiable,
getattr_in
)
from ga4gh.core._internal.models import IRI, Expression, _DomainEntity
from ga4gh.core.models import IRI, Expression, _DomainEntity


def flatten(vals):
Expand Down
2 changes: 1 addition & 1 deletion src/ga4gh/vrs/normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from bioutils.normalize import normalize as _normalize, NormalizationMode
from ga4gh.core import is_pydantic_instance, ga4gh_digest, pydantic_copy

from ._internal import models
from . import models
from .dataproxy import SequenceProxy


Expand Down
Loading