Skip to content

Commit ec951a7

Browse files
authored
Merge pull request #901 from atlanhq/TTD-105-agentic-types
TTD-105: Add Agentic, Skill, and Context Repository typedefs
2 parents d5109e7 + 875055c commit ec951a7

66 files changed

Lines changed: 3823 additions & 1251 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,14 @@ Generate asset models from your Atlan instance:
208208
# Generate models automatically
209209
uv run ./generator
210210

211+
# Force re-download typedefs (bypass cache)
212+
uv run ./generator --override
213+
211214
# Use custom typedefs file
212215
uv run ./generator ./my-typedefs.json
216+
217+
# Both flags can be combined
218+
uv run ./generator --override ./my-typedefs.json
213219
```
214220

215221
This will:

docs/api/assets/cloud-storage.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@
3232

3333
::: pyatlan.model.assets.a_d_l_s_object.ADLSObject
3434

35-
## GCS
36-
37-
::: pyatlan.model.assets.g_c_s.GCS
38-
3935
## GCSBucket
4036

4137
::: pyatlan.model.assets.g_c_s_bucket.GCSBucket
@@ -52,14 +48,6 @@
5248

5349
::: pyatlan.model.assets.a_w_s.AWS
5450

55-
## Google
56-
57-
::: pyatlan.model.assets.google.Google
58-
5951
## Azure
6052

6153
::: pyatlan.model.assets.azure.Azure
62-
63-
## Cloud
64-
65-
::: pyatlan.model.assets.cloud.Cloud

docs/api/assets/other-bi.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,6 @@
348348

349349
::: pyatlan.model.assets.sisense_widget.SisenseWidget
350350

351-
## DataStudio
352-
353-
::: pyatlan.model.assets.data_studio.DataStudio
354-
355351
## DataStudioAsset
356352

357353
::: pyatlan.model.assets.data_studio_asset.DataStudioAsset

docs/api/assets/other-connectors.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,3 @@
1111
## DataverseEntity
1212

1313
::: pyatlan.model.assets.dataverse_entity.DataverseEntity
14-
15-
## DremioVirtualDataset
16-
17-
::: pyatlan.model.assets.dremio_virtual_dataset.DremioVirtualDataset
18-
19-
## DremioColumn
20-
21-
::: pyatlan.model.assets.dremio_column.DremioColumn
22-
23-
## DremioSpace
24-
25-
::: pyatlan.model.assets.dremio_space.DremioSpace
26-
27-
## DremioPhysicalDataset
28-
29-
::: pyatlan.model.assets.dremio_physical_dataset.DremioPhysicalDataset
30-
31-
## DremioFolder
32-
33-
::: pyatlan.model.assets.dremio_folder.DremioFolder
34-
35-
## DremioSource
36-
37-
::: pyatlan.model.assets.dremio_source.DremioSource

generator

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,26 @@
44
# This script runs both create_typedefs_file.py and class_generator.py
55
# It intelligently skips creating typedefs if they already exist and are current
66

7-
# Usage: ./generator [typedefs_file_path]
7+
# Usage: ./generator [--override] [typedefs_file_path]
88
# If typedefs_file_path is not provided, defaults to /tmp/typedefs.json
9+
# --override: force re-download of typedefs even if cached file is current
910

1011
echo "🚀 Starting Atlan Python SDK code generation..."
1112

13+
# Parse flags
14+
FORCE_OVERRIDE=false
15+
TYPE_DEF_FILE_ARG=""
16+
for arg in "$@"; do
17+
case "$arg" in
18+
--override)
19+
FORCE_OVERRIDE=true
20+
;;
21+
*)
22+
TYPE_DEF_FILE_ARG="$arg"
23+
;;
24+
esac
25+
done
26+
1227
# Check if ATLAN_BASE_URL and ATLAN_API_KEY are set
1328
if [ -z "$ATLAN_BASE_URL" ] || [ -z "$ATLAN_API_KEY" ]; then
1429
echo "❌ Error: ATLAN_BASE_URL and ATLAN_API_KEY environment variables must be set."
@@ -19,8 +34,8 @@ if [ -z "$ATLAN_BASE_URL" ] || [ -z "$ATLAN_API_KEY" ]; then
1934
fi
2035

2136
# Get the typedefs file path from command line argument or use default
22-
if [ -n "$1" ]; then
23-
TYPE_DEF_FILE="$1"
37+
if [ -n "$TYPE_DEF_FILE_ARG" ]; then
38+
TYPE_DEF_FILE="$TYPE_DEF_FILE_ARG"
2439
echo "📁 Using custom typedefs file: $TYPE_DEF_FILE"
2540
else
2641
TMPDIR=${TMPDIR:-/tmp}
@@ -30,7 +45,9 @@ fi
3045

3146
# Check if typedefs file exists and is current (created today)
3247
SHOULD_CREATE_TYPEDEFS=true
33-
if [ -f "$TYPE_DEF_FILE" ]; then
48+
if [ "$FORCE_OVERRIDE" = true ]; then
49+
echo "🔄 --override flag set, forcing typedefs re-download"
50+
elif [ -f "$TYPE_DEF_FILE" ]; then
3451
# Check if file was created today
3552
if [ "$(date -r "$TYPE_DEF_FILE" +%Y-%m-%d)" = "$(date +%Y-%m-%d)" ]; then
3653
echo "✅ Typedefs file already exists and is current: $TYPE_DEF_FILE"

pyatlan/generator/class_generator.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,18 @@ class AssetInfo:
269269
"FabricDataflowEntityColumn",
270270
"FabricReport",
271271
"FabricSemanticModel",
272+
"Agentic",
273+
"Artifact",
274+
"Skill",
275+
"SkillArtifact",
276+
"Context",
277+
"ContextRepository",
278+
"ContextArtifact",
279+
"Dremio",
280+
"Cloud",
281+
"Google",
282+
"GCPDataplex",
283+
"GCPDataplexAspectType",
272284
}
273285
_IGNORE_ASSETS = {} # type: ignore[var-annotated]
274286

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
@classmethod
3+
@init_guid
4+
def creator(
5+
cls,
6+
*,
7+
name: str,
8+
context_repository_qualified_name: str,
9+
file_type: FileType,
10+
) -> ContextArtifact:
11+
validate_required_fields(
12+
["name", "context_repository_qualified_name", "file_type"],
13+
[name, context_repository_qualified_name, file_type],
14+
)
15+
return ContextArtifact(
16+
attributes=ContextArtifact.Attributes.creator(
17+
name=name,
18+
context_repository_qualified_name=context_repository_qualified_name,
19+
file_type=file_type,
20+
)
21+
)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
@classmethod
3+
@init_guid
4+
def creator(cls, *, name: str) -> ContextRepository:
5+
validate_required_fields(["name"], [name])
6+
return ContextRepository(
7+
attributes=ContextRepository.Attributes.creator(name=name)
8+
)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
@classmethod
3+
@init_guid
4+
def creator(cls, *, name: str) -> Skill:
5+
validate_required_fields(["name"], [name])
6+
return Skill(attributes=Skill.Attributes.creator(name=name))
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
@classmethod
3+
@init_guid
4+
def creator(
5+
cls, *, name: str, skill_qualified_name: str, file_type: FileType
6+
) -> SkillArtifact:
7+
validate_required_fields(
8+
["name", "skill_qualified_name", "file_type"],
9+
[name, skill_qualified_name, file_type],
10+
)
11+
return SkillArtifact(
12+
attributes=SkillArtifact.Attributes.creator(
13+
name=name,
14+
skill_qualified_name=skill_qualified_name,
15+
file_type=file_type,
16+
)
17+
)

0 commit comments

Comments
 (0)