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

Documentation: Add executable code examples #552

Closed
wants to merge 2 commits into from
Closed

Conversation

amotl
Copy link
Member

@amotl amotl commented May 10, 2023

Hi there,

instead of only nurturing the cratedb-examples » by-language folder with executable and sensible code examples, which demonstrate and explore specific areas around communicating with CrateDB efficiently, I think it is also valuable to maintain corresponding examples folders within the repositories itself, because this is where developers very often will look for, just because, well, runnable code examples are just so incredibly useful, and where else should I expect to find them? 1

In this spirit, this patch is adding two code example from my gists collection, sqlalchemy_efficient_inserts.py and cratedb_pandas_insert.py, which I think make sense to be added here. I don't think they necessarily have to be tested automatically, but sure it will be nice to have, so if you think they should be tested, I am sure we will find a way to add them to the test suite without too much obstruction on a subsequent iteration.

With kind regards,
Andreas.

P.S.: This patch is here to set the stage for a subsequent one, which refactors the performance-optimized insert_bulk function into the package itself, in order to be able to reuse it in downstream software, notebooks and tutorials more easily.

/cc @marijaselakovic, @hammerhead, @hlcianfagna, @proddata, @WalBeh

Footnotes

  1. I found this has not been much of a guideline at CrateDB's auxilliary repositories yet, so I started that recently at CrateDB PDO driver » Examples.

@amotl amotl requested review from seut and matriv May 10, 2023 19:43
@matriv
Copy link
Contributor

matriv commented May 11, 2023

In my opinion we shouldn't duplicate work to each repo, I believe it's enough to have all examples in the cratedb-examples repo and link to them?

@amotl
Copy link
Member Author

amotl commented May 11, 2023

Hi @matriv,

your suggestion resonates well with me. Let's close this PR, and adjust GH-553 correspondingly.

With kind regards,
Andreas.

@amotl
Copy link
Member Author

amotl commented May 11, 2023

I believe it's enough to have all examples in the cratedb-examples repo and link to them?

crate/cratedb-examples#64 converges the content, and GH-554 adds corresponding pointers. Thanks!

@amotl amotl closed this May 11, 2023
@amotl amotl deleted the amo/examples branch May 11, 2023 10:22
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