foundry-dev-tools 1.4.3__tar.gz → 2.0.0__tar.gz

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.
Files changed (159) hide show
  1. {foundry_dev_tools-1.4.3 → foundry_dev_tools-2.0.0}/PKG-INFO +41 -70
  2. {foundry_dev_tools-1.4.3 → foundry_dev_tools-2.0.0}/README.md +17 -31
  3. foundry_dev_tools-2.0.0/pyproject.toml +76 -0
  4. foundry_dev_tools-2.0.0/src/foundry_dev_tools/__about__.py +1 -0
  5. foundry_dev_tools-2.0.0/src/foundry_dev_tools/__init__.py +20 -0
  6. foundry_dev_tools-2.0.0/src/foundry_dev_tools/_optional/__init__.py +17 -0
  7. foundry_dev_tools-2.0.0/src/foundry_dev_tools/_optional/pandas.py +12 -0
  8. foundry_dev_tools-2.0.0/src/foundry_dev_tools/_optional/polars.py +12 -0
  9. foundry_dev_tools-2.0.0/src/foundry_dev_tools/_optional/pyarrow.py +15 -0
  10. foundry_dev_tools-2.0.0/src/foundry_dev_tools/_optional/pyspark.py +18 -0
  11. {foundry_dev_tools-1.4.3 → foundry_dev_tools-2.0.0}/src/foundry_dev_tools/cached_foundry_client.py +120 -120
  12. foundry_dev_tools-2.0.0/src/foundry_dev_tools/cli/__init__.py +1 -0
  13. {foundry_dev_tools-1.4.3 → foundry_dev_tools-2.0.0}/src/foundry_dev_tools/cli/build.py +85 -95
  14. foundry_dev_tools-2.0.0/src/foundry_dev_tools/cli/config.py +194 -0
  15. foundry_dev_tools-2.0.0/src/foundry_dev_tools/cli/git.py +100 -0
  16. foundry_dev_tools-2.0.0/src/foundry_dev_tools/cli/git_credential_foundry.py +127 -0
  17. foundry_dev_tools-2.0.0/src/foundry_dev_tools/cli/info.py +303 -0
  18. foundry_dev_tools-2.0.0/src/foundry_dev_tools/cli/main.py +30 -0
  19. {foundry_dev_tools-1.4.3 → foundry_dev_tools-2.0.0}/src/foundry_dev_tools/cli/s3.py +20 -17
  20. foundry_dev_tools-2.0.0/src/foundry_dev_tools/cli/stubs.py +37 -0
  21. foundry_dev_tools-2.0.0/src/foundry_dev_tools/clients/__init__.py +1 -0
  22. foundry_dev_tools-2.0.0/src/foundry_dev_tools/clients/api_client.py +217 -0
  23. foundry_dev_tools-2.0.0/src/foundry_dev_tools/clients/build2.py +50 -0
  24. foundry_dev_tools-2.0.0/src/foundry_dev_tools/clients/catalog.py +575 -0
  25. foundry_dev_tools-2.0.0/src/foundry_dev_tools/clients/compass.py +1205 -0
  26. foundry_dev_tools-2.0.0/src/foundry_dev_tools/clients/context_client.py +130 -0
  27. foundry_dev_tools-2.0.0/src/foundry_dev_tools/clients/data_proxy.py +534 -0
  28. foundry_dev_tools-2.0.0/src/foundry_dev_tools/clients/foundry_sql_server.py +280 -0
  29. foundry_dev_tools-2.0.0/src/foundry_dev_tools/clients/foundry_stats.py +61 -0
  30. foundry_dev_tools-2.0.0/src/foundry_dev_tools/clients/jemma.py +83 -0
  31. foundry_dev_tools-2.0.0/src/foundry_dev_tools/clients/metadata.py +77 -0
  32. foundry_dev_tools-2.0.0/src/foundry_dev_tools/clients/multipass.py +560 -0
  33. foundry_dev_tools-2.0.0/src/foundry_dev_tools/clients/public_ontologies_client.py +45 -0
  34. foundry_dev_tools-2.0.0/src/foundry_dev_tools/clients/s3_client.py +190 -0
  35. foundry_dev_tools-2.0.0/src/foundry_dev_tools/clients/schema_inference.py +71 -0
  36. foundry_dev_tools-2.0.0/src/foundry_dev_tools/config/__init__.py +1 -0
  37. foundry_dev_tools-2.0.0/src/foundry_dev_tools/config/config.py +213 -0
  38. foundry_dev_tools-2.0.0/src/foundry_dev_tools/config/config_types.py +31 -0
  39. foundry_dev_tools-2.0.0/src/foundry_dev_tools/config/context.py +269 -0
  40. foundry_dev_tools-2.0.0/src/foundry_dev_tools/config/token_provider.py +264 -0
  41. foundry_dev_tools-2.0.0/src/foundry_dev_tools/errors/__init__.py +1 -0
  42. foundry_dev_tools-2.0.0/src/foundry_dev_tools/errors/compass.py +210 -0
  43. foundry_dev_tools-2.0.0/src/foundry_dev_tools/errors/config.py +39 -0
  44. foundry_dev_tools-2.0.0/src/foundry_dev_tools/errors/dataset.py +68 -0
  45. foundry_dev_tools-2.0.0/src/foundry_dev_tools/errors/handling.py +186 -0
  46. foundry_dev_tools-2.0.0/src/foundry_dev_tools/errors/meta.py +98 -0
  47. foundry_dev_tools-2.0.0/src/foundry_dev_tools/errors/sql.py +23 -0
  48. foundry_dev_tools-2.0.0/src/foundry_dev_tools/foundry_api_client.py +1472 -0
  49. foundry_dev_tools-2.0.0/src/foundry_dev_tools/py.typed +1 -0
  50. foundry_dev_tools-2.0.0/src/foundry_dev_tools/resources/__init__.py +5 -0
  51. foundry_dev_tools-2.0.0/src/foundry_dev_tools/resources/dataset.py +799 -0
  52. foundry_dev_tools-2.0.0/src/foundry_dev_tools/resources/folder.py +33 -0
  53. foundry_dev_tools-2.0.0/src/foundry_dev_tools/resources/resource.py +253 -0
  54. foundry_dev_tools-2.0.0/src/foundry_dev_tools/utils/__init__.py +1 -0
  55. foundry_dev_tools-2.0.0/src/foundry_dev_tools/utils/api_types.py +479 -0
  56. {foundry_dev_tools-1.4.3 → foundry_dev_tools-2.0.0}/src/foundry_dev_tools/utils/async_s3.py +8 -11
  57. {foundry_dev_tools-1.4.3 → foundry_dev_tools-2.0.0}/src/foundry_dev_tools/utils/caches/metadata_store.py +30 -14
  58. foundry_dev_tools-2.0.0/src/foundry_dev_tools/utils/caches/spark_caches.py +286 -0
  59. foundry_dev_tools-2.0.0/src/foundry_dev_tools/utils/cli.py +12 -0
  60. foundry_dev_tools-2.0.0/src/foundry_dev_tools/utils/clients.py +17 -0
  61. foundry_dev_tools-2.0.0/src/foundry_dev_tools/utils/compat.py +107 -0
  62. foundry_dev_tools-2.0.0/src/foundry_dev_tools/utils/config.py +231 -0
  63. {foundry_dev_tools-1.4.3 → foundry_dev_tools-2.0.0}/src/foundry_dev_tools/utils/converter/foundry_spark.py +61 -67
  64. {foundry_dev_tools-1.4.3 → foundry_dev_tools-2.0.0}/src/foundry_dev_tools/utils/misc.py +44 -15
  65. foundry_dev_tools-2.0.0/src/foundry_dev_tools/utils/public_api_types.py +16 -0
  66. {foundry_dev_tools-1.4.3 → foundry_dev_tools-2.0.0}/src/foundry_dev_tools/utils/repo.py +34 -66
  67. foundry_dev_tools-2.0.0/src/foundry_dev_tools/utils/s3.py +60 -0
  68. foundry_dev_tools-2.0.0/src/foundry_dev_tools/utils/spark.py +27 -0
  69. foundry_dev_tools-1.4.3/.github/ISSUE_TEMPLATE/blank_issue.yml +0 -27
  70. foundry_dev_tools-1.4.3/.github/ISSUE_TEMPLATE/bug_report.yml +0 -87
  71. foundry_dev_tools-1.4.3/.github/ISSUE_TEMPLATE/config.yml +0 -1
  72. foundry_dev_tools-1.4.3/.github/ISSUE_TEMPLATE/feature_request.yml +0 -69
  73. foundry_dev_tools-1.4.3/.github/pull_request_template.md +0 -10
  74. foundry_dev_tools-1.4.3/.github/workflows/ci.yml +0 -99
  75. foundry_dev_tools-1.4.3/.github/workflows/docs.yml +0 -48
  76. foundry_dev_tools-1.4.3/.gitignore +0 -53
  77. foundry_dev_tools-1.4.3/.pre-commit-config.yaml +0 -18
  78. foundry_dev_tools-1.4.3/LICENSE +0 -202
  79. foundry_dev_tools-1.4.3/docs/Configuration_usage.md +0 -119
  80. foundry_dev_tools-1.4.3/docs/FoundryFileSystem_usage.md +0 -65
  81. foundry_dev_tools-1.4.3/docs/FoundryRestClient_usage.md +0 -173
  82. foundry_dev_tools-1.4.3/docs/SSO_usage.md +0 -35
  83. foundry_dev_tools-1.4.3/docs/_static/.gitignore +0 -1
  84. foundry_dev_tools-1.4.3/docs/architecture.md +0 -52
  85. foundry_dev_tools-1.4.3/docs/changelog.md +0 -240
  86. foundry_dev_tools-1.4.3/docs/cli.md +0 -93
  87. foundry_dev_tools-1.4.3/docs/conf.py +0 -319
  88. foundry_dev_tools-1.4.3/docs/contributors.md +0 -7
  89. foundry_dev_tools-1.4.3/docs/develop.md +0 -83
  90. foundry_dev_tools-1.4.3/docs/index.md +0 -45
  91. foundry_dev_tools-1.4.3/docs/installation.md +0 -73
  92. foundry_dev_tools-1.4.3/docs/license.md +0 -5
  93. foundry_dev_tools-1.4.3/docs/pictures/mermaid-diagram-already-cached-dark.svg +0 -1
  94. foundry_dev_tools-1.4.3/docs/pictures/mermaid-diagram-already-cached-light.svg +0 -1
  95. foundry_dev_tools-1.4.3/docs/pictures/mermaid-diagram-new-transaction-dark.svg +0 -1
  96. foundry_dev_tools-1.4.3/docs/pictures/mermaid-diagram-new-transaction-light.svg +0 -1
  97. foundry_dev_tools-1.4.3/docs/pictures/tpa_config.png +0 -0
  98. foundry_dev_tools-1.4.3/docs/requirements.txt +0 -7
  99. foundry_dev_tools-1.4.3/docs/s3.md +0 -108
  100. foundry_dev_tools-1.4.3/docs/usage_and_examples.md +0 -82
  101. foundry_dev_tools-1.4.3/pyproject.toml +0 -136
  102. foundry_dev_tools-1.4.3/setup.cfg +0 -4
  103. foundry_dev_tools-1.4.3/setup.py +0 -21
  104. foundry_dev_tools-1.4.3/src/foundry_dev_tools/__about__.py +0 -7
  105. foundry_dev_tools-1.4.3/src/foundry_dev_tools/__init__.py +0 -14
  106. foundry_dev_tools-1.4.3/src/foundry_dev_tools/cli/info.py +0 -246
  107. foundry_dev_tools-1.4.3/src/foundry_dev_tools/cli/main.py +0 -22
  108. foundry_dev_tools-1.4.3/src/foundry_dev_tools/config.py +0 -338
  109. foundry_dev_tools-1.4.3/src/foundry_dev_tools/foundry_api_client.py +0 -2637
  110. foundry_dev_tools-1.4.3/src/foundry_dev_tools/fsspec_impl.py +0 -530
  111. foundry_dev_tools-1.4.3/src/foundry_dev_tools/utils/__init__.py +0 -0
  112. foundry_dev_tools-1.4.3/src/foundry_dev_tools/utils/caches/spark_caches.py +0 -311
  113. foundry_dev_tools-1.4.3/src/foundry_dev_tools/utils/converter/__init__.py +0 -0
  114. foundry_dev_tools-1.4.3/src/foundry_dev_tools/utils/importer.py +0 -38
  115. foundry_dev_tools-1.4.3/src/foundry_dev_tools/utils/s3.py +0 -32
  116. foundry_dev_tools-1.4.3/src/foundry_dev_tools/utils/spark.py +0 -23
  117. foundry_dev_tools-1.4.3/src/foundry_dev_tools/utils/token_provider.py +0 -137
  118. foundry_dev_tools-1.4.3/src/foundry_dev_tools.egg-info/PKG-INFO +0 -167
  119. foundry_dev_tools-1.4.3/src/foundry_dev_tools.egg-info/SOURCES.txt +0 -99
  120. foundry_dev_tools-1.4.3/src/foundry_dev_tools.egg-info/dependency_links.txt +0 -1
  121. foundry_dev_tools-1.4.3/src/foundry_dev_tools.egg-info/entry_points.txt +0 -5
  122. foundry_dev_tools-1.4.3/src/foundry_dev_tools.egg-info/not-zip-safe +0 -1
  123. foundry_dev_tools-1.4.3/src/foundry_dev_tools.egg-info/requires.txt +0 -34
  124. foundry_dev_tools-1.4.3/src/foundry_dev_tools.egg-info/top_level.txt +0 -2
  125. foundry_dev_tools-1.4.3/src/transforms/__init__.py +0 -4
  126. foundry_dev_tools-1.4.3/src/transforms/api/__init__.py +0 -33
  127. foundry_dev_tools-1.4.3/src/transforms/api/_configure.py +0 -25
  128. foundry_dev_tools-1.4.3/src/transforms/api/_dataset.py +0 -333
  129. foundry_dev_tools-1.4.3/src/transforms/api/_decorators.py +0 -271
  130. foundry_dev_tools-1.4.3/src/transforms/api/_transform.py +0 -554
  131. foundry_dev_tools-1.4.3/tests/__init__.py +0 -0
  132. foundry_dev_tools-1.4.3/tests/conftest.py +0 -219
  133. foundry_dev_tools-1.4.3/tests/foundry_mock_client.py +0 -611
  134. foundry_dev_tools-1.4.3/tests/test_cached_foundry_client.py +0 -581
  135. foundry_dev_tools-1.4.3/tests/test_cached_foundry_client_integration.py +0 -51
  136. foundry_dev_tools-1.4.3/tests/test_cli_build.py +0 -491
  137. foundry_dev_tools-1.4.3/tests/test_cli_info.py +0 -10
  138. foundry_dev_tools-1.4.3/tests/test_config.py +0 -116
  139. foundry_dev_tools-1.4.3/tests/test_data/binary_dataset/bin +0 -0
  140. foundry_dev_tools-1.4.3/tests/test_data/iris/iris.csv +0 -151
  141. foundry_dev_tools-1.4.3/tests/test_foundry_api.py +0 -874
  142. foundry_dev_tools-1.4.3/tests/test_foundry_local_deprecation.py +0 -149
  143. foundry_dev_tools-1.4.3/tests/test_foundry_mock.py +0 -342
  144. foundry_dev_tools-1.4.3/tests/test_foundry_spark_converters.py +0 -566
  145. foundry_dev_tools-1.4.3/tests/test_foundry_sql_client.py +0 -136
  146. foundry_dev_tools-1.4.3/tests/test_fsspec_impl.py +0 -1024
  147. foundry_dev_tools-1.4.3/tests/test_importer.py +0 -11
  148. foundry_dev_tools-1.4.3/tests/test_multipass_tpa.py +0 -277
  149. foundry_dev_tools-1.4.3/tests/test_s3.py +0 -145
  150. foundry_dev_tools-1.4.3/tests/test_spark_caches.py +0 -436
  151. foundry_dev_tools-1.4.3/tests/test_token_provider.py +0 -103
  152. foundry_dev_tools-1.4.3/tests/test_transforms.py +0 -700
  153. foundry_dev_tools-1.4.3/tests/test_transforms_integration.py +0 -223
  154. foundry_dev_tools-1.4.3/tests/test_utils_misc.py +0 -8
  155. foundry_dev_tools-1.4.3/tests/test_utils_repo.py +0 -99
  156. foundry_dev_tools-1.4.3/tests/utils.py +0 -435
  157. foundry_dev_tools-1.4.3/tox.ini +0 -100
  158. {foundry_dev_tools-1.4.3 → foundry_dev_tools-2.0.0}/src/foundry_dev_tools/utils/caches/__init__.py +0 -0
  159. {foundry_dev_tools-1.4.3/src/foundry_dev_tools/cli → foundry_dev_tools-2.0.0/src/foundry_dev_tools/utils/converter}/__init__.py +0 -0
