Skip to content

Commit

Permalink
Rename project to diffbot-kg
Browse files Browse the repository at this point in the history
  • Loading branch information
brendancsmith committed Feb 23, 2024
1 parent 8981580 commit 469ca08
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

First off, thanks for taking the time to contribute!

The following is a set of guidelines for contributing to `diffbot-kg-client`, which is hosted on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
The following is a set of guidelines for contributing to `diffbot-kg`, which is hosted on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

### How Can I Contribute?

#### Reporting Bugs

This section guides you through submitting a bug report for `diffbot-kg-client`. Following these guidelines helps the maintainer and the community understand your report, reproduce the behavior, and find related reports.
This section guides you through submitting a bug report for `diffbot-kg`. Following these guidelines helps the maintainer and the community understand your report, reproduce the behavior, and find related reports.

- **Use a clear and descriptive title** for the issue to identify the problem.
- **Provide a step-by-step description** of the suggested enhancement in as many details as possible.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ Installation
------------

```sh
pip install diffbot-kg-client
pip install diffbot-kg
```

Usage
-----

```python
from diffbot_kg_client import DiffbotSearchClient, DiffbotEnhanceClient
from diffbot_kg import DiffbotSearchClient, DiffbotEnhanceClient

search_client = DiffbotSearchClient('your_api_key')
enhance_client = DiffbotEnhanceClient('your_api_key')
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "diffbot-kg-client"
name = "diffbot-kg"
version = "0.1.0"
description = "Python client for the Diffbot Knowledge Graph API."
authors = ["Brendan C. Smith"]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from yarl import URL

from diffbot_kg_client.session import DiffbotResponse, DiffbotSession
from diffbot_kg.session import DiffbotResponse, DiffbotSession

log = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class RetryableException(Exception):
pass


# TODO: should I make this a subclass of ClientSession?
# TODO: Should this be a subclass of ClientSession?
class DiffbotSession:
"""
A class representing a session with the Diffbot API.
Expand Down Expand Up @@ -90,7 +90,6 @@ async def close(self) -> None:
after=after_log(log, logging.DEBUG),
)
async def _request(self, method, url, **kwargs) -> DiffbotResponse:
# TODO: Implement retries on [400, 422, 429, 500] status codes using Tenancity lib
async with self._limiter:
async with await self._session.request(method, url, **kwargs) as resp:
try:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import pytest

from diffbot_kg_client.clients import DiffbotEnhanceClient, DiffbotSearchClient
from diffbot_kg_client.session import DiffbotResponse
from diffbot_kg.clients import DiffbotEnhanceClient, DiffbotSearchClient
from diffbot_kg.session import DiffbotResponse


class TestDiffbotSearchClient:
Expand Down

0 comments on commit 469ca08

Please sign in to comment.