Skip to content

Conversation

@grahamalama
Copy link
Contributor

@grahamalama grahamalama commented Dec 14, 2023

In this PR, we introduce a slightly new structure for the code we use to communicate with Jira and Bugzilla.

Before, we had a services package with a jira and bugzilla module.

jbi
├── services
    ├── __init__.py
    ├── bugzilla.py
    ├── common.py
    └── jira.py

Each of those modules had a *Client and *Service class.

Now, we do essentially the same thing, except we have:

jbi
├── bugzilla
│   ├── __init__.py
│   ├── client.py
│   └── service.py
├── common
│   ├── __init__.py
│   └── instrument.py
└── jira
    ├── __init__.py
    ├── client.py
    └── service.py

this is to:

  • reinforce the separate concerns of a client and service, especially in tests
    • a client should only make HTTP requests and receive responses
    • services should use clients to do higher-level project operations
  • allow for the continued encapsulation of different domains. For example, instead of one models module, it might make sense to move certain models under specific namespaces

@grahamalama grahamalama requested a review from a team as a code owner December 14, 2023 00:05
@grahamalama grahamalama merged commit a621467 into main Dec 14, 2023
@grahamalama grahamalama deleted the new-structure branch December 14, 2023 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants