Skip to content

Commit

Permalink
add as classmethod
Browse files Browse the repository at this point in the history
  • Loading branch information
saggu committed Aug 26, 2020
1 parent 76f5aae commit d0df4c2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions backend/app_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class AppConfig:
DEFAULT_SPARQL_ENDPOINT = 'https://dsbox02.isi.edu:8888/bigdata/namespace/wdq/sparql'
GOOGLE_CLIENT_ID = '552769010846-tpv08vhddblg96b42nh6ltg36j41pln1.apps.googleusercontent.com'
DATAMART_API_ENDPOINT = 'https://datamart:[email protected]:8888/datamart-api-wm'
# DATAMART_API_ENDPOINT = 'http://localhost:12543'

#############SQL STUFF

Expand Down
2 changes: 2 additions & 0 deletions backend/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from web_exceptions import WebException
from t2wml.api import Project as apiProject
from t2wml_annotation_integration import AnnotationIntegration
import traceback

debug_mode = False

Expand Down Expand Up @@ -201,6 +202,7 @@ def upload_data_file(pid):
PropertiesFile.create_from_dataframe(project, combined_item_df)
YamlFile.create_from_formdata(project, t2wml_yaml, sheet)
except Exception as e:
traceback.print_exc()
print(e) # continue to normal spreadsheet handling

response["wikifierData"] = serialize_item_table(project, sheet)
Expand Down
1 change: 1 addition & 0 deletions backend/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ def add_to_api_proj(self):
self.project.api_project.add_property_file(self.relative_path)
self.project.api_project.save()

@classmethod
def create_from_dataframe(cls, project, df):
folder = cls.get_folder(project)
filepath = str(folder / "datamart_new_properties.tsv")
Expand Down

0 comments on commit d0df4c2

Please sign in to comment.