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

docs: Add Python SDK docs #3658

Merged
merged 1 commit into from Nov 9, 2022

Conversation

vikram-dagger
Copy link
Contributor

@vikram-dagger vikram-dagger commented Nov 3, 2022

This commit contains the Python SDK documentation, consisting of

  • Overview
  • Installation
  • Get Started
  • Additional multi-build guide

After this commit is applied, a new sidebar navigation node will appear for the Python SDK and related docs.

Closes #3639

Signed-off-by: Vikram Vaswani vikram@dagger.io

@mircubed
Copy link
Contributor

mircubed commented Nov 3, 2022

I created #3668 to confirm that API reference plan. Based on that decision, we can update the PR

@mircubed
Copy link
Contributor

mircubed commented Nov 4, 2022

@helderco , Vikram will need your code by Tuesday in order to give him one day to get it into the getting started guide for a Thursday launch

@vikram-dagger vikram-dagger force-pushed the 3639-python-sdk-docs branch 4 times, most recently from a8b85fe to 3a63fa2 Compare November 8, 2022 19:26
@vikram-dagger vikram-dagger force-pushed the 3639-python-sdk-docs branch 2 times, most recently from d701e6c to 5ce2fa2 Compare November 8, 2022 19:36
@vikram-dagger vikram-dagger marked this pull request as ready for review November 8, 2022 19:46
docs/current/sdk/python/628797-get-started.md Outdated Show resolved Hide resolved
docs/current/sdk/python/628797-get-started.md Outdated Show resolved Hide resolved
docs/current/sdk/python/628797-get-started.md Outdated Show resolved Hide resolved
docs/current/sdk/python/628797-get-started.md Outdated Show resolved Hide resolved
docs/current/sdk/python/866944-install.md Outdated Show resolved Hide resolved
docs/current/sdk/python/snippets/get-started/step1/test.py Outdated Show resolved Hide resolved
@kpenfound
Copy link
Contributor

kpenfound commented Nov 8, 2022

Running through the getting-started guide on a macbook. Using system python3 Python 3.9.6. Ran into 3 blockers in the first 2 steps:

  • poetry install docs didn't work. I did brew install poetry instead
  • after installing poetry, running poetry new ci failed with No module named 'six'. I guess I'm missing some dependencies? I resolved this with pip3 install six
  • after running poetry install from the ci directory and going back to the project directory, running python3 ci/test.py failed with ModuleNotFoundError: No module named 'anyio'. It looks like poetry install didn't actually download anything

@mircubed
Copy link
Contributor

mircubed commented Nov 9, 2022

@vikram-dagger
Copy link
Contributor Author

Running through the getting-started guide on a macbook. Using system python3 Python 3.9.6. Ran into 3 blockers in the first 2 steps:

@kpenfound the latest version doesn't use poetry, just pip install dagger-io in a venv. Could you please try that approach and see if it's smoother, or let me know if you run into issues that we can then clarify in the guide? Thanks.

@kpenfound
Copy link
Contributor

Newest updates worked for me @vikram-dagger !
Some notes from my last run:

  • step 3: should show dagger output if possible, I cant tell if anything actually happened
  • step 4: highlight for version in versions
  • step 4b: is it possible to let buildkit run the tests concurrently without tg like we do in the updated go getting-started guide?
  • if we exclude test.py in the hostdir() we can have caching between 4a and 4b

@helderco
Copy link
Contributor

helderco commented Nov 9, 2022

  • step 4b: is it possible to let buildkit run the tests concurrently without tg like we do in the updated go getting-started guide?

It's possible if we put the output from each test in separate files and combine later but sometimes reaching for the language's concurrency is adequate and I wanted to show how you can do that, including seeing the performance increase of doing it in async vs sync for example. We can also put concurrency in an advanced guide or something, but I'd like to at least have that example.

The Dagger Python SDK may *not* be a good fit if you are...

* A developer who doesn't know Python, and is not interested in learning it.
* A "designated devops person" who doesn't think of themselves as a developer - nothing makes you happier than a battle-hardened shell script.
Copy link
Contributor

Choose a reason for hiding this comment

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

@shykes has feedback on this line, as Python isn't normally the go to for devops.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

* A developer who needs CI/CD, and is looking for an excuse to learn Python.
* Your team's "designated devops person", hoping to replace a pile of artisanal scripts with something more powerful.
* A platform engineer writing custom Python tooling, with the goal of unifying continuous delivery across organizational silos.
* A cloud-native developer advocate or solutions engineer, looking to demonstrate a complex integration on short notice.
Copy link
Contributor

@mircubed mircubed Nov 9, 2022

Choose a reason for hiding this comment

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

Change " A cloud-native developer advocate or solutions engineer, looking to demonstrate a complex integration on short notice." to "A data engineer looking to better integrate with your organization's CI/CD pipelines."

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion:

"A data engineer looking to better integrate with your organization's CI/CD or MLOps pipelines."

@vikram-dagger
Copy link
Contributor Author

Newest updates worked for me @vikram-dagger ! Some notes from my last run:
* step 3: should show dagger output if possible, I cant tell if anything actually happened
* step 4: highlight for version in versions

Modified now

@vikram-dagger vikram-dagger force-pushed the 3639-python-sdk-docs branch 2 times, most recently from 72f937c to d72fd1e Compare November 9, 2022 20:26
@vikram-dagger
Copy link
Contributor Author

Didn't want to waste @helderco 's work on creating a multi-build example, so added it as a separate guide in the above PR now. It's optional, can be removed if not required.

@vikram-dagger vikram-dagger force-pushed the 3639-python-sdk-docs branch 2 times, most recently from f81d3ef to fe27185 Compare November 9, 2022 20:35
This commit adds Python SDK documentation and a new set of nodes to the
navigation tree, It adds the Python SDK introduction, installation steps,
get started guide and additional guide. It adds the code for the guides
as individual code snippets. The additional guide provides a multi-build
example similar to the one used for the Go SDK.

Signed-off-by: Vikram Vaswani <vikram@dagger.io>
Copy link
Contributor

@shykes shykes left a comment

Choose a reason for hiding this comment

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

Looks good after a light review. I suggest we merge quickly and keep improving iteratively.

@vikram-dagger I defer to you on when to merge.

@vikram-dagger vikram-dagger merged commit 4516585 into dagger:main Nov 9, 2022
@vikram-dagger vikram-dagger deleted the 3639-python-sdk-docs branch November 10, 2022 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.

Python SDK Documentation
6 participants