acryl-datahub 0.15.0.5rc4__py3-none-any.whl → 15.0.5rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of acryl-datahub might be problematic. Click here for more details.

@@ -1,5 +1,4 @@
1
1
  import pathlib
2
- import re
3
2
  from typing import List
4
3
 
5
4
 
@@ -33,30 +32,3 @@ def ensure_no_indirect_model_imports(dirs: List[pathlib.Path]) -> None:
33
32
  f"Disallowed import found in {file}: `{line.rstrip()}`. "
34
33
  f"Import from {replacement} instead."
35
34
  )
36
-
37
-
38
- def ban_direct_datahub_imports(dirs: List[pathlib.Path]) -> None:
39
- # We also want to ban all direct imports of datahub.
40
- # The base `datahub` package is used to export public-facing classes.
41
- # If we import it directly, we'll likely end up with circular imports.
42
-
43
- banned_strings = [
44
- r"^import datahub[\s$]",
45
- r"^from datahub import",
46
- ]
47
- ignored_files = {
48
- __file__,
49
- }
50
- for dir in dirs:
51
- for file in dir.rglob("*.py"):
52
- if str(file) in ignored_files:
53
- continue
54
-
55
- file_contents = file.read_text()
56
-
57
- for banned_string in banned_strings:
58
- if re.search(banned_string, file_contents, re.MULTILINE):
59
- raise ValueError(
60
- f"Disallowed bare datahub import found in {file}. "
61
- f"Do not import datahub directly; instead import from the underlying file."
62
- )
@@ -10,7 +10,7 @@ import humanfriendly
10
10
  from packaging.version import Version
11
11
  from pydantic import BaseModel
12
12
 
13
- from datahub._version import __version__
13
+ from datahub import __version__
14
14
  from datahub.cli.config_utils import load_client_config
15
15
  from datahub.ingestion.graph.client import DataHubGraph
16
16
  from datahub.utilities.perf_timer import PerfTimer
@@ -93,11 +93,11 @@ async def get_github_stats():
93
93
  async with aiohttp.ClientSession(
94
94
  headers={"Accept": "application/vnd.github.v3+json"}
95
95
  ) as session:
96
- gh_url = "https://api.github.com/repos/datahub-project/datahub/releases/latest"
96
+ gh_url = "https://api.github.com/repos/datahub-project/datahub/releases"
97
97
  async with session.get(gh_url) as gh_response:
98
98
  gh_response_json = await gh_response.json()
99
- latest_server_version = Version(gh_response_json.get("tag_name"))
100
- latest_server_date = gh_response_json.get("published_at")
99
+ latest_server_version = Version(gh_response_json[0].get("tag_name"))
100
+ latest_server_date = gh_response_json[0].get("published_at")
101
101
  return (latest_server_version, latest_server_date)
102
102
 
103
103
 
datahub/_version.py DELETED
@@ -1,13 +0,0 @@
1
- # Published at https://pypi.org/project/acryl-datahub/.
2
- __package_name__ = "acryl-datahub"
3
- __version__ = "0.15.0.5rc4"
4
-
5
-
6
- def is_dev_mode() -> bool:
7
- return __version__.endswith("dev0")
8
-
9
-
10
- def nice_version_name() -> str:
11
- if is_dev_mode():
12
- return "unavailable (installed in develop mode)"
13
- return __version__