diff --git a/.github/workflows/first-time-setup.yaml b/.github/workflows/first-time-setup.yaml index 4f3916f336..bf227f7da4 100644 --- a/.github/workflows/first-time-setup.yaml +++ b/.github/workflows/first-time-setup.yaml @@ -59,7 +59,7 @@ jobs: .github/pull_request_template.md \ - name: Rename files - run: \ + run: | mv .github/user_pull_request_template.md .github/pull_request_template.md - name: Set vars for personalization diff --git a/.github/workflows/versioning.yaml b/.github/workflows/versioning.yaml index 386cc8dafc..cc2655f650 100644 --- a/.github/workflows/versioning.yaml +++ b/.github/workflows/versioning.yaml @@ -122,16 +122,10 @@ jobs: return { version, body }; - - name: Create tag - id: tag - uses: mathieudutour/github-tag-action@v6.1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - custom_tag: ${{ fromJson(steps.version.outputs.result).version }} - - name: Create GitHub release uses: ncipollo/release-action@v1 with: - tag: ${{ fromJson(steps.version.outputs.result).version }} - name: ${{ fromJson(steps.version.outputs.result).version }} + commit: ${{ github.ref }} + tag: v${{ fromJson(steps.version.outputs.result).version }} + name: v${{ fromJson(steps.version.outputs.result).version }} body: ${{ fromJson(steps.version.outputs.result).body }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 6492c47025..d7ab5a2c93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ Reference: common-changelog.org +## 1.1.3 - 2023-04-20 + +### Changed + +- Fix first-time-setup mv bug. +- Fix citation, float, and portrait component CSS. +- Filter and trim citation info fields. + ## 1.1.2 - 2023-04-11 ### Changed diff --git a/CITATION.cff b/CITATION.cff index 90311db7c5..6d40cbc530 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,8 +1,8 @@ # citation metadata for the template itself title: "Lab Website Template" -version: 1.1.2 -date-released: 2023-04-11 +version: 1.1.3 +date-released: 2023-04-20 url: "https://github.com/greenelab/lab-website-template" authors: - family-names: "Rubinetti" diff --git a/_cite/.cache/cache.db b/_cite/.cache/cache.db index 5e29960848..23703d7497 100644 Binary files a/_cite/.cache/cache.db and b/_cite/.cache/cache.db differ diff --git a/_cite/cite.py b/_cite/cite.py index 940054a0b4..8828a9f69e 100644 --- a/_cite/cite.py +++ b/_cite/cite.py @@ -127,15 +127,17 @@ # run Manubot and set citation citation = cite_with_manubot(_id) + # if Manubot cannot cite source except Exception as e: - # if manually-entered source, throw error on cite failure + # if regular source (id entered by user), throw error if source.get("plugin") == "sources.py": log(e, 3, "ERROR") error = True - # otherwise, just warn - # (Manubot might not know how to cite every type of source from orcid, e.g.) + # otherwise, if from metasource (id retrieved from some third-party API), just warn else: log(e, 3, "WARNING") + # discard source + # continue # preserve fields from input source, overriding existing fields citation.update(source) diff --git a/_cite/util.py b/_cite/util.py index 570426278c..87efe940a4 100644 --- a/_cite/util.py +++ b/_cite/util.py @@ -174,19 +174,20 @@ def cite_with_manubot(_id): citation["id"] = _id # title - citation["title"] = manubot.get("title", "") + citation["title"] = manubot.get("title", "").strip() # authors citation["authors"] = [] for author in manubot.get("author", []): - given = author.get("given", "") - family = author.get("family", "") - citation["authors"].append(given + " " + family) + given = author.get("given", "").strip() + family = author.get("family", "").strip() + if given or family: + citation["authors"].append(" ".join([given, family])) # publisher - container = manubot.get("container-title", "") - collection = manubot.get("collection-title", "") - publisher = manubot.get("publisher", "") + container = manubot.get("container-title", "").strip() + collection = manubot.get("collection-title", "").strip() + publisher = manubot.get("publisher", "").strip() citation["publisher"] = container or publisher or collection or "" # extract date part @@ -199,7 +200,7 @@ def date_part(citation, index): # date year = date_part(manubot, 0) if year: - # fallbacks for no month or day + # fallbacks for month and day month = date_part(manubot, 1) or "1" day = date_part(manubot, 2) or "1" citation["date"] = format_date(f"{year}-{month}-{day}") @@ -208,7 +209,7 @@ def date_part(citation, index): citation["date"] = "" # link - citation["link"] = manubot.get("URL", "") + citation["link"] = manubot.get("URL", "").strip() # return citation data return citation diff --git a/_data/citations.yaml b/_data/citations.yaml index 80e8564c01..5e11a55c76 100644 --- a/_data/citations.yaml +++ b/_data/citations.yaml @@ -1,5 +1,25 @@ # DO NOT EDIT, GENERATED AUTOMATICALLY +- id: doi:10.1093/nar/gkad289 + title: 'MyGeneset.info: an interactive and programmatic platform for community-curated + and user-created collections of genes' + authors: + - Ricardo Avila + - Vincent Rubinetti + - Xinghua Zhou + - Dongbo Hu + - Zhongchao Qian + - Marco Alvarado Cano + - Everaldo Rodolpho + - Ginger Tsueng + - Casey Greene + - Chunlei Wu + publisher: Nucleic Acids Research + date: '2023-04-18' + link: https://doi.org/gr5hb5 + orcid: 0000-0002-4655-3773 + plugin: orcid.py + file: orcid.yaml - id: doi:10.1101/2023.01.05.522941 title: Hetnet connectivity search provides rapid insights into how two biomedical entities are related diff --git a/_plugins/array.rb b/_plugins/array.rb index e41006e126..871626bdc2 100644 --- a/_plugins/array.rb +++ b/_plugins/array.rb @@ -2,7 +2,7 @@ module Jekyll module ArrayFilters - # filter out empty entries from array + # filter out empty and trim entries in array def array_filter(array) return array .map{|x| x.is_a?(String) ? x.strip() : x} diff --git a/_styles/citation.scss b/_styles/citation.scss index 258d1df2f9..0bcda4452a 100644 --- a/_styles/citation.scss +++ b/_styles/citation.scss @@ -33,10 +33,12 @@ $wrap: 800px; display: inline-flex; flex-wrap: wrap; gap: 15px; + max-width: 100%; height: min-content; padding: 20px; padding-left: 30px; text-align: left; + overflow-wrap: break-word; z-index: 0; } diff --git a/_styles/float.scss b/_styles/float.scss index fffcae36fa..ba8d9e21eb 100644 --- a/_styles/float.scss +++ b/_styles/float.scss @@ -33,5 +33,6 @@ $wrap: 600px; float: unset !important; clear: both !important; margin: auto !important; + max-width: unset; } } diff --git a/_styles/portrait.scss b/_styles/portrait.scss index 322e516ca4..50849f355b 100644 --- a/_styles/portrait.scss +++ b/_styles/portrait.scss @@ -58,16 +58,17 @@ .portrait-role .icon { position: absolute; - left: 8px; - top: 8px; + left: 0; + top: 0; display: flex; justify-content: center; align-items: center; - width: 2em; - height: 2em; + width: 20%; + aspect-ratio: 1 / 1; border-radius: 999px; background: var(--background); box-shadow: var(--shadow); + transform: translate(14%, 14%); } .portrait[data-style="small"] .portrait-role .icon {