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

DOC-11959: Vector Search Code Snippets - iOS #850

Merged
merged 13 commits into from
Mar 25, 2024

Conversation

velicuvlad
Copy link
Contributor

No description provided.

modules/objc/VectorSeachSnippets.m Outdated Show resolved Hide resolved
modules/objc/VectorSeachSnippets.m Outdated Show resolved Hide resolved
modules/objc/VectorSeachSnippets.m Outdated Show resolved Hide resolved
modules/objc/VectorSeachSnippets.m Outdated Show resolved Hide resolved
modules/objc/VectorSeachSnippets.m Outdated Show resolved Hide resolved
@velicuvlad velicuvlad requested a review from pasin March 21, 2024 14:07
Copy link
Collaborator

@ElliotFrancisHunter ElliotFrancisHunter left a comment

Choose a reason for hiding this comment

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

I'm happy with these snippets. Plenty of useful stuff for me to work with 👍🏼 As long as @pasin is happy I'll merge and add these to the docs.

Copy link
Contributor

@pasin pasin left a comment

Choose a reason for hiding this comment

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

I have just noticed this.

Should the code snippet is in the project here?

https://github.com/couchbase/docs-couchbase-lite/tree/release/3.1/modules/objc/examples

https://github.com/couchbase/docs-couchbase-lite/tree/release/3.1/modules/swift/examples

Also we have tried to make the code snippet compileable in those two XCode project. I think it's a good idea to follow that so that we don't make mistake in the code snippet.

modules/swift/VectorSearchSnippets.swift Outdated Show resolved Hide resolved
modules/swift/VectorSearchSnippets.swift Outdated Show resolved Hide resolved
modules/objc/VectorSeachSnippets.m Outdated Show resolved Hide resolved
modules/objc/VectorSeachSnippets.m Outdated Show resolved Hide resolved
modules/objc/VectorSeachSnippets.m Outdated Show resolved Hide resolved
modules/objc/VectorSeachSnippets.m Outdated Show resolved Hide resolved
modules/objc/VectorSeachSnippets.m Outdated Show resolved Hide resolved
@velicuvlad
Copy link
Contributor Author

I know our current snippets structure, but my understanding is that Docs is looking to move away from the tags and was asked to have everything at the root of the platform directory. I have tested the snippets for interpreter and compile errors in terms of the api functionality and methods called.

To clarify, my expectations is that this won't be the final shape of the snippets, nor that the whole file to be added to the docs page quote on quote.

... will come back with another commit for some of the amends requested

@pasin
Copy link
Contributor

pasin commented Mar 21, 2024

If this is a new location, can you create an XCode project and add the file into the project? So that we don't need to manually copy the code and compile it somewhere else when we make change to the code.

@pasin
Copy link
Contributor

pasin commented Mar 21, 2024

You could aso add to the PR validation to verify the code snippet as well.

Here is an example in release/3.1 branch.
https://github.com/couchbase/docs-couchbase-lite/blob/release/3.1/.github/workflows/xcodebuild.yml

I'm asking this as in the past we made a lot of mistake in the code snippet.

You can have the structure like :

root/<codesnippet.swift>
root/xcode/<Snippet.xcodeproject>

@ElliotFrancisHunter

Can we use the existing project to keep the code snippet? I doesn't need to use the tags. The goal is to have the code within the compliable project to make sure that the code snippet can be compiled without an error. We aso have the Github PR validation to check that the code snippet is compiled. We do have the problems in the past that the code snippet had a lot of mistake and was not compilable.

@velicuvlad
Copy link
Contributor Author

velicuvlad commented Mar 25, 2024

The validation automation must be done via Jenkins for multiple reasons such as access to the unreleased binaries etc. I have built the project on local and is fine.

This PR is ready for merge and can be merged if urgent until I find some time to take it with Jenkins - CBL-5561 for tracking

@ElliotFrancisHunter
Copy link
Collaborator

You could aso add to the PR validation to verify the code snippet as well.

Here is an example in release/3.1 branch. https://github.com/couchbase/docs-couchbase-lite/blob/release/3.1/.github/workflows/xcodebuild.yml

I'm asking this as in the past we made a lot of mistake in the code snippet.

You can have the structure like :

root/<codesnippet.swift>
root/xcode/<Snippet.xcodeproject>

@ElliotFrancisHunter

Can we use the existing project to keep the code snippet? I doesn't need to use the tags. The goal is to have the code within the compliable project to make sure that the code snippet can be compiled without an error. We aso have the Github PR validation to check that the code snippet is compiled. We do have the problems in the past that the code snippet had a lot of mistake and was not compilable.

Yes that's fine. It'll make it easier for me to implement the snippets properly rather than the rough copy paste job I've done for sake of time.

@velicuvlad velicuvlad requested a review from pasin March 25, 2024 15:37
@ElliotFrancisHunter
Copy link
Collaborator

@pasin good to merge for sake of release 👍🏼 just waiting on your review

Copy link
Contributor

@pasin pasin left a comment

Choose a reason for hiding this comment

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

@velicuvlad I have some minor comments about the extra lines. The rest looks good to me.

modules/swift/examples/code_snippets/VectorSearch.swift Outdated Show resolved Hide resolved
modules/swift/examples/code_snippets/VectorSearch.swift Outdated Show resolved Hide resolved
modules/objc/examples/code_snippets/VectorSeach.m Outdated Show resolved Hide resolved
modules/objc/examples/code_snippets/VectorSeach.m Outdated Show resolved Hide resolved
modules/objc/examples/code_snippets/VectorSeach.m Outdated Show resolved Hide resolved
modules/objc/examples/code_snippets/VectorSeach.m Outdated Show resolved Hide resolved
modules/swift/examples/code_snippets/VectorSearch.swift Outdated Show resolved Hide resolved
@velicuvlad
Copy link
Contributor Author

velicuvlad commented Mar 25, 2024

@ElliotFrancisHunter I'll merge this now

@velicuvlad velicuvlad merged commit df9dfb7 into couchbase:release/3.2 Mar 25, 2024
@velicuvlad velicuvlad deleted the DOC-11959 branch March 25, 2024 16:07
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.

3 participants