Skip to content

Commit

Permalink
Merge pull request #1 from PatCapon39/Dev
Browse files Browse the repository at this point in the history
Initial configuration
  • Loading branch information
PatCapon39 authored Apr 11, 2024
2 parents 17b0118 + 56d6426 commit a1594c9
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 24 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ permissions:
id-token: write

jobs:
fetch_references_update_tools:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: execute table conversion script
run: python scripts/table_conversion.py
build:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -46,4 +52,4 @@ jobs:
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v1
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## About

Please see the [How-to Guide for the template](https://australianbiocommons.github.io/how-to-guide-template/) for more information on how to get started.
This is the Australian BioCommons Learning Library - a place for XXXX


## Acknowledgements for the guides
## Acknowledgements

This work is supported by the [Australian BioCommons](https://www.biocommons.org.au/) via funding from [Bioplatforms Australia](https://bioplatforms.com/), the Australian Research Data Commons (https://doi.org/10.47486/PL105) and the Queensland Government RICF programme. Bioplatforms Australia and the Australian Research Data Commons are funded by the National Collaborative Research Infrastructure Strategy (NCRIS).
This work is supported by the [Australian BioCommons](https://www.biocommons.org.au/). BioCommons is enabled by the National Collaborative Research Infrastructure Strategy (NCRIS) via [Bioplatforms Australia](https://bioplatforms.com/) funding.

This repository makes use of the ELIXIR toolkit theme: [![theme badge](https://img.shields.io/badge/ELIXIR%20toolkit%20theme-jekyll-blue?color=0d6efd)](https://github.com/ELIXIR-Belgium/elixir-toolkit-theme)

Expand Down
9 changes: 5 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
title: How-to Guide
title: Learning Library
# This appears in the html browser tab for the site title (seen mostly by search engines, not users)

#topnav_title: Website title
topnav_title: Learning Library
# Optional: this appears on the top navigation bar next to the main_logo.svg icon

description: "A bioinformatics focused How-to Guide"
description: ""
# Metadata description of the website

remote_theme: ELIXIR-Belgium/[email protected]
Expand All @@ -13,7 +13,7 @@ theme_variables:
# biocommons blue
theme_color: 205a86
topnav:
brand_logo: assets/img/Australian-Biocommons-Logo-Tagline-Community-RGB.png
brand_logo: images/main-logo.png

exclude:
- README.md
Expand All @@ -34,3 +34,4 @@ plugins:
- jekyll-sitemap
- jekyll-github-metadata
- webrick
-jekyll-scholar
31 changes: 25 additions & 6 deletions _data/CONTRIBUTORS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,30 @@
# an example contributor is included below
# example roles include "lead", "first-author", "author", "editor", "workflow-tester"

#Johan Gustafsson:
# git: supernord
# email: [email protected]
# orcid: 0000-0002-2977-5032
# role: author
# affiliation: Australian BioCommons / University of Melbourne
Johan Gustafsson:
git: supernord
email: [email protected]
orcid: 0000-0002-2977-5032
role: author
affiliation: Australian BioCommons

Patrick Capon:
git: PatCapon39
email: [email protected]
orcid: 0000-0002-7396-5757
role: author
affiliation: Australian BioCommons

Farah Zaib Khan:
git: FarahZKhan
email: [email protected]
orcid: 0000-0002-6337-3037
role: author
affiliation: Australian BioCommons

Melissa Burke:
git: burkemlou
email: [email protected]
orcid: 0000-0002-5571-8664
role: author
affiliation: Australian BioCommons
10 changes: 2 additions & 8 deletions _data/footer.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# see https://github.com/AustralianBioCommons/human-omics-data-sharing-field-guide/blob/main/_data/footer.yml
copyright: Copyright notice
extra_line: Add other relevant information here!
copyright: 'This site uses Cookies. We use cookies to help the website run effectively. To find out more, read our [Privacy](https://www.biocommons.org.au/privacy) and [Cookies](https://www.biocommons.org.au/cookies) statements.'
#extra_line: Add other relevant information here!
columns:
- type: links
width: 3
children:
- url_text: Home
url: /
- url_text: Contributors
url: /contributors
4 changes: 2 additions & 2 deletions contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ title: Contributors
toc: false
---

This How-to Guide would not be possible without the following contributors.
The Learning Library would not be possible without the following contributors.

{% include contributor-tiles-all.html %}
{% include contributor-tiles-all.html custom="Johan Gustafsson, Patrick Capon, Melissa Burke, Farah Zaib Khan %}
38 changes: 38 additions & 0 deletions scripts/table_conversion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
"""
Adapted from https://github.com/elixir-europe/rdmkit/blob/master/var/conversions.py
"""

import pandas as pd
import yaml
import os

# --------- Variables ---------
google_id = "1fkilWZmnh3P7VLEvM01I7g9shLkGGTHoT2pHsZmaCmc"
gid = "0"
url = f"https://docs.google.com/spreadsheets/d/1uIBItELephFZNjC4UPoegQpo1pIzY15IjOgX8q33slU/edit#gid=0"
output_path = "_data/resource_list.yml"
rootdir = '../pages'
allowed_registries = ['biotools', 'fairsharing', 'tess', 'europmc']

# --------- Converting the table ---------

print(f"----> Converting google table to {output_path} started.")
resource_table = pd.read_csv(url, dtype={'name': str, 'url': str, 'description': str, 'id': str, 'fairsharing': str,
'biotools': str, 'tess': str, 'europmc': pd.Int64Dtype()})
resource_list = resource_table.to_dict("records")
clean_resource_list = []
for resource in resource_list:
registry_dict = {}
for registry in allowed_registries:
if not pd.isna(resource[registry]):
registry_dict[registry] = resource[registry]
del(resource[registry])
clean_resource = {k: resource[k] for k in resource if not pd.isna(resource[k])}
clean_resource_list.append(clean_resource)
clean_resource['registry'] = registry_dict

print(os.getcwd())
with open(output_path, 'w+') as yaml_file:
documents = yaml.dump(clean_resource_list, yaml_file)

print("----> YAML is dumped successfully")

0 comments on commit a1594c9

Please sign in to comment.