Skip to content

Commit

Permalink
refactor: remove _internal directories
Browse files Browse the repository at this point in the history
close #407

* Remove _internal directories and move files up a directory
  • Loading branch information
korikuzma committed Jul 10, 2024
1 parent d5bcaf5 commit 456b744
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 12 deletions.
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.
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.
4 changes: 2 additions & 2 deletions src/ga4gh/vrs/_internal/models.py → src/ga4gh/vrs/models.py
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

0 comments on commit 456b744

Please sign in to comment.