Skip to content
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
2 changes: 1 addition & 1 deletion data/how-it-works.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ steps:
- id: step-5
title: Create a release and share it
summary: "A release builds an installer for each system your app lists (Windows, macOS, Linux); share its link or list the app in the App Centre."
text: A release on GitHub builds an installer for each system listed under distribution.platforms in labconstrictor-app.yaml (all of them when you list none). You share the release, and anyone who can see your repository can install the app from it.
text: A release on GitHub builds an installer for each system listed under distribution.platforms in labconstrictor-app.yaml (every supported system when the field is left out). You share the release, and anyone who can see your repository can install the app from it.
region: [6, 768, 820, 122]
do:
- text: "Check the Actions tab of your repository: no workflow should be running."
Expand Down
6 changes: 2 additions & 4 deletions scripts/lcsite/citation.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,10 @@ def version_sentence(app: dict) -> str:


def app_section(app: dict) -> str:
"""The "How to cite" section of an app page, from the manifest's `doi`; "" for a testing app that has none."""
"""The "How to cite" section of an app page, from the manifest's `doi`; "" for an app that names no publication."""
doi = app["manifest"]["doi"] if "doi" in app["manifest"] else ""
if doi:
link = esc(doi_link(doi))
return (f'<h2 id="cite">How to cite</h2><p>The authors give this publication to cite: <a href="{link}">doi:{esc(doi)}</a></p>'
f'<p><a class="lc-go" href="{link}">Read the paper</a></p>{version_sentence(app)}')
if app["section"] == "testing":
return ""
return '<h2 id="cite">How to cite</h2><p>The authors name no publication to cite.</p>' + version_sentence(app)
return ""
6 changes: 3 additions & 3 deletions tests/test_citation.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ def test_with_a_doi_it_links_the_paper_and_names_the_version(self) -> None:
self.assertIn("Read the paper", html)
self.assertIn("latest release: v0.1.1", html)

def test_without_a_doi_it_only_says_the_listing_names_none(self) -> None:
"""No invented reference; a testing app without a doi has no section; an app without a release has no version sentence."""
self.assertIn("The authors name no publication to cite", citation.app_section(app()))
def test_without_a_doi_there_is_no_section(self) -> None:
"""No invented reference: an app that names no publication has no How to cite section; no release, no version sentence."""
self.assertEqual(citation.app_section(app()), "")
self.assertEqual(citation.app_section(app(section="testing")), "")
self.assertNotIn("Name the version", citation.app_section(app(release=False)))

Expand Down
Loading