Skip to content

Commit 934c170

Browse files
authored
Merge pull request #1181 from cmu-delphi/release/delphi-epidata-4.1.1
Release Delphi Epidata 4.1.1
2 parents 5ca1bef + 2d88e46 commit 934c170

File tree

9 files changed

+17
-11
lines changed

9 files changed

+17
-11
lines changed

.bumpversion.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 4.1.0
2+
current_version = 4.1.1
33
commit = False
44
tag = False
55

dev/local/setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = Delphi Development
3-
version = 4.1.0
3+
version = 4.1.1
44

55
[options]
66
packages =

src/client/delphi_epidata.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Epidata <- (function() {
1515
# API base url
1616
BASE_URL <- getOption('epidata.url', default = 'https://api.delphi.cmu.edu/epidata/')
1717

18-
client_version <- '4.1.0'
18+
client_version <- '4.1.1'
1919

2020
auth <- getOption("epidata.auth", default = NA)
2121

src/client/delphi_epidata.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323
})(this, function (exports, fetchImpl, jQuery) {
2424
const BASE_URL = "https://api.delphi.cmu.edu/epidata/";
25-
const client_version = "4.1.0";
25+
const client_version = "4.1.1";
2626

2727
// Helper function to cast values and/or ranges to strings
2828
function _listitem(value) {

src/client/packaging/npm/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "delphi_epidata",
33
"description": "Delphi Epidata API Client",
44
"authors": "Delphi Group",
5-
"version": "4.1.0",
5+
"version": "4.1.1",
66
"license": "MIT",
77
"homepage": "https://github.com/cmu-delphi/delphi-epidata",
88
"bugs": {
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from .delphi_epidata import Epidata
22

33
name = 'delphi_epidata'
4-
__version__ = '4.1.0'
4+
__version__ = '4.1.1'

src/client/packaging/pypi/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="delphi_epidata",
8-
version="4.1.0",
8+
version="4.1.1",
99
author="David Farrow",
1010
author_email="[email protected]",
1111
description="A programmatic interface to Delphi's Epidata API.",

src/server/_config.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77

88
load_dotenv()
99

10-
VERSION = "4.1.0"
10+
VERSION = "4.1.1"
1111

1212
MAX_RESULTS = int(10e6)
1313
MAX_COMPATIBILITY_RESULTS = int(3650)
1414

1515
SQLALCHEMY_DATABASE_URI = os.environ.get("SQLALCHEMY_DATABASE_URI", "sqlite:///test.db")
16+
SQLALCHEMY_DATABASE_URI_PRIMARY = os.environ.get("SQLALCHEMY_DATABASE_URI_PRIMARY")
1617

1718
# defaults
1819
SQLALCHEMY_ENGINE_OPTIONS = {

src/server/_db.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from sqlalchemy.engine import Engine
33
from sqlalchemy.orm import sessionmaker
44

5-
from ._config import SQLALCHEMY_DATABASE_URI, SQLALCHEMY_ENGINE_OPTIONS
5+
from ._config import SQLALCHEMY_DATABASE_URI, SQLALCHEMY_DATABASE_URI_PRIMARY, SQLALCHEMY_ENGINE_OPTIONS
66

77

88
# _db.py exists so that we dont have a circular dependency:
@@ -11,8 +11,13 @@
1111

1212
engine: Engine = create_engine(SQLALCHEMY_DATABASE_URI, **SQLALCHEMY_ENGINE_OPTIONS)
1313

14-
metadata = MetaData(bind=engine)
14+
if SQLALCHEMY_DATABASE_URI_PRIMARY:
15+
user_engine: Engine = create_engine(SQLALCHEMY_DATABASE_URI_PRIMARY, **SQLALCHEMY_ENGINE_OPTIONS)
16+
else:
17+
user_engine: Engine = engine
1518

16-
Session = sessionmaker(bind=engine)
19+
metadata = MetaData(bind=user_engine)
20+
21+
Session = sessionmaker(bind=user_engine)
1722

1823

0 commit comments

Comments
 (0)