Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.2.8 #214

Merged
merged 8 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading