Skip to content

Commit

Permalink
Merge pull request #121 from x-atlas-consortia/yuanzhou/assayclass-de…
Browse files Browse the repository at this point in the history
…v-server-deploy

Tweaks for deployment
  • Loading branch information
yuanzhou authored Aug 30, 2024
2 parents 44aa495 + 58a444c commit 438ae30
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
19 changes: 17 additions & 2 deletions dev/app.py → ...tology_api/routes/assayclasses_dev/app.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
import os
import json
from flask import Flask, request, Response, abort
from urllib.request import urlopen
from urllib.error import HTTPError
import logging
from flask import Flask, request, Response, abort, Blueprint


####################################################################################################
# For assayclasses development needs - Zhou 8/28/2024
assayclasses_dev_blueprint = Blueprint('assayclasses-dev', __name__, url_prefix='/assayclasses-dev')

@assayclasses_dev_blueprint.route('', methods=['GET'])
def assayclasses_dev_get_all():
return assayclass()

@assayclasses_dev_blueprint.route('/<code>', methods=['GET'])
def assayclasses_dev_get_by_code(code):
return assayclasses_by_code(code)
####################################################################################################


#
# This is a RESTful service that exposes two endpoints:
Expand All @@ -30,7 +45,7 @@


app = Flask(__name__,
instance_path=os.path.join(os.path.abspath(os.path.dirname(__file__)), 'instance'),
instance_path=os.path.join(os.path.abspath(os.path.dirname(__file__)), '../../instance'),
instance_relative_config=True)
app.config.from_pyfile('app.cfg')

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ def make_flask_config():
app.register_blueprint(assayclasses_blueprint)


####################################################################################################
# For assayclasses development needs - Zhou 8/28/2024
from hs_ontology_api.routes.assayclasses_dev.app import assayclasses_dev_blueprint
app.register_blueprint(assayclasses_dev_blueprint)
####################################################################################################


# Instantiate a Cells API client.
# May 2024 Deprecated
# cellsurl = make_flask_config().get('CELLSURL')
Expand Down

0 comments on commit 438ae30

Please sign in to comment.