@@ -1,60 +1,45 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: foundry-dev-tools
3
- Version: 1.4.3
3
+ Version: 2.0.0
4
4
  Summary: Seamlessly run your Palantir Foundry Repository transforms code on your local machine.
5
- Author-email: Nicolas Renkamp <nicolas.renkamp@merckgroup.com>, Jonas Wunderlich <jonas.wunderlich@merckgroup.com>
5
+ Author-Email: Nicolas Renkamp <nicolas.renkamp@merckgroup.com>, Jonas Wunderlich <jonas.wunderlich@merckgroup.com>
6
6
  License: Apache-2.0
7
- Project-URL: Homepage, https://emdgroup.github.io/foundry-dev-tools
8
- Project-URL: Documentation, https://emdgroup.github.io/foundry-dev-tools
9
- Project-URL: Source, https://github.com/emdgroup/foundry-dev-tools
10
- Project-URL: Tracker, https://github.com/emdgroup/foundry-dev-tools/issues
11
- Project-URL: Changelog, https://emdgroup.github.io/foundry-dev-tools/changelog.html
12
- Platform: any
13
7
  Classifier: Development Status :: 5 - Production/Stable
14
8
  Classifier: Programming Language :: Python
15
9
  Classifier: License :: OSI Approved :: Apache Software License
