Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Fix examples, rework Context classes #8

Merged
merged 13 commits into from
Feb 6, 2025
Merged

Conversation

mrkaye97
Copy link

@mrkaye97 mrkaye97 commented Feb 6, 2025

Couple things here:

  1. Merged in the new workflows + Pydantic settings changes, which means we can get rid of load_dotenv everywhere 🥳
  2. Using the new workflow approach in all of the examples, including subclassing the BaseWorkflow, constructing config, and, when necessary, creating some input_validator classes (e.g. in the fanout examples)
  3. Reworked the context to be a single class - there was way too much abstraction there for what it was IMO
  4. Ripped out the V1 Hatchet class + WorkflowMeta and associated code

@mrkaye97 mrkaye97 marked this pull request as ready for review February 6, 2025 01:18
@mrkaye97 mrkaye97 requested review from grutt and abelanger5 February 6, 2025 01:20
conftest.py Outdated
Comment on lines 18 to 38
def token() -> str:
result = subprocess.run(
[
"docker",
"compose",
"run",
"--no-deps",
"setup-config",
"/hatchet/hatchet-admin",
"token",
"create",
"--config",
"/hatchet/config",
"--tenant-id",
"707d0855-80ab-4e1f-a156-f1c4546cbf52",
],
capture_output=True,
text=True,
)

return result.stdout.strip()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @grutt - this should be a fix to hard-coding that token env var (the thing we talked about a week or two ago - this)

@mrkaye97 mrkaye97 merged commit 5e69585 into main Feb 6, 2025
@mrkaye97
Copy link
Author

mrkaye97 commented Feb 6, 2025

merged this optimistically too - can circle back to any comments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant