Skip to content

Commit

Permalink
Merge pull request #214 from IFB-ElixirFr/v1.2.8
Browse files Browse the repository at this point in the history
V1.2.8
  • Loading branch information
albangaignard authored Jun 28, 2024
2 parents a6cb5a5 + 9c44b05 commit b7b8c17
Show file tree
Hide file tree
Showing 44 changed files with 5,374 additions and 778 deletions.
63 changes: 11 additions & 52 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,16 @@ def home():
def about():
return render_template(
"about.html",
title="About",
subtitle="More about FAIR-Checker",
title="About us",
# subtitle="More about FAIR-Checker",
)


@app.route("/terms")
def terms():
return render_template(
"terms.html",
title="Terms of use",
)


Expand Down Expand Up @@ -1818,28 +1826,6 @@ def base_metrics():
content_uuid = str(uuid.uuid1())
DICT_TEMP_RES[content_uuid] = ""

# print(str(session.items()))
# sid = request.sid
# return render_template('test_asynch.html')
# metrics = []
#
# metrics_res = METRICS_RES
#
# for metric in metrics_res:
# # remove "FAIR Metrics Gen2" from metric name
# name = metric["name"].replace('FAIR Metrics Gen2- ','')
# # same but other syntax because of typo
# name = name.replace('FAIR Metrics Gen2 - ','')
# metrics.append({
# "name": name,
# "description": metric["description"],
# "api_url": metric["smarturl"],
# "id": "metric_" + metric["@id"].rsplit('/', 1)[-1],
# "principle": metric["principle"],
# "principle_tag": metric["principle"].rsplit('/', 1)[-1],
# "principle_category": metric["principle"].rsplit('/', 1)[-1][0],
# })

raw_jld = buildJSONLD()

metrics = []
Expand All @@ -1860,24 +1846,6 @@ def base_metrics():
}
)

# for key in METRICS.keys():
# print()
# metrics.append(
# {
# "name": METRICS[key].get_name(),
# "implem": METRICS[key].get_implem(),
# "description": METRICS[key].get_desc(),
# "api_url": METRICS[key].get_api(),
# "id": "metric_" + METRICS[key].get_id().rsplit("/", 1)[-1],
# "principle": METRICS[key].get_principle(),
# "principle_tag": METRICS[key].get_principle().rsplit("/", 1)[-1],
# "principle_category": METRICS[key]
# .get_principle()
# .rsplit("/", 1)[-1][0],
# }
# )

# response =
return make_response(
render_template(
"check.html",
Expand All @@ -1886,18 +1854,9 @@ def base_metrics():
jld=raw_jld,
uuid=content_uuid,
title="Check",
subtitle="How FAIR is my resource ?",
subtitle="FAIR assessment of web resources",
)
)
# )).headers.add('Access-Control-Allow-Origin', '*')


# @app.after_request
# def after_request(response):
# response.headers.add('Access-Control-Allow-Origin', '*')
# response.headers.add('Access-Control-Allow-Headers', 'Content-Type,Authorization')
# response.headers.add('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS')
# return response


@app.route("/inspect")
Expand Down
2 changes: 1 addition & 1 deletion data/usage_stats.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"evals_30": 132, "success_30": 103, "failures_30": 29, "f_success_30": 45, "f_failures_30": 3, "a_success_30": 12, "a_failures_30": 0, "i_success_30": 33, "i_failures_30": 3, "r_success_30": 13, "r_failures_30": 23, "total_monthly": [{"x": "2022-01", "y": 141}, {"x": "2022-02", "y": 26}, {"x": "2022-03", "y": 66}, {"x": "2022-05", "y": 48}, {"x": "2022-08", "y": 12}, {"x": "2022-09", "y": 45}, {"x": "2022-10", "y": 11}, {"x": "2023-01", "y": 11}, {"x": "2023-03", "y": 110}, {"x": "2023-04", "y": 22}]}
{"evals_30": 12, "success_30": 12, "failures_30": 0, "f_success_30": 4, "f_failures_30": 0, "a_success_30": 2, "a_failures_30": 0, "i_success_30": 3, "i_failures_30": 0, "r_success_30": 3, "r_failures_30": 0, "total_monthly": [{"x": "2022-08", "y": 12}, {"x": "2022-09", "y": 45}, {"x": "2022-10", "y": 11}, {"x": "2023-01", "y": 11}, {"x": "2023-03", "y": 110}, {"x": "2023-04", "y": 155}, {"x": "2023-05", "y": 279}, {"x": "2023-06", "y": 30}, {"x": "2023-07", "y": 438}, {"x": "2023-12", "y": 80}, {"x": "2024-06", "y": 12}]}
Loading

0 comments on commit b7b8c17

Please # to comment.