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

Fix/base install #1009

Merged
merged 5 commits into from
Jul 23, 2024
Merged

Fix/base install #1009

merged 5 commits into from
Jul 23, 2024

Conversation

collindutter
Copy link
Member

@collindutter collindutter commented Jul 22, 2024

Describe your changes

  • Lazily imports modules in Pg Vector Store Driver and Observability Drivers.
  • Add unit test for running some tests against a "bare" installation of griptape with no extras installed.

Issue ticket number and link

NA.

@collindutter collindutter force-pushed the fix/base-install branch 6 times, most recently from 3ad096c to 2a9706c Compare July 23, 2024 16:47
Copy link

codecov bot commented Jul 23, 2024

Codecov Report

Attention: Patch coverage is 95.52239% with 3 lines in your changes missing coverage. Please review.

Files Patch % Lines
...ape/drivers/vector/pgvector_vector_store_driver.py 86.95% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@collindutter collindutter marked this pull request as ready for review July 23, 2024 18:43
Copy link
Contributor

@dylanholmes dylanholmes left a comment

Choose a reason for hiding this comment

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

Awesome work! Thanks for quickly fixing this!

@staticmethod
def build_span_exporter(base_url: str, api_key: str, headers: dict, structure_run_id: str) -> SpanExporter:
@define
class SpanExporter(import_optional_dependency("opentelemetry.sdk.trace.export").SpanExporter):
Copy link
Contributor

Choose a reason for hiding this comment

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

Beautiful 🤮

- name: Init environment
uses: ./.github/actions/init-bare-environment
- name: Run unit tests
run: poetry run pytest -n auto tests/unit/structures
Copy link
Contributor

Choose a reason for hiding this comment

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

That's all the tests we can run? I suppose that is sufficient to cover the majority of missed optional imports, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah we really only need to run a single test to know whether it's broken or not. I arbitrarily picked these.

@collindutter collindutter merged commit 19a1ec4 into dev Jul 23, 2024
15 checks passed
@collindutter collindutter deleted the fix/base-install branch July 23, 2024 21:26
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.

2 participants