-
Notifications
You must be signed in to change notification settings - Fork 276
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: tutorial/example for ngclient Updater #1518
Comments
I'm marking this good first issue even if it's not completely trivial: if you're interested, feel free to ask for a bit of advice. |
The alternative to a tutorial might be to write a small example client that can just be executed, and short documentation for it -- the content is going to be roughly the same but I feel like an example is more useful? Possible initial implementation using the tests repository data
I would like to have a more featureful repo example (that would actually show the cool features of TUF) but this would be a start to show the client. |
I'm picking up this issue. |
I got into potential future plans in chat, I think they look good enough to include here -- most of it not as something to implement as part of initial example but as goals for future: so these potential variations of example code setups would be pretty much the same for the client part, what changes is the remote end: where is the metadata (and targets) served and how are they generated. Obviously the decisions affect the client in the sense that some client features would only make sense in some of these cases.
|
Before submitting the PR, I am sending a design proposal/draft for local static server The idea is to start with a simple document describing how to run an example of a client code using the The document will have three basic steps.
The client code example:
|
on the CLI design: looks good. Download could be a sub-command as well (so I'm mostly thinking about if you add more commands later (like One thing we didn't discuss is how do we handle the server startup in this first iteration? the client example could of course start a new local http server in the background each time it runs... but maybe the documentation just includes advice to run |
That said, maybe we should not provide an example of If we do that, then I think |
I think using sub-commands also looks good, and it is something usual now, also helps to extend.
I am planning to have it in the documentation as a kind of how-to... The draft I am working on PreparingTo have the example working in your machine, clone the $ git clone [email protected]:theupdateframework/python-tuf.git RepositoryAs this example demonstrates how to use the The static files are available in the Run the repository using the Python3 built-in http module, and keep this $ python3 -m http.server -d tests/repository_data/repository
Serving HTTP on :: port 8000 (http://[::]:8000/) ... (...) |
Yes, I was thinking about it this morning when I was writing the code. |
This commit is a proposal to improve the ``tuf.ngclient.updater`` example available in the docstring to make it easy for those who have the first contact with the documentation to run straight forward the ``Updater``. It is a minor update as part of theupdateframework#1518. Signed-off-by: Kairo de Araujo <[email protected]>
It is a simple example of TUF ngclient implementation. This example contains a README.rst that is a how-to-use this simple client using static test data from TUF repository. The code aims to be straightforward implementation, using basic concepts from Python and Command Line Interface. This is part of theupdateframework#1518 Signed-off-by: Kairo de Araujo <[email protected]>
It is a simple example of TUF ngclient implementation. This example contains a README.rst that is a how-to-use this simple client using static test data from TUF repository. The code aims to be straightforward implementation, using basic concepts from Python and Command Line Interface. This is part of theupdateframework#1518 Signed-off-by: Kairo de Araujo <[email protected]>
It is a simple example of TUF ngclient implementation. This example contains a README.rst that is a tutorial/how-to-use this simple client using static test data from TUF repository. The code aims to be straightforward implementation, using basic concepts from Python and Command Line Interface. This is part of theupdateframework#1518 Signed-off-by: Kairo de Araujo <[email protected]>
It is a simple example of TUF ngclient implementation. This example contains a README.rst that is a tutorial/how-to-use this simple client using static test data from TUF repository. The code aims to be straightforward implementation, using basic concepts from Python and Command Line Interface. This is part of theupdateframework#1518 Signed-off-by: Kairo de Araujo <[email protected]>
The initial version for the client example was merged by PR #1675. I will add here some next steps commented in this PR. I think we can continue the discussion here and create new issues (smaller issues) to track them. From this comment #1675 (review) (thanks @jku for the insights)
|
Thanks. I'd like to close this one to mark that the dependency for 1694 is handled... Maybe it's ok that the main missing features are issues and remaining ideas are searchable here... or you could file another issue for the "support other servers" issue. Closing this one, feel free to file new issues for the other ideas |
EDIT: I think starting with out-of-the-box runnable example code is a better idea: see comment below (original issue follows:)
the updater module docs show how to write a client in five lines of code but they also mention dependencies:
would be nice to have really easy to follow instructions that handle all of that...
The tutorial should live within the documentation but not in the ngclient module docs, just as a page on its own. Actually writing the tutorial is probably a "good first issue"?
The text was updated successfully, but these errors were encountered: