Skip to content

Mock test CLI and complete docstrings #763

Closed

Description

@vladimir-v-diaz

Description of issue or feature request:

The CLI and supporting were reviewed in #741, but repo.py still needs mock tests and docstrings.

Activity

  1. michizhou commented on Oct 10, 2018

    @michizhou
    Contributor

    Hi @vladimir-v-diaz, if it's alright with you, I would be glad to take a look at resolving this issue! Just let me know what types of mock tests and docstrings you would like me to include or edit in repo.py.

  2. alyptik commented on Oct 10, 2018

    @alyptik

    @michizhou That's very alright! Unfortunately, I'm not completely sure on what type of docstrings/mock tests were meant, so I'll let @vladimir-v-diaz clarify what should be edited/included.

  3. JustinCappos commented on Oct 10, 2018

    @JustinCappos
    Member
  4. awwad commented on Oct 10, 2018

    @awwad
    Contributor

    I'd hazard that what is meant here is two things:

    • While there is documentation for the CLI (general doc; more CLI examples), there is some need for more explanation of the arguments and/or more examples of use in in the docstrings of the CLI scripts.
      • repo.py has examples in the docstring, but the command-line arguments themselves are not listed and individually explained. That should probably be done, or if parse_arguments() seems conveniently readable enough (probably not), the docstring of the module should point to it.
      • The same goes for client.py, but it could probably use a few more examples in addition to the explanation of command line arguments.
    • Vlad may have been suggesting doctest, which would need to be used differently for these CLI modules than it is for other modules. I don't know if this would be helpful for the CLI modules. Currently, doctest is used for repository_lib.py, repository_tool.py, developer_tool.py, and formats.py. It is seemingly not linked to our continuous integration testing, though. I think that's a project for another issue, so I'd focus on the first bullet here instead.
  5. awwad commented on Oct 10, 2018

    @awwad
    Contributor

    He could also have meant the addition of testing via something like the usual unittest scheme that TUF uses (see all the tests in tests/) to test the CLI scripts. This is a larger and more important task.

    Either would be helpful. Please let me know which you'd rather work on and I'll give you more instruction as necessary.

  6. michizhou commented on Oct 10, 2018

    @michizhou
    Contributor

    @awwad I would like to get started with the documentation part of it. Once that is taken care of, I would be glad to help add additional testing for the CLI scripts and possibly look into the use of doctest. Let me know if that works for you. Thanks!

  7. michizhou commented on Oct 26, 2018

    @michizhou
    Contributor

    @awwad Just wanted to follow up with you on working with the documentation of the CLI script docstrings. I would appreciate it if you could give me more instruction and guidance on getting started.

  8. awwad commented on Oct 26, 2018

    @awwad
    Contributor

    Sorry, I didn't realize you were waiting for more. The two checklist items in the first bullet of the comment above were what I had in mind for the documentation bit.

    It might be hard for me to tell what introduction is necessary, so questions would be very helpful. 😃

    If you need to get a feel for what's going on, I'd try out the command line tool, following these tutorials until you feel confident.

  9. michizhou commented on Nov 3, 2018

    @michizhou
    Contributor

    @awwad I have just pushed a new PR that addresses the concerns over documentation in the CLI test scripts (i.e. repo.py and client.py) with new command-line descriptions and examples added. Let me know if you need me to make any additional changes. Thanks!

  10. michizhou commented on Nov 12, 2018

    @michizhou
    Contributor

    @awwad Just wanted to follow up with you again since I did create a PR that addresses this issue over a week ago. I would appreciate it if you could look it over and review it. Thanks!

  11. awwad commented on Nov 19, 2018

    @awwad
    Contributor

    #796 merged. Thanks, @michizhou!

    repo.py still needs docstrings for a number of its functions before I can close this.

  12. michizhou commented on Nov 20, 2018

    @michizhou
    Contributor

    @awwad Not a problem! Just wanted to let you know that I recently opened a new PR that should help definitely resolve this issue, as I have provided docstrings for all functions that don't have one already.

  13. michizhou commented on Nov 30, 2018

    @michizhou
    Contributor

    @awwad Just wanted to follow up with you on the fact that I have resolved the missing docstrings issue for repo.py in a separate PR (#805) that I opened up nearly two weeks ago. I would appreciate it if you could review my changes and let me know if any more modifications need to be made. Thanks!

  14. michizhou commented on Dec 10, 2018

    @michizhou
    Contributor

    @awwad I apologize for bothering you again, but it has been over three weeks since I last made a new PR (#805) that should resolve the issue of missing docstrings in repo.py. I would really appreciate it if you could review at your earliest convenience so that we can close this issue. Please let me know if you have any concerns or if you think any more changes to the docstrings need to be made. Thanks.

  15. lukpueh commented on Sep 17, 2019

    @lukpueh
    Member

    Closing due to uncertain future of TUF cli. Re-visit with #811.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions