Skip to content

Code Refactoring (APIs/Clients) #248

@AaronMT

Description

@AaronMT

General

  • One module per report, shared code into a helper, all client code into a client.py
  • Handlers are the entry points
  • All report modules should have one entry point, called fetch in the handlers
  • All internal functions should be private and use an underscore in the API
  • API e.g, report_testrails_users_insert insert functions to _upsert() or _upsert_issue() etc
  • Strip out client code

Bugzilla

  • Create out a client.py, breaking up api_bugzilla.py into seperate report modules.

Testrail

  • Closest to a working model
  • Rename inserts to upserts

Low-hanging fruit:

  • Strip out client codes (client.py) for APIs
  • Rename entry points to fetch and inserts to _upserts
  • api_ broken down into reports

Misc

  • linting review
  • uv drop-in instead of pip and caching
  • Replace all prints with logging module
  • Consolidate the amount of repeat workflow steps (e.g, cloud-proxy)

-> Repeating weekly hack session on Wednesdays, January

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions