Skip to content

Commit

Permalink
Merge pull request #84 from specifysystems/82-rank-spocc-for-datasets
Browse files Browse the repository at this point in the history
82 rank spocc for datasets
  • Loading branch information
zzeppozz authored Apr 4, 2024
2 parents a36dd85 + 0c8456e commit ce8c1c1
Show file tree
Hide file tree
Showing 3 changed files with 217 additions and 318 deletions.
27 changes: 23 additions & 4 deletions flask_app/analyst/rank.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Class for the Specify Network Name API service."""
from http import HTTPStatus
from werkzeug.exceptions import BadRequest

from flask_app.common.s2n_type import APIService, AnalystOutput
Expand Down Expand Up @@ -81,13 +80,33 @@ def _get_ordered_counts(cls, count_by, order, limit):
dataset_key = "0000e36f-d0e9-46b0-aa23-cc1980f00515"

svc = RankSvc()
response = svc.get_endpoint()
AnalystOutput.print_output(response, do_print_rec=True)
# print(response)
# response = svc.get_endpoint()
# AnalystOutput.print_output(response, do_print_rec=True)
count_by = "species"
order = "descending"
limit = 5
response = svc.rank_counts(count_by)
AnalystOutput.print_output(response, do_print_rec=True)
# print(response)

"""
from werkzeug.exceptions import BadRequest
from flask_app.common.s2n_type import APIService, AnalystOutput
from flask_app.analyst.base import _AnalystService
from flask_app.analyst.rank import *
from sppy.aws.aws_constants import PROJ_BUCKET
from sppy.tools.provider.spnet import SpNetAnalyses
from sppy.tools.s2n.utils import (combine_errinfo, get_traceback)
dataset_key = "0000e36f-d0e9-46b0-aa23-cc1980f00515"
count_by = "species"
order = "descending"
limit = 5
svc = RankSvc()
response = svc.rank_counts(count_by)
AnalystOutput.print_output(response, do_print_rec=True)
"""
Loading

0 comments on commit ce8c1c1

Please sign in to comment.