16
10
  Classifier: Programming Language :: Python :: 3 :: Only
17
- Classifier: Programming Language :: Python :: 3.8
18
- Classifier: Programming Language :: Python :: 3.9
19
11
  Classifier: Programming Language :: Python :: 3.10
20
12
  Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
21
14
  Classifier: Intended Audience :: Developers
22
15
  Classifier: Operating System :: POSIX :: Linux
23
16
  Classifier: Operating System :: MacOS
24
17
  Classifier: Operating System :: Microsoft :: Windows
25
18
  Classifier: Topic :: Scientific/Engineering :: Information Analysis
26
- Requires-Python: <4,>=3.8
27
- Description-Content-Type: text/markdown
28
- License-File: LICENSE
29
- Requires-Dist: pyarrow
30
- Requires-Dist: pandas
19
+ Project-URL: Homepage, https://emdgroup.github.io/foundry-dev-tools
20
+ Project-URL: Documentation, https://emdgroup.github.io/foundry-dev-tools
21
+ Project-URL: Source, https://github.com/emdgroup/foundry-dev-tools
22
+ Project-URL: Tracker, https://github.com/emdgroup/foundry-dev-tools/issues
23
+ Project-URL: Changelog, https://emdgroup.github.io/foundry-dev-tools/changelog.html
24
+ Requires-Python: >=3.10
31
25
  Requires-Dist: requests
