Skip to content

Commit

Permalink
Remove similarity feature flag, it's now fully integrated
Browse files Browse the repository at this point in the history
  • Loading branch information
alastair committed Jul 22, 2021
1 parent 850db0c commit 6d80291
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
2 changes: 0 additions & 2 deletions config.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ FEATURE_EVAL_FILTERING = True
# Choose settings used for model training
FEATURE_EVAL_MODEL_SELECTION = False

# Enable similarity API endpoints and webpages
FEATURE_SIMILARITY = True
# Allow submission of feedback on the quality of similarity results
FEATURE_SIMILARITY_FEEDBACK = False

Expand Down
2 changes: 0 additions & 2 deletions consul_config.py.ctmpl
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ FEATURE_EVAL_LOCATION = {{template "KEY" "feature/eval_location"}}
FEATURE_EVAL_FILTERING = {{template "KEY" "feature/eval_filtering"}}
# Choose settings used for model training
FEATURE_EVAL_MODEL_SELECTION = {{template "KEY" "feature/eval_model_selection"}}
# Enable similarity API endpoints and webpages
FEATURE_SIMILARITY = {{template "KEY" "feature/similarity"}}
# Allow submission of feedback on the quality of similarity results
FEATURE_SIMILARITY_FEEDBACK = {{template "KEY" "feature/similarity_feedback"}}

Expand Down
7 changes: 2 additions & 5 deletions webserver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ def create_app_sphinx():
blueprints/views are needed to build documentation.
"""
app = CustomFlask(import_name=__name__, use_flask_uuid=True)
app.config["FEATURE_SIMILARITY"] = True
_register_blueprints(app)
return app

Expand All @@ -190,8 +189,7 @@ def register_ui(app):
app.register_blueprint(login_bp, url_prefix='/login')
app.register_blueprint(user_bp)
app.register_blueprint(datasets_bp, url_prefix='/datasets')
if app.config.get("FEATURE_SIMILARITY", False):
app.register_blueprint(similarity_bp, url_prefix='/similarity')
app.register_blueprint(similarity_bp, url_prefix='/similarity')

def register_api(app):
v1_prefix = os.path.join(API_PREFIX, 'v1')
Expand All @@ -202,8 +200,7 @@ def register_api(app):
app.register_blueprint(bp_core, url_prefix=v1_prefix)
app.register_blueprint(bp_datasets, url_prefix=v1_prefix + '/datasets')
app.register_blueprint(bp_dataset_eval, url_prefix=v1_prefix + '/datasets/evaluation')
if app.config.get("FEATURE_SIMILARITY", False):
app.register_blueprint(bp_similarity, url_prefix=v1_prefix + '/similarity')
app.register_blueprint(bp_similarity, url_prefix=v1_prefix + '/similarity')

from webserver.views.api.legacy import api_legacy_bp
app.register_blueprint(api_legacy_bp)
Expand Down
4 changes: 1 addition & 3 deletions webserver/templates/data/summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
<div id="page-recording-summary">

<h2 class="page-title">Recording "{{ metadata['title'] }}" by {{ metadata['artist'] }}</h2>
{%- if config.get('FEATURE_SIMILARITY') %}
<p><a href="{{ url_for('similarity.metrics', mbid=metadata['mbid']) }}">See Similar</a></p>
{% endif -%}
<p><a href="{{ url_for('similarity.metrics', mbid=metadata['mbid']) }}">See Similar</a></p>

{%- include 'data/summary-metadata.html' -%}

Expand Down

0 comments on commit 6d80291

Please sign in to comment.