AlexsLemonade / scpca-portal

Single-cell Pediatric Cancer Atlas Portal is a growing database of uniformly processed single-cell data from pediatric cancer tumors and model systems
https://scpca.alexslemonade.org
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

Update Citation and Terms of Use - Additional Terms to table #782

Closed nozomione closed 3 weeks ago

nozomione commented 2 months ago

Context

Related issue: Additional Restrictions for Portal-wide metadata download

In #781, we've updated the context and context variable name of README template (templates/readme/metadata_only.md) to projects. This update will enable the table below to be displayed in a downloadable README.md file for the portal-wide metadata-only download.

A table with multiple project information: Project ID Data Usage Restrictions
SCPCP000001 Research or academic purposes only.
SCPCP000002 Research or academic purposes only.
SCPCP000003 Research or academic purposes only.

Problem or idea

We should use the projects context to generate the above table in the README template.

Solution or next step

### Additional Restrictions
{% if projects|length > 1 %}
| Project ID | Data Usage Restrictions |
|:-----------|:------------------------|
{% for project in projects %}
| [{{ project.scpca_id }}](https://scpca.alexslemonade.org/projects/{{ project.scpca_id }}) | {{ project.additional_restrictions }} |
{% endfor %}
{% else %}
{% if additional_terms %}
{{ additional_terms }}.
{% endif %}
{% endif %}
allyhawkins commented 1 month ago

@nozomione I think the table looks good, but I don't think we want a table if someone downloads metadata for a single project. Then you would just have a one line table. If someone downloads metadata for a single project, I think we should keep the one line sentence that we have in the existing READMEs if that's possible.

So for portal-wide metadata you would have the table as you mentioned above.

Then for an individual project metadata download you would have: https://github.com/AlexsLemonade/scpca-portal/blob/f6708c8749929abd0e399bc97dde1eceddeaca6d/api/scpca_portal/templates/readme/single_cell.md?plain=1#L71-L73

I naively assume you could add a check to see if you have more than one project. If there's more than one project then make the table, otherwise keep the existing line.

nozomione commented 1 month ago

@allyhawkins, I've made the adjustment based on your feedback (the template context will be changed to a list that allows for length check!) 👍 Thank you, Ally!

allyhawkins commented 1 month ago

@allyhawkins, I've made the adjustment based on your feedback (the template context will be changed to a list that allows for length check!) 👍 Thank you, Ally!

The new update looks good!

davidsmejia commented 3 weeks ago

closed with #792