Skip to content

Commit 17c5b63

Browse files
authored
Merge pull request #35 from atlanhq/release_0.0.19
Release 0.0.19
2 parents 889bfcd + 4a708fa commit 17c5b63

File tree

12 files changed

+1381
-120
lines changed

12 files changed

+1381
-120
lines changed

Diff for: .github/workflows/pytest.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ jobs:
3030
- name: Test with pytest
3131
env: # Or as an environment variable
3232
ATLAN_API_KEY: ${{ secrets.MARK_ATLAN_API_KEY }}
33-
ATLAN_HOST: https://mark.atlan.com
33+
ATLAN_BASE_URL: https://mark.atlan.com
3434
run: |
3535
pytest

Diff for: pyatlan/HISTORY.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## 0.0.19 (Mar 30, 2023)
2+
3+
* Renamed environment variable used to specify the Atlan URL from ATLAN_HOST to ATLAN_BASE_URL
4+
* Renamed initialization parameter in pyatlan.client.atlan.AtlanClient from host to base_url
5+
6+
## 0.0.18 (Mar 27, 2023)
7+
8+
* Added workflow to run code scan with [CodeQl](https://codeql.github.com/)
9+
* Added workflow to upload to [pypi](https://pypi.org) on release
10+
11+
## 0.0.17 (Mar 22, 2023)
12+
13+
* Initial public release

Diff for: pyatlan/client/atlan.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def get_session():
113113

114114
class AtlanClient(BaseSettings):
115115
_default_client: "ClassVar[Optional[AtlanClient]]" = None
116-
host: HttpUrl
116+
base_url: HttpUrl
117117
api_key: str
118118
_session: requests.Session = PrivateAttr(default_factory=get_session)
119119
_request_params: dict = PrivateAttr()
@@ -238,7 +238,7 @@ def _create_params(
238238
self, api, query_params, request_obj, exclude_unset: bool = True
239239
):
240240
params = copy.deepcopy(self._request_params)
241-
path = os.path.join(self.host, api.path)
241+
path = os.path.join(self.base_url, api.path)
242242
params["headers"]["Accept"] = api.consumes
243243
params["headers"]["content-type"] = api.produces
244244
if query_params is not None:

Diff for: pyatlan/generator/generate_from_typdefs.py

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040
("query_username_strategy", "QueryUsernameStrategy"),
4141
("google_datastudio_asset_type", "GoogleDatastudioAssetType"),
4242
("powerbi_endorsement", "PowerbiEndorsement"),
43+
("kafka_topic_compression_type", "KafkaTopicCompressionType"),
44+
("kafka_topic_cleanup_policy", "PowerbiEndorsement"),
45+
("quick_sight_folder_type", "QuickSightFolderType"),
46+
("quick_sight_dataset_field_type", "QuickSightDatasetFieldType"),
47+
("quick_sight_analysis_status", "QuickSightAnalysisStatus"),
48+
("quick_sight_dataset_import_mode", "QuickSightDatasetImportMode"),
4349
]
4450
ARRAY_REPLACEMENTS = [("array<string>", "set{string}")]
4551

Diff for: pyatlan/generator/templates/entity.jinja2

+30-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ from pyatlan.model.enums import (
2727
CertificateStatus,
2828
EntityStatus,
2929
IconType,
30+
KafkaTopicCompressionType,
31+
QuickSightFolderType,
32+
QuickSightDatasetFieldType,
33+
QuickSightAnalysisStatus,
34+
QuickSightDatasetImportMode,
3035
QueryUsernameStrategy,
3136
SourceCostUnitType,
3237
GoogleDatastudioAssetType,
@@ -42,6 +47,7 @@ from pyatlan.model.structs import (
4247
GoogleLabel,
4348
GoogleTag,
4449
Histogram,
50+
KafkaTopicConsumption,
4551
PopularityInsights,
4652
)
4753
from pyatlan.utils import next_id
@@ -257,8 +263,12 @@ class {{ entity_def.name }}({{super_classes[0]}} {%- if "Asset" in super_classes
257263

258264
@classmethod
259265
def create_for_modification(
260-
cls: type[SelfAsset], qualified_name: str, name: str
266+
cls: type[SelfAsset], qualified_name: str = "", name: str = ""
261267
) -> SelfAsset:
268+
validate_required_fields(
269+
["name", "qualified_name"],
270+
[name, qualified_name],
271+
)
262272
return cls(attributes=cls.Attributes(qualified_name=qualified_name, name=name))
263273

264274
@classmethod
@@ -685,6 +695,25 @@ class {{ entity_def.name }}({{super_classes[0]}} {%- if "Asset" in super_classes
685695
name=name, anchor=anchor, categories=categories
686696
)
687697
)
698+
699+
@classmethod
700+
def create_for_modification(
701+
cls: type[SelfAsset],
702+
qualified_name: str = "",
703+
name: str = "",
704+
glossary_guid: str = "",
705+
) -> SelfAsset:
706+
validate_required_fields(
707+
["name", "qualified_name", "glossary_guid"],
708+
[name, qualified_name, glossary_guid],
709+
)
710+
glossary = AtlasGlossary()
711+
glossary.guid = glossary_guid
712+
return cls(
713+
attributes=cls.Attributes(
714+
qualified_name=qualified_name, name=name, anchor=glossary
715+
)
716+
)
688717
{%- endif %}
689718
{% endif %}
690719
{% if entity_def.name == "Asset" %}

0 commit comments

Comments
 (0)