32
- Requires-Dist: fs
33
- Requires-Dist: backoff
34
26
  Requires-Dist: palantir-oauth-client
35
- Provides-Extra: integration
36
- Requires-Dist: dask; extra == "integration"
37
- Requires-Dist: fastparquet; extra == "integration"
38
- Provides-Extra: testing
39
- Requires-Dist: pytest; extra == "testing"
40
- Requires-Dist: pytest-mock; extra == "testing"
41
- Requires-Dist: pytest-spark; extra == "testing"
42
- Requires-Dist: freezegun; extra == "testing"
43
- Requires-Dist: pytest-asyncio; extra == "testing"
44
- Requires-Dist: requests-mock; extra == "testing"
45
- Requires-Dist: fsspec; extra == "testing"
46
- Requires-Dist: timeflake; extra == "testing"
47
- Requires-Dist: polars; extra == "testing"
48
- Provides-Extra: transforms
49
- Requires-Dist: pyspark>=3.0.0; extra == "transforms"
50
- Provides-Extra: cli
51
- Requires-Dist: click; extra == "cli"
52
- Requires-Dist: inquirer; extra == "cli"
53
- Requires-Dist: websockets; extra == "cli"
54
- Requires-Dist: rich; extra == "cli"
55
- Requires-Dist: packaging; extra == "cli"
56
- Provides-Extra: s3
27
+ Requires-Dist: platformdirs
28
+ Requires-Dist: tomli; python_version < "3.11"
29
+ Requires-Dist: typing_extensions; python_version < "3.11"
30
+ Requires-Dist: backports-datetime-fromisoformat==2.0.1; python_version < "3.11"
31
+ Requires-Dist: click
32
+ Requires-Dist: inquirer
33
+ Requires-Dist: websockets
34
+ Requires-Dist: rich
35
+ Requires-Dist: packaging
36
+ Requires-Dist: tomli_w
57
37
  Requires-Dist: aiobotocore[boto3]; extra == "s3"
