Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 01:31 PM - edited 09-29-2023 01:50 PM
How do you build the wheel? I got it working with poetry like so:
entrypoint.py somewhere in your codebase:
def entrypoint():
print("Works")
pyproject.toml:
[tool.poetry]
name = "package"
version = "1.0.0"
description = "package"
packages = [{include = "src"}, ] # assuming you have the /src structure
[tool.poetry.scripts]
my_entrypoint = "src.entrypoint:entrypoint" # before : is path to file and after is method name
Job config:
package_name: 'package' --> taken from pyproject.toml
entrypoint: 'my_entrypoint' --> taken from the pyproject.toml before the `=` of your entrypoint line
(assuming your installed the wheel on the cluster)
I also pulled my hair out over this and am now bald.
FYI, my full setup is micromamba -> poetry -> gitlab -> pulumi -> databricks ☠️