Skip to content

Commit

Permalink
fix: python datatype import
Browse files Browse the repository at this point in the history
  • Loading branch information
spicyfalafel committed Sep 23, 2024
1 parent 384aad4 commit 06146e2
Show file tree
Hide file tree
Showing 145 changed files with 1,127 additions and 153 deletions.
18 changes: 9 additions & 9 deletions src/aidbox_sdk/generator/python.clj
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
{:path (datatypes-file-path ir-schema)
:content (generate-module
:deps (concat
[{:module "future" :members ["annotations"]}
[{:module "__future__" :members ["annotations"]}
{:module "typing" :members ["Optional" "List"]}
{:module "pydantic" :members ["*"]}]
(map (fn [d] {:module (str "." d) :members [d]}) (:deps ir-schema)))
Expand All @@ -191,9 +191,9 @@
(generate-resource-module [_ ir-schema]
{:path (resource-file-path ir-schema)
:content (generate-module
:deps [{:module "typing" :members ["Optional" "List"]}
{:module "pydantic" :members ["*"]}
{:module "..base" :members ["*"]}]
:deps (concat [{:module "typing" :members ["Optional" "List"]}
{:module "pydantic" :members ["*"]}]
(map (fn [d] {:module (str "base." d) :members [d]}) (:deps ir-schema)))
:classes [(generate-class ir-schema
(map generate-class (:backbone-elements ir-schema)))])})

Expand All @@ -213,11 +213,11 @@
(mapv (fn [[constraint-name schema]]
{:path (constraint-file-path schema constraint-name)
:content (generate-module
:deps [{:module "pydantic" :members ["*"]}
{:module "typing" :members ["Optional" "List"]}
{:module "..base" :members ["*"]}]
:classes (generate-class (assoc schema :url constraint-name)
(map generate-class (:backbone-elements schema))))})
:deps (concat [{:module "typing" :members ["Optional" "List"]}
{:module "pydantic" :members ["*"]}]
(map (fn [d] {:module (str "base." d) :members [d]}) (:deps schema)))
:classes (generate-class (assoc schema :url constraint-name)
(map generate-class (:backbone-elements schema))))})
constraint-ir-schemas))

(generate-sdk-files [_] (generator/prepare-sdk-files :python)))
Expand Down
7 changes: 6 additions & 1 deletion test/aidbox_sdk/snapshots/python/hl7-fhir-r4-core/Account.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion test/aidbox_sdk/snapshots/python/hl7-fhir-r4-core/Basic.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion test/aidbox_sdk/snapshots/python/hl7-fhir-r4-core/CarePlan.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion test/aidbox_sdk/snapshots/python/hl7-fhir-r4-core/ChargeItem.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion test/aidbox_sdk/snapshots/python/hl7-fhir-r4-core/Claim.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 06146e2

Please sign in to comment.