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