Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V5.0.3 #156

Merged
merged 3 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 5.0.2
current_version = 5.0.3
commit = True
tag = True

Expand Down
36 changes: 19 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
repos:
- repo: https://github.com/hadialqattan/pycln
rev: v2.4.0 # Possible releases: https://github.com/hadialqattan/pycln/releases
hooks:
- id: pycln
args: [--config=pyproject.toml]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-json
- id: check-yaml
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.2
hooks:
Expand All @@ -17,13 +14,18 @@ repos:
args: [ --fix ]
# Run the formatter
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-json
- id: check-yaml
- id: debug-statements
- repo: meta
hooks:
- id: check-hooks-apply
- repo: https://github.com/hadialqattan/pycln
rev: v2.4.0 # Possible releases: https://github.com/hadialqattan/pycln/releases
hooks:
- id: pycln
args: [--config=pyproject.toml]

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 5.0.3 (2024-05-02)
- Add missing confirmation number to PEDS model (#135).
- Improve downloading of images from USPTO Public Search.

## 5.0.2 (2024-05-01)
- Fix issue where legal codes database can aggregate to an unreasonable size (#146)

## 5.0.1 (2024-05-01)
- Fix type annotations to be supported by Python 3.9 (#153, #138).
- Raises an exception in PEDS when data removed by the USPTO is attempted to be accessed.
Expand Down
5 changes: 2 additions & 3 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import asyncio

import pytest

import inspect
from pathlib import Path

import pytest

collect_ignore = [
"hishel",
]
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

# The full version, including alpha/beta/rc tags

version = release = "5.0.2"
version = release = "5.0.3"


# -- General configuration ---------------------------------------------------
Expand Down
4 changes: 1 addition & 3 deletions patent_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@

# Add the log message handler to the logger
handler = logging.FileHandler(LOG_FILENAME)
handler.setFormatter(
logging.Formatter("%(asctime)s:%(levelname)s:%(name)s:%(message)s")
)
handler.setFormatter(logging.Formatter("%(asctime)s:%(levelname)s:%(name)s:%(message)s"))
logger.addHandler(handler)

logger.info(f"Starting Patent Client with log level {SETTINGS.log_level}")
Expand Down
4 changes: 1 addition & 3 deletions patent_client/_async/epo/ops/family/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
class FamilyAsyncApi:
@classmethod
async def get_family(cls, number, doc_type="publication", format="docdb"):
url = (
f"http://ops.epo.org/3.2/rest-services/family/{doc_type}/{format}/{number}"
)
url = f"http://ops.epo.org/3.2/rest-services/family/{doc_type}/{format}/{number}"
response = await session.get(url)
return Family.model_validate(response.text)
4 changes: 1 addition & 3 deletions patent_client/_async/epo/ops/family/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ class FamilyManager(AsyncManager[Family]):
__schema__ = FamilySchema

async def get(self, doc_number):
return await FamilyAsyncApi.get_family(
doc_number, doc_type="publication", format="docdb"
)
return await FamilyAsyncApi.get_family(doc_number, doc_type="publication", format="docdb")
12 changes: 3 additions & 9 deletions patent_client/_async/epo/ops/family/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,13 @@ class FamilyMemberSchema(Schema):
'.//epo:application-reference/epo:document-id[@document-id-type="docdb"]'
)
family_id = f.Str("./@family-id")
publication_reference = f.List(
DocumentIdSchema, ".//epo:publication-reference/epo:document-id"
)
application_reference = f.List(
DocumentIdSchema, ".//epo:application-reference/epo:document-id"
)
publication_reference = f.List(DocumentIdSchema, ".//epo:publication-reference/epo:document-id")
application_reference = f.List(DocumentIdSchema, ".//epo:application-reference/epo:document-id")
priority_claims = f.List(PriorityClaimSchema, ".//epo:priority-claim")


class FamilySchema(Schema):
publication_reference = DocumentIdSchema(
".//ops:patent-family/ops:publication-reference"
)
publication_reference = DocumentIdSchema(".//ops:patent-family/ops:publication-reference")
num_records = f.Int(".//ops:patent-family/@total-result-count")
publication_number = DocDbNumberField(
'.//ops:patent-family/ops:publication-reference/epo:document-id[@document-id-type="docdb"]'
Expand Down
Loading
Loading