38
+ Requires-Dist: foundry-dev-tools-transforms; extra == "full"
39
+ Requires-Dist: foundry-dev-tools[s3]; extra == "full"
40
+ Provides-Extra: s3
41
+ Provides-Extra: full
42
+ Description-Content-Type: text/markdown
58
43
 
59
44
  <div align="center">
60
45
  <br/>
@@ -72,53 +57,39 @@ Requires-Dist: aiobotocore[boto3]; extra == "s3"
72
57
 
73
58
  <p><a href="https://emdgroup.github.io/foundry-dev-tools">Documentation</a></p>
74
59
 
75
- <a href="https://emdgroup.github.io/foundry-dev-tools/installation.html">Installation<a/>
60
+ <a href="https://emdgroup.github.io/foundry-dev-tools/getting_started/index.html">Getting Started / Usage<a/>
76
61
  &nbsp;•&nbsp;
77
- <a href="https://emdgroup.github.io/foundry-dev-tools/usage_and_examples.html">Usage<a/>
62
+ <a href="https://emdgroup.github.io/foundry-dev-tools/examples/api.html">Examples<a/>
78
63
  &nbsp;•&nbsp;
79
- <a href="https://emdgroup.github.io/foundry-dev-tools/develop.html">Development<a/>
64
+ <a href="https://emdgroup.github.io/foundry-dev-tools/dev/contribute.html">Development/Contribute<a/>
80
65
 
81
66
  </div>
82
67
 
83
68
  # Foundry DevTools
84
69
 
85
70
  Seamlessly run your Palantir Foundry Repository transforms code and more on your local machine.
86
- Foundry DevTools is a set of useful libraries to interact with the Foundry APIs. There are currently three
87
- high level entrypoints to Foundry DevTools:
71
+ Foundry DevTools is a set of useful libraries to interact with the Foundry APIs.
72
+ It consists of two parts:
88
73
 
