Skip to content
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
4 changes: 2 additions & 2 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ tag = False

[bumpversion:file:src/client/delphi_epidata.R]

[bumpversion:file:src/client/delphi_epidata.py]

[bumpversion:file:src/client/packaging/npm/package.json]

[bumpversion:file:src/client/packaging/pypi/setup.py]

[bumpversion:file:src/client/packaging/pypi/delphi_epidata/__init__.py]

[bumpversion:file:dev/local/setup.cfg]
13 changes: 3 additions & 10 deletions src/client/delphi_epidata.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,12 @@
from tenacity import retry, stop_after_attempt

from aiohttp import ClientSession, TCPConnector, BasicAuth
from importlib.metadata import version, PackageNotFoundError

from delphi.epidata.common.logger import get_structured_logger

# Obtain package version for the user-agent. Uses the installed version by
# preference, even if you've installed it and then use this script independently
# by accident.
try:
_version = version("delphi-epidata")
except PackageNotFoundError:
_version = "0.script"
__version__ = "4.1.20"

_HEADERS = {"user-agent": "delphi_epidata/" + _version + " (Python)"}
_HEADERS = {"user-agent": "delphi_epidata/" + __version__ + " (Python)"}


class EpidataException(Exception):
Expand All @@ -50,7 +43,7 @@ class Epidata:
BASE_URL = "https://api.delphi.cmu.edu/epidata"
auth = None

client_version = _version
client_version = __version__

logger = get_structured_logger('delphi_epidata_client')
debug = False # if True, prints extra logging statements
Expand Down
2 changes: 2 additions & 0 deletions src/client/packaging/pypi/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

### Includes
- https://github.com/cmu-delphi/delphi-epidata/pull/1418
- https://github.com/cmu-delphi/delphi-epidata/pull/1436

### Added
- Adds two debug flags:
- `debug` logs info about HTTP requests and responses
- `sandbox` prevents any HTTP requests from actually executing, allowing for tests that do not incur server load.
- Fixes the `user-agent` version so that it is correctly set to match the current client release.

## [4.1.17] - 2024-01-30

Expand Down
3 changes: 1 addition & 2 deletions src/client/packaging/pypi/delphi_epidata/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from .delphi_epidata import Epidata
from .delphi_epidata import Epidata, __version__

name = "delphi_epidata"
__version__ = "4.1.20"