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

Feature/Pyodide metadata and scores validators #395

Merged
merged 25 commits into from
Nov 5, 2024

Conversation

fyvon
Copy link
Member

@fyvon fyvon commented Oct 23, 2024

No description provided.

@smlmbrt
Copy link
Member

smlmbrt commented Oct 23, 2024

Q: is it missing pyodide in requirements.txt? Also should we consider making it a poetry file like pygscatalog?

@fyvon
Copy link
Member Author

fyvon commented Oct 23, 2024

Q: is it missing pyodide in requirements.txt?

Pyodide can't be imported through python packages but needs to be imported in JS. The pypi page says:

Pyodide is a Python distribution that runs in the browser or Node.js. It cannot be installed from PyPi. See github.com/pyodide/pyodide for how to use Pyodide.

It is imported in webworker.js:
importScripts("https://cdn.jsdelivr.net/pyodide/v0.26.0/full/pyodide.js");
https://github.com/PGScatalog/PGS_Catalog/blob/7cf2d8a64da2c8465d3cedd05191fc0fbed68731/validator/static/validator/js/webworker.js#L6C28-L6C36

@fyvon fyvon self-assigned this Oct 23, 2024
@fyvon fyvon added the enhancement New feature or request label Oct 23, 2024
@fyvon fyvon marked this pull request as ready for review November 1, 2024 17:16
@fyvon fyvon requested a review from ens-lgil November 4, 2024 10:54
if (data.error) {
let report = '<h5 class="mt-4"><i class="fa fa-times-circle pgs_color_red"></i> Error report</h5>'
+ makeReportTable(data.error, 'Error message(s)');
$('#report_error').html(report);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be overkilling, but wondering if we should have a function for these html reports, with the type of report and the message as arguments, e.g.:

function reports_html(type,msg) {
    $('#report_'+type).html(msg);
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this refactoring would make the code a bit confusing

validator/static/validator/js/scores_consumer.js Outdated Show resolved Hide resolved
validator/static/validator/js/webworker.js Outdated Show resolved Hide resolved
@fyvon fyvon merged commit a1c4eb1 into PGScatalog:master Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants