Skip to content

Update docs#89

Open
jaeyson wants to merge 1 commit intomainfrom
89-update-docs
Open

Update docs#89
jaeyson wants to merge 1 commit intomainfrom
89-update-docs

Conversation

@jaeyson
Copy link
Owner

@jaeyson jaeyson commented Mar 8, 2026

Summary by Sourcery

Extract test schemas into dedicated modules, refine documentation, and tweak CI health‑check logging while noting Typesense v28.0 support in the changelog.

Enhancements:

  • Move all ExTypesense test schema definitions from test_helper into separate modules under lib/test_schema for better structure and reuse.

CI:

  • Adjust Typesense health‑check steps in CI workflows to print the waiting message once before entering the retry loop.

Documentation:

  • Polish README wording around v2 upgrade instructions and tighten formatting in the local Typesense guide, including clarifying Dockerfile usage.
  • Document support for Typesense v28.0 in the changelog.

@jaeyson jaeyson self-assigned this Mar 8, 2026
@jaeyson jaeyson added the documentation Improvements or additions to documentation label Mar 8, 2026
@sourcery-ai
Copy link

sourcery-ai bot commented Mar 8, 2026

Reviewer's Guide

Refactors test schemas out of test_helper into dedicated modules under lib/test_schema, tweaks CI logging for Typesense health checks, and makes minor documentation and changelog updates including noting support for Typesense v28.0.

Class diagram for refactored test_schema modules

classDiagram

class TestHelper {
}

class TestSchemaCar {
}

class TestSchemaCatalog {
}

class TestSchemaCredential {
}

class TestSchemaHouse {
}

class TestSchemaMultiSearch {
}

class TestSchemaPerson {
}

class TestSchemaProduct {
}

class TestSchemaTruck {
}

TestHelper ..> TestSchemaCar
TestHelper ..> TestSchemaCatalog
TestHelper ..> TestSchemaCredential
TestHelper ..> TestSchemaHouse
TestHelper ..> TestSchemaMultiSearch
TestHelper ..> TestSchemaPerson
TestHelper ..> TestSchemaProduct
TestHelper ..> TestSchemaTruck
Loading

File-Level Changes

Change Details Files
Move test schema module definitions from test_helper into dedicated files under lib/test_schema for better organization and reuse.
  • Remove multiple ExTypesense.TestSchema modules from test_helper, keeping only ExUnit.start/0 there.
  • Create separate schema modules for Person, Truck, Car, House, Product, Catalog, and Credential under lib/test_schema with the same fields and get_field_types implementations as before.
  • Extract the MultiSearch helper with its vector_embeddings/0 function into its own module file under lib/test_schema.
test/test_helper.exs
lib/test_schema/person.ex
lib/test_schema/truck.ex
lib/test_schema/car.ex
lib/test_schema/house.ex
lib/test_schema/product.ex
lib/test_schema/catalog.ex
lib/test_schema/credential.ex
lib/test_schema/multi_search.ex
Update docs and guides for clarity and add explicit note about Typesense v28.0 support.
  • Adjust wording and line breaks in the v2 upgrade notice in the README for readability.
  • Tweak markdown links and add a hint to look for elixir.dockerfile in the running_local_typesense guide.
  • Add a changelog entry advertising support for Typesense v28.0.
README.md
guides/running_local_typesense.md
CHANGELOG.md
Improve CI Typesense startup logging in all versioned workflows.
  • Print a single initial 'Waiting for Typesense to be healthy...' message before the health check loop instead of on each iteration to reduce log noise.
  • Apply this logging change consistently across the v26.0, v27.0, v27.1, and v28.0 CI workflows.
.github/workflows/ci_v26.0.yml
.github/workflows/ci_v27.0.yml
.github/workflows/ci_v27.1.yml
.github/workflows/ci_v28.0.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • The ExTypesense.TestSchema.Product encoder still calls Map.take/2 with :poducts_id but only rewrites :products_id, which means the id field will never be copied as intended; consider fixing the atom name so the virtual id field is populated correctly.
  • All the ExTypesense.TestSchema.* modules have been moved from test/test_helper.exs into lib/test_schema, which means these test-only schemas will now ship as part of the library code; consider relocating them under a test-support path (e.g. test/support) or otherwise scoping them to the test environment.
  • In the README v2 warning block, "The Purpose of v2" is capitalized mid‑sentence and the sentence about opts now reads a bit awkwardly split across lines; consider reverting to lower‑case "purpose" and tightening the line break to read more naturally.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `ExTypesense.TestSchema.Product` encoder still calls `Map.take/2` with `:poducts_id` but only rewrites `:products_id`, which means the `id` field will never be copied as intended; consider fixing the atom name so the virtual id field is populated correctly.
- All the `ExTypesense.TestSchema.*` modules have been moved from `test/test_helper.exs` into `lib/test_schema`, which means these test-only schemas will now ship as part of the library code; consider relocating them under a test-support path (e.g. `test/support`) or otherwise scoping them to the test environment.
- In the README v2 warning block, "The Purpose of v2" is capitalized mid‑sentence and the sentence about `opts` now reads a bit awkwardly split across lines; consider reverting to lower‑case "purpose" and tightening the line break to read more naturally.

## Individual Comments

### Comment 1
<location path="README.md" line_range="92-94" />
<code_context>
 > passing of options (including `conn`). The breaking change here
-> is that `conn` is now part of `opts`. > when calling functions, see
-> example below:
+> is that `conn` is now part of `opts`. when calling functions,
+> see example below:

 ```elixir
</code_context>
<issue_to_address>
**suggestion (typo):** Fix sentence fragmentation and capitalization around "when calling functions".

The period before "when" turns the phrase into a fragment and leaves "when" uncapitalized. Either capitalize and keep it as one sentence ("When calling functions, see example below:") or merge it into the previous sentence ("is that `conn` is now part of `opts` when calling functions; see example below:").

```suggestion
> passing of options (including `conn`). The breaking change here
> is that `conn` is now part of `opts` when calling functions; see example below:
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines 92 to +94
> passing of options (including `conn`). The breaking change here
> is that `conn` is now part of `opts`. > when calling functions, see
> example below:
> is that `conn` is now part of `opts`. when calling functions,
> see example below:
Copy link

Choose a reason for hiding this comment

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

suggestion (typo): Fix sentence fragmentation and capitalization around "when calling functions".

The period before "when" turns the phrase into a fragment and leaves "when" uncapitalized. Either capitalize and keep it as one sentence ("When calling functions, see example below:") or merge it into the previous sentence ("is that conn is now part of opts when calling functions; see example below:").

Suggested change
> passing of options (including `conn`). The breaking change here
> is that `conn` is now part of `opts`. > when calling functions, see
> example below:
> is that `conn` is now part of `opts`. when calling functions,
> see example below:
> passing of options (including `conn`). The breaking change here
> is that `conn` is now part of `opts` when calling functions; see example below:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant