Skip to content

Metadata API: Improve docstrings language #1600

Closed

Description

@jku

Let's fix some docstrings in metadata.py: some of them document internal details or just repeat the name of the attribute/argument in a way that's not useful for reader:

  • Assume reader is not going to read the source code
  • If it's not obvious, explain what argument/attribute is for -- why is it exposed in API?

I'd like to get at least this common line fixed:

unrecognized fields: Dictionary of all unrecognized fields.

This does not explain what they are or why they are exposed in the API.

Activity

  1. added
    documentation
    on Oct 1, 2021
  2. added
    backlog
    on Oct 13, 2021
  3. lukpueh commented on Oct 14, 2021

    @lukpueh
    Member

    Some related thoughts with regards to consistency of docs that might be addressed here:

    • Don't use different aliases for the same docs section, e.g. "Args" vs. "Arguments"
    • Quote (' vs. " vs. ``) or don't quote all proper names, e.g. args, return values, class names, etc.
    • Start all args/raises/returns oneliners with definite, indefinite or no article.
    • As @jku says, don't state the obvious, more specifically reduce redundancy in variable names, typing information, method summary and args/raises/returns descriptions.
  4. lukpueh commented on Oct 20, 2021

    @lukpueh
    Member

    Quote (' vs. " vs. ``) or don't quote all proper names, e.g. args, return values, class names, etc.

    Just saw that @jku already has a ticket for this. I say we try standardise to double backtick and see if it looks good in source code and on RTD.

  5. added a commit that references this issue on Dec 7, 2021
  6. added this to the Sprint 14 milestone on Dec 8, 2021
  7. self-assigned this
    on Dec 8, 2021
  8. added
    1.0.0 blockers
    on Jan 11, 2022
  9. modified the milestones: Sprint 14, Sprint 15 on Jan 12, 2022
  10. modified the milestones: Sprint 15, sprint 16 on Jan 26, 2022
  11. assigned and unassigned on Jan 26, 2022
  12. added a commit that references this issue on Feb 1, 2022
    bda6099
  13. ivanayov commented on Feb 8, 2022

    @ivanayov
    Collaborator

    Arguments left to explain after #1815:

    signer: ``securesystemslib.signer.Signer`` implementation
    

    and some still questionable:

    data: Metadata content.
    ...
    filename: Path to write the file to.
    etc.
    

    plus clarify json/dict representation

  14. added a commit that references this issue on Feb 8, 2022
    8d929f0
  15. jku commented on Feb 9, 2022

    @jku
    MemberAuthor

    Further improvements are a good idea but I think I'd like to close this issue -- or alternatively remove the blocker label: I think the docs look good enough for a release 🤷 ?

  16. removed
    1.0.0 blockers
    on Feb 9, 2022
  17. added 2 commits that reference this issue on Mar 18, 2022
    2726860
    db7fbb2
  18. added a commit that references this issue on May 10, 2022
    7de325d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backlogdocumentation

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions