Skip to content

Commit 49f4a01

Browse files
committed
merge master, resolve conflict
2 parents 09b2311 + 90c3d22 commit 49f4a01

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+4965
-6194
lines changed

HISTORY.md

+13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
T2WML Standalone Server App History
22
===================================
33

4+
Changes in version 2.3.9:
5+
-----------------------
6+
* upgrade to t2wml-api version 0.0.16
7+
* added file tree with support for multiple data files in one project
8+
* completely changed format of communication between frontend and backend, creating a set of standardized responses with defined DTOs, streamlining the reactivity, etc.
9+
* Add support for versioning in caching so that running older versions of t2wml doesn't corrupt cache.
10+
* change how label fetching for results preview works (faster, less buggy, and more)
11+
* hot fix to user agent for sparql bug
12+
* expanded support for cleaningStatement in yaml including a menu item to toggle whether cleaned or raw is displayed and bolded text to indicate changed cells
13+
* added versioning for numpy to work around bug in windows in numpy 1.19.4
14+
15+
16+
417

518
Changes in version 2.3.8:
619
-----------------------

backend/app_config.py

+13-18
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,43 @@
1515

1616
BASEDIR = os.path.abspath(os.path.dirname(__file__))
1717
if BASEDIR not in sys.path:
18-
sys.path.append(BASEDIR) #when running migrate, needed to not get import errors
19-
20-
UPLOAD_FOLDER = os.path.join(DATADIR, "storage")
21-
CACHE_FOLDER=os.path.join(DATADIR, "cache")
22-
DOWNLOAD_FOLDER = os.path.join(BASEDIR, "downloads")
18+
sys.path.append(BASEDIR) # when running migrate, needed to not get import errors
2319

20+
CACHE_FOLDER = os.path.join(DATADIR, "cache")
2421
Path(CACHE_FOLDER).mkdir(parents=True, exist_ok=True)
2522

2623
app = Flask(__name__, static_folder=None)
2724
CORS(app, supports_credentials=True)
28-
app.secret_key = "secret key" # This will no longer be used once we stop using session cookies
25+
2926

3027
class AppConfig:
31-
USE_CACHE=True
32-
UPLOAD_FOLDER = UPLOAD_FOLDER
33-
MAX_CONTENT_LENGTH = 16 * 1024 * 1024 # 16 MB max file size
34-
downloads = DOWNLOAD_FOLDER
28+
USE_CACHE = True
29+
MAX_CONTENT_LENGTH = 16 * 1024 * 1024 # 16 MB max file size
3530
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
36-
'sqlite:///' + os.path.join(DATADIR, 'entities.db')
31+
'sqlite:///' + os.path.join(DATADIR, 'entities.db')
3732
SQLALCHEMY_TRACK_MODIFICATIONS = False
3833
STATIC_FOLDER = os.path.join(BASEDIR, 'static')
3934

35+
4036
app.config.from_object(AppConfig)
4137

4238
DEFAULT_SPARQL_ENDPOINT = 'https://query.wikidata.org/bigdata/namespace/wdq/sparql'
43-
GOOGLE_CLIENT_ID = '552769010846-tpv08vhddblg96b42nh6ltg36j41pln1.apps.googleusercontent.com'
4439
DATAMART_API_ENDPOINT = 'https://datamart:datamart-api-789@dsbox02.isi.edu:8888/datamart-api-wm'
45-
#DATAMART_API_ENDPOINT = 'http://localhost:12543'
4640

4741
#############SQL STUFF
4842

49-
AUTO_MIGRATE= "sqlite" in AppConfig.SQLALCHEMY_DATABASE_URI #only set to true if database is sqlite
50-
#MIGRATE_DIR=os.path.join(BASEDIR, "migrations")
43+
AUTO_MIGRATE = "sqlite" in AppConfig.SQLALCHEMY_DATABASE_URI # only set to true if database is sqlite
44+
45+
46+
# MIGRATE_DIR=os.path.join(BASEDIR, "migrations")
5147

5248
def auto_constraint_name(constraint, table):
5349
if constraint.name is None or constraint.name == "_unnamed_":
5450
return "sa_autoname_%s" % str(uuid.uuid4())[0:5]
5551
else:
5652
return constraint.name
5753

54+
5855
convention = {
5956
"auto_constraint_name": auto_constraint_name,
6057
"ix": 'ix_%(column_0_label)s',
@@ -64,15 +61,13 @@ def auto_constraint_name(constraint, table):
6461
"pk": "pk_%(table_name)s"
6562
}
6663

67-
6864
metadata = MetaData(naming_convention=convention)
6965

7066
db = SQLAlchemy(app, metadata=metadata)
7167

7268
from wikidata_models import *
7369

74-
migrate = Migrate(app, db, render_as_batch=True) #, directory=MIGRATE_DIR
75-
70+
migrate = Migrate(app, db, render_as_batch=True) # , directory=MIGRATE_DIR
7671

7772
if AUTO_MIGRATE:
7873
with app.app_context():

0 commit comments

Comments
 (0)