Skip to content

Commit

Permalink
Correct version grabbing
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanFauble committed Nov 12, 2024
1 parent 7c06d42 commit a096639
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions schematic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
from typing import Dict, List

import pkg_resources
import requests
from opentelemetry import trace
from opentelemetry._logs import set_logger_provider
Expand All @@ -24,6 +23,7 @@
from synapseclient import Synapse
from werkzeug import Request

from schematic import version
from schematic.configuration.configuration import CONFIG
from schematic.loader import LOADER
from schematic_api.api.security_controller import info_from_bearer_auth
Expand Down Expand Up @@ -97,7 +97,7 @@ def set_up_tracing(session: requests.Session) -> None:
Synapse.enable_open_telemetry(True)
tracing_service_name = os.environ.get("TRACING_SERVICE_NAME", "schematic-api")
deployment_environment = os.environ.get("DEPLOYMENT_ENVIRONMENT", "")
package_version = pkg_resources.get_distribution("schematicpy").version
package_version = version.__version__
trace.set_tracer_provider(
TracerProvider(
resource=Resource(
Expand Down
2 changes: 1 addition & 1 deletion schematic/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Sets the version of the package"""
import importlib.metadata

__version__ = importlib.metadata.version("schematic")
__version__ = importlib.metadata.version("schematicpy")

0 comments on commit a096639

Please sign in to comment.