Skip to content

Conversation

Askir
Copy link
Contributor

@Askir Askir commented Jun 10, 2025

This splits the worker and semantic-catalog into 2 separate extras. This setup would allow to install pgai via pip install pgai and use it to install all the SQL via pgai install -d ...

If then you try to run pgai vectorizer worker you'll get an error:

vectorizer-worker extra is not installed, please install it with `pip install pgai[vectorizer-worker]`

Same for any semantic catalog command.

The error messages use rich and tiktoken to decide if the extra was installed, since it is non-trivial/not cleanly possible to determine if an extra is installed, pip doesn't really store this metadata.

Note: This PR does unintentionally update a bunch of dependencies. I don't really know how to prevent that since uv doesn't have a command to move an existing dependency between extras. Since tests still pass I think we are fine though.

@Askir Askir temporarily deployed to internal-contributors June 10, 2025 10:07 — with GitHub Actions Inactive
@Askir Askir temporarily deployed to internal-contributors June 10, 2025 10:26 — with GitHub Actions Inactive
@Askir Askir temporarily deployed to internal-contributors June 10, 2025 13:40 — with GitHub Actions Inactive
@@ -92,7 +92,7 @@ Once the semantic catalog is loaded with embedded descriptions, you start genera
```bash
git clone https://github.com/timescale/pgai.git -b jgpruitt/semantic-catalog
cd pgai/projects/pgai
uv sync
uv sync --all-extras
Copy link
Contributor

Choose a reason for hiding this comment

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

do you need all extras?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nah you're right just semantic-catalog is enough.

@Askir Askir force-pushed the jascha/split-deps-into-extras branch from cb8cbed to 20d13fa Compare June 10, 2025 14:38
@Askir Askir temporarily deployed to internal-contributors June 10, 2025 14:38 — with GitHub Actions Inactive
@Askir Askir force-pushed the jascha/split-deps-into-extras branch from 20d13fa to f26c831 Compare June 10, 2025 14:44
@Askir Askir temporarily deployed to internal-contributors June 10, 2025 14:44 — with GitHub Actions Inactive
@Askir Askir marked this pull request as ready for review June 10, 2025 15:25
@Askir Askir requested a review from a team as a code owner June 10, 2025 15:25
@smoya
Copy link
Contributor

smoya commented Jun 10, 2025

I like the change so far.

@Askir Askir force-pushed the jascha/split-deps-into-extras branch from f26c831 to e996bc1 Compare June 17, 2025 15:22
@Askir Askir temporarily deployed to internal-contributors June 17, 2025 15:22 — with GitHub Actions Inactive
@Askir Askir temporarily deployed to internal-contributors June 17, 2025 16:10 — with GitHub Actions Inactive
@Askir
Copy link
Contributor Author

Askir commented Jun 17, 2025

@smoya @JamesGuthrie Do you think we should proceed with this? If yes, what is missing?

@Askir Askir requested review from smoya and JamesGuthrie June 17, 2025 16:11
@smoya
Copy link
Contributor

smoya commented Jun 19, 2025

@smoya @JamesGuthrie Do you think we should proceed with this? If yes, what is missing?

Happy proceeding 👍

@Askir Askir merged commit 3a11921 into main Jun 20, 2025
17 of 18 checks passed
@Askir Askir deleted the jascha/split-deps-into-extras branch June 20, 2025 12:34
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.

4 participants