89
- - A [transforms](https://www.palantir.com/docs/foundry/transforms-python/transforms-python-api/) implementation
74
+ - The [transforms](https://www.palantir.com/docs/foundry/transforms-python/transforms-python-api/) implementation
90
75
 
91
76
  - An implementation of the Foundry `transforms` package that internally uses the `CachedFoundryClient`.
92
77
  This allows you to seamlessly run your Palantir Foundry Code Repository transforms code on your local machine.
93
- Foundry DevTools does not cover all of Foundry's features, more on this [here](https://emdgroup.github.io/foundry-dev-tools/architecture.html#known-limitations-contributions-welcome).
78
+ Foundry DevTools does not cover all of Foundry's features, more on this [here](https://emdgroup.github.io/foundry-dev-tools/dev/architecture.html#known-limitations-contributions-welcome).
94
79
 
95
- - [FoundryRestClient](https://emdgroup.github.io/foundry-dev-tools/FoundryRestClient_usage.html)
80
+ - API clients
96
81
 
97
- - An API client that contains an opinionated client implementation to some of Foundry's APIs.
82
+ We implemented multiple clients for many foundry APIs like compass, catalog or foundry-sql-server.
98
83
 
99
84
  - For example:
100
85
 
101
86
  ```python
102
- from foundry_dev_tools import FoundryRestClient
87
+ from foundry_dev_tools import FoundryContext
103
88
 
104
- # Queries the Foundry SQL Server with spark SQL dialect
105
- rest_client = FoundryRestClient()
106
- df = rest_client.query_foundry_sql("SELECT * FROM `/Global/Foundry Training and Resources/Foundry Reference Project/Ontology Project: Aviation/airlines`", branch='master')
107
- df.shape
108
- # Out[2]: (17, 10)
109
- ```
89
+ # the context, that contains your credentials and configuration
90
+ ctx = FoundryContext()
110
91
 
111
- - [FoundryFileSystem](https://emdgroup.github.io/foundry-dev-tools/FoundryFileSystem_usage.html)
112
-
113
- - An implementation of `fsspec` for Foundry. Useful to interact with Foundry from popular data science libraries such as
114
- `pandas` or `dask`.
115
-
116
- - For example:
117
-
118
- ```python
119
- import pandas as pd
120
- # /Global/Foundry Training and Resources/Foundry Reference Project/Ontology Project: Aviation/airlines
121
- df = pd.read_parquet("foundry://ri.foundry.main.dataset.5d78f3ae-a588-4fd8-9ba2-66827808c85f")
92
+ df = ctx.foundry_sql_server.query_foundry_sql("SELECT * FROM `/Global/Foundry Training and Resources/Example Data/Aviation Ontology/airlines`", branch='master')
122
93
  df.shape
123
94
  # Out[2]: (17, 10)
124
95
  ```
@@ -137,12 +108,12 @@ With conda or mamba on the conda-forge channel:
137
108
  conda install -c conda-forge foundry-dev-tools
138
109
  ```
139
110
 
140
- [Further instructions](https://emdgroup.github.io/foundry-dev-tools/installation.html) can be found in our documentation.
111
+ [Further instructions](https://emdgroup.github.io/foundry-dev-tools/getting_started/installation.html) can be found in our documentation.
141
112
 
142
113
  ## Why did we build this?
143
114
 
144
- - Local development experience in your favourite IDE (PyCharm, VSCode, ...)
145
- - Access to modern developer tools and workflows such as pylint, black, isort, pre-commit hooks etc.
115
+ - Local development experience in your favorite IDE (PyCharm, VSCode, ...)
116
+ - Access to modern developer tools and workflows such as ruff, mypy, pylint, black, pre-commit hooks etc.
146
117
  - Quicker turnaround time when making changes
147
118
  - Debug, change code and run in a matter of seconds instead of minutes
148
119
  - No accidental or auto commits
@@ -150,7 +121,7 @@ conda install -c conda-forge foundry-dev-tools
150
121
 
151
122
  # License
152
123
 
153
- Copyright (c) 2023 Merck KGaA, Darmstadt, Germany
124
+ Copyright (c) 2024 Merck KGaA, Darmstadt, Germany
154
125
 
155
126
  Licensed under the Apache License, Version 2.0 (the "License");
156
127
  you may not use this file except in compliance with the License.
@@ -14,53 +14,39 @@
14
14
 
15
15
  <p><a href="https://emdgroup.github.io/foundry-dev-tools">Documentation</a></p>
16
16
 
17
- <a href="https://emdgroup.github.io/foundry-dev-tools/installation.html">Installation<a/>
17
+ <a href="https://emdgroup.github.io/foundry-dev-tools/getting_started/index.html">Getting Started / Usage<a/>
18
18
  &nbsp;•&nbsp;
19
- <a href="https://emdgroup.github.io/foundry-dev-tools/usage_and_examples.html">Usage<a/>
19
+ <a href="https://emdgroup.github.io/foundry-dev-tools/examples/api.html">Examples<a/>
20
20
  &nbsp;•&nbsp;
21
- <a href="https://emdgroup.github.io/foundry-dev-tools/develop.html">Development<a/>
21
+ <a href="https://emdgroup.github.io/foundry-dev-tools/dev/contribute.html">Development/Contribute<a/>
22
22
 
23
23
  </div>
24
24
 
25
25
  # Foundry DevTools
26
26
 
27
27
  Seamlessly run your Palantir Foundry Repository transforms code and more on your local machine.
28
- Foundry DevTools is a set of useful libraries to interact with the Foundry APIs. There are currently three
29
- high level entrypoints to Foundry DevTools:
28
+ Foundry DevTools is a set of useful libraries to interact with the Foundry APIs.
29
+ It consists of two parts:
30
30
 
31
- - A [transforms](https://www.palantir.com/docs/foundry/transforms-python/transforms-python-api/) implementation
31
+ - The [transforms](https://www.palantir.com/docs/foundry/transforms-python/transforms-python-api/) implementation
32
32
 
33
33
  - An implementation of the Foundry `transforms` package that internally uses the `CachedFoundryClient`.
34
34
  This allows you to seamlessly run your Palantir Foundry Code Repository transforms code on your local machine.
35
- Foundry DevTools does not cover all of Foundry's features, more on this [here](https://emdgroup.github.io/foundry-dev-tools/architecture.html#known-limitations-contributions-welcome).
35
+ Foundry DevTools does not cover all of Foundry's features, more on this [here](https://emdgroup.github.io/foundry-dev-tools/dev/architecture.html#known-limitations-contributions-welcome).
36
36
 
37
- - [FoundryRestClient](https://emdgroup.github.io/foundry-dev-tools/FoundryRestClient_usage.html)
37
+ - API clients
38
38
 
39
- - An API client that contains an opinionated client implementation to some of Foundry's APIs.
39
+ We implemented multiple clients for many foundry APIs like compass, catalog or foundry-sql-server.
40
40
 
41
41
  - For example:
42
42
 
43
43
  ```python
44
- from foundry_dev_tools import FoundryRestClient
44
+ from foundry_dev_tools import FoundryContext
45
45
 
46
- # Queries the Foundry SQL Server with spark SQL dialect
47
- rest_client = FoundryRestClient()
48
- df = rest_client.query_foundry_sql("SELECT * FROM `/Global/Foundry Training and Resources/Foundry Reference Project/Ontology Project: Aviation/airlines`", branch='master')
49
- df.shape
50
- # Out[2]: (17, 10)
51
- ```
52
-
53
- - [FoundryFileSystem](https://emdgroup.github.io/foundry-dev-tools/FoundryFileSystem_usage.html)
46
+ # the context, that contains your credentials and configuration
47
+ ctx = FoundryContext()
54
48
 
55
- - An implementation of `fsspec` for Foundry. Useful to interact with Foundry from popular data science libraries such as
56
- `pandas` or `dask`.
57
-
58
- - For example:
59
-
60
- ```python
61
- import pandas as pd
62
- # /Global/Foundry Training and Resources/Foundry Reference Project/Ontology Project: Aviation/airlines
63
- df = pd.read_parquet("foundry://ri.foundry.main.dataset.5d78f3ae-a588-4fd8-9ba2-66827808c85f")
49
+ df = ctx.foundry_sql_server.query_foundry_sql("SELECT * FROM `/Global/Foundry Training and Resources/Example Data/Aviation Ontology/airlines`", branch='master')
64
50
  df.shape
65
51
  # Out[2]: (17, 10)
66
52
  ```
@@ -79,12 +65,12 @@ With conda or mamba on the conda-forge channel:
79
65
  conda install -c conda-forge foundry-dev-tools
80
66
  ```
81
67
 
82
- [Further instructions](https://emdgroup.github.io/foundry-dev-tools/installation.html) can be found in our documentation.
68
+ [Further instructions](https://emdgroup.github.io/foundry-dev-tools/getting_started/installation.html) can be found in our documentation.
83
69
 
84
70
  ## Why did we build this?
85
71
 
86
- - Local development experience in your favourite IDE (PyCharm, VSCode, ...)
87
- - Access to modern developer tools and workflows such as pylint, black, isort, pre-commit hooks etc.
72
+ - Local development experience in your favorite IDE (PyCharm, VSCode, ...)
73
+ - Access to modern developer tools and workflows such as ruff, mypy, pylint, black, pre-commit hooks etc.
88
74
  - Quicker turnaround time when making changes
89
75
  - Debug, change code and run in a matter of seconds instead of minutes
90
76
  - No accidental or auto commits
@@ -92,7 +78,7 @@ conda install -c conda-forge foundry-dev-tools
92
78
 
93
79
  # License
94
80
 
95
- Copyright (c) 2023 Merck KGaA, Darmstadt, Germany
81
+ Copyright (c) 2024 Merck KGaA, Darmstadt, Germany
96
82
 
97
83
  Licensed under the Apache License, Version 2.0 (the "License");
98
84
  you may not use this file except in compliance with the License.
@@ -0,0 +1,76 @@
1
+ [build-system]
2
+ requires = [
3
+ "pdm-backend",
4
+ ]
5
+ build-backend = "pdm.backend"
6
+
7
+ [project]
8
+ name = "foundry-dev-tools"
9
+ readme = "README.md"
10
+ description = "Seamlessly run your Palantir Foundry Repository transforms code on your local machine."
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ { name = "Nicolas Renkamp", email = "nicolas.renkamp@merckgroup.com" },
14
+ { name = "Jonas Wunderlich", email = "jonas.wunderlich@merckgroup.com" },
15
+ ]
16
+ classifiers = [
17
+ "Development Status :: 5 - Production/Stable",
18
+ "Programming Language :: Python",
19
+ "License :: OSI Approved :: Apache Software License",
20
+ "Programming Language :: Python :: 3 :: Only",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Intended Audience :: Developers",
25
+ "Operating System :: POSIX :: Linux",
26
+ "Operating System :: MacOS",
27
+ "Operating System :: Microsoft :: Windows",
28
+ "Topic :: Scientific/Engineering :: Information Analysis",
29
+ ]
30
+ dependencies = [
31
+ "requests",
32
+ "palantir-oauth-client",
33
+ "platformdirs",
34
+ "tomli; python_version <\"3.11\"",
35
+ "typing_extensions; python_version < \"3.11\"",
36
+ "backports-datetime-fromisoformat==2.0.1; python_version < \"3.11\"",
37
+ "click",
38
+ "inquirer",
39
+ "websockets",
40
+ "rich",
41
+ "packaging",
42
+ "tomli_w",
43
+ ]
44
+ dynamic = []
45
+ version = "2.0.0"
46
+
47
+ [project.license]
48
+ text = "Apache-2.0"
49
+
50
+ [project.scripts]
51
+ fdt = "foundry_dev_tools.cli.main:cli"
52
+ git-credential-foundry = "foundry_dev_tools.cli.git_credential_foundry:_helper"
53
+
54
+ [project.optional-dependencies]
55
+ s3 = [
56
+ "aiobotocore[boto3]",
57
+ ]
58
+ full = [
59
+ "foundry-dev-tools-transforms",
60
+ "foundry-dev-tools[s3]",
61
+ ]
62
+
63
+ [project.urls]
64
+ Homepage = "https://emdgroup.github.io/foundry-dev-tools"
65
+ Documentation = "https://emdgroup.github.io/foundry-dev-tools"
66
+ Source = "https://github.com/emdgroup/foundry-dev-tools"
67
+ Tracker = "https://github.com/emdgroup/foundry-dev-tools/issues"
68
+ Changelog = "https://emdgroup.github.io/foundry-dev-tools/changelog.html"
69
+
70
+ [tool.pdm]
71
+ distribution = true
72
+
73
+ [tool.pdm.version]
74
+ source = "scm"
75
+ write_to = "foundry_dev_tools/__about__.py"
76
+ write_template = "__version__ = '{}'"
@@ -0,0 +1 @@
1
+ __version__ = '2.0.0'
@@ -0,0 +1,20 @@
1
+ """Foundry Clients developed at Merck KGaA, Darmstadt, Germany."""
2
+
3
+ from foundry_dev_tools.__about__ import __version__
4
+ from foundry_dev_tools.cached_foundry_client import CachedFoundryClient
5
+ from foundry_dev_tools.config.config import Config
6
+ from foundry_dev_tools.config.config_types import Host
7
+ from foundry_dev_tools.config.context import FoundryContext
8
+ from foundry_dev_tools.config.token_provider import JWTTokenProvider, OAuthTokenProvider
9
+ from foundry_dev_tools.foundry_api_client import FoundryRestClient
10
+
11
+ __all__ = [
12
+ "__version__",
13
+ "Config",
14
+ "Host",
15
+ "JWTTokenProvider",
16
+ "FoundryContext",
17
+ "OAuthTokenProvider",
18
+ "FoundryRestClient",
19
+ "CachedFoundryClient",
20
+ ]
@@ -0,0 +1,17 @@
1
+ from __future__ import annotations
2
+
3
+ from types import ModuleType
4
+ from typing import Any
5
+
6
+
7
+ class FakeModule(ModuleType):
8
+ __fake__ = True
9
+
10
+ def __init__(self, name: str):
11
+ self.msg = f"Missing optional dependency '{name}'. Use conda or pip to install {name}"
12
+ super().__init__(name, self.msg)
13
+
14
+ def __getattr__(self, attr: Any) -> Any: # noqa: ANN401
15
+ if isinstance(attr, str) and attr.startswith("__"):
16
+ object.__getattribute__(self, attr)
17
+ raise ImportError(self.msg)
@@ -0,0 +1,12 @@
1
+ from __future__ import annotations
2
+
3
+ try:
4
+ import pandas as pd
5
+
6
+ pd.__fake__ = False
7
+ except ImportError:
8
+ from foundry_dev_tools._optional import FakeModule
9
+
10
+ pd = FakeModule("pandas")
11
+
12
+ __all__ = ["pd"]
@@ -0,0 +1,12 @@
1
+ from __future__ import annotations
2
+
3
+ try:
4
+ import polars as pl
5
+
6
+ pl.__fake__ = False
7
+ except ImportError:
8
+ from foundry_dev_tools._optional import FakeModule
9
+
10
+ pl = FakeModule("polars")
11
+
12
+ __all__ = ["pl"]
@@ -0,0 +1,15 @@
1
+ from __future__ import annotations
2
+
3
+ try:
4
+ import pyarrow as pa
5
+ import pyarrow.parquet as pq
6
+
7
+ pa.__fake__ = False
8
+ pq.__fake__ = False
9
+ except ImportError:
10
+ from foundry_dev_tools._optional import FakeModule
11
+
12
+ pa = FakeModule("pyarrow")
13
+ pq = FakeModule("pyarrow")
14
+
15
+ __all__ = ["pa"]
@@ -0,0 +1,18 @@
1
+ from __future__ import annotations
2
+
3
+ try:
4
+ import pyspark
5
+ import pyspark.sql as pyspark_sql
6
+ import pyspark.sql.types as pyspark_sql_types
7
+
8
+ pyspark.__fake__ = False
9
+ pyspark_sql.__fake__ = False
10
+ pyspark_sql_types.__fake__ = False
11
+ except ImportError:
12
+ from foundry_dev_tools._optional import FakeModule
13
+
14
+ pyspark = FakeModule("pyspark")
15
+ pyspark_sql = FakeModule("pyspark")
16
+ pyspark_sql_types = FakeModule("pyspark")
17
+
18
+ __all__ = ["pyspark"]