Skip to content

Commit

Permalink
Several bug fixes realted to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gbayarri committed May 2, 2024
1 parent a6ed7d8 commit 5a5dbdc
Show file tree
Hide file tree
Showing 53 changed files with 775 additions and 174 deletions.
128 changes: 128 additions & 0 deletions .github/workflows/linting_and_testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
name: tests

on:
# workflow_dispatch
push:
branches: [ main ]
paths-ignore:
- '.gitignore'
- '.readthedocs.yaml'
- 'LICENSE'
- 'setup.py'
- 'README.md'
- 'CITATION.cff'
- 'references.jsonld'
- '**/docs/**'
- '**/json_schemas/**'

jobs:
# Name of the Job
lint_and_test:
strategy:
matrix:
os: [self-hosted]
python-version: ["3.8", "3.9", "3.10"]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository code
uses: actions/checkout@v4

- run: echo "Repository -> ${{ github.repository }}"
- run: echo "Branch -> ${{ github.ref }}"
- run: echo "Trigger event -> ${{ github.event_name }}"
- run: echo "Runner OS -> ${{ runner.os }}"

- name: List files in the repository
run: |
ls ${{ github.workspace }}
- name: Remove all micromamba installations
run: |
rm -rf /home/user/.bash_profile /home/user/.conda /home/user/micromamba /home/user/micromamba-bin 2>/dev/null
touch /home/user/.bash_profile
- name: provision-with-micromamba
uses: mamba-org/setup-micromamba@v1
with:
generate-run-shell: true
post-cleanup: all
environment-file: .github/env.yaml
create-args: >-
python=${{ matrix.python-version }}
pytest
pytest-cov
pytest-html
flake8
pip
- name: Install genbadge from pip
shell: micromamba-shell {0} # necessary for conda env to be active
run: pip install genbadge[all]

- name: List installed package versions
shell: micromamba-shell {0} # necessary for conda env to be active
run: micromamba list

- name: Lint with flake8
shell: micromamba-shell {0} # necessary for conda env to be active
run: |
# F Codes: https://flake8.pycqa.org/en/latest/user/error-codes.html
# E Code: https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
# Workflow fails: Stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# Create directory for flake8 reports
mkdir -p ./reports/flake8
# Exit-zero treats all errors as warnings, workflow will not fail:
flake8 . --exclude=docs --ignore=C901,E226,W605 --count --exit-zero --max-complexity=10 --max-line-length=9999 --statistics --format=html --htmldir=./reports/flake8/ --tee --output-file=./reports/flake8/flake8stats.txt
- name: Generate Flake8 badge
shell: micromamba-shell {0} # necessary for conda env to be active
run: |
genbadge flake8 --name "Flake8" --input-file ./reports/flake8/flake8stats.txt --output-file ./reports/flake8/flake8badge.svg
- name: Checkout biobb_common
uses: actions/checkout@v4
with:
repository: bioexcel/biobb_common
path: './biobb_common'

- name: Run tests
shell: micromamba-shell {0} # necessary for conda env to be active
run: |
# Ignoring docker and singularity tests
export PYTHONPATH=.:./biobb_common:$PYTHONPATH
# Create directory for tests reports
mkdir -p ./reports/junit
# Producction one
pytest biobb_haddock/test/unitests/ --cov=biobb_haddock/ --cov-report=xml --ignore-glob=*container.py --ignore-glob=*docker.py --ignore-glob=*singularity.py --junit-xml=./reports/junit/junit.xml --html=./reports/junit/report.html
- name: Generate Tests badge
shell: micromamba-shell {0} # necessary for conda env to be active
run: |
genbadge tests --name "Tests" --input-file ./reports/junit/junit.xml --output-file ./reports/junit/testsbadge.svg
- name: Generate Coverage badge
shell: micromamba-shell {0} # necessary for conda env to be active
run: |
# Create directory for flake8 reports
mkdir -p ./reports/coverage
coverage xml -o ./reports/coverage/coverage.xml
coverage html -d ./reports/coverage/
genbadge coverage --name "Coverage" --input-file ./reports/coverage/coverage.xml --output-file ./reports/coverage/coveragebadge.svg
- name: Publish coverage report to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./reports

# - name: Restore .bash_profile
# run: cp ~/.bash_profile_orig ~/.bash_profile


84 changes: 84 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# YAML 1.2
---
abstract: "BioExcel Building Blocks (BioBB) library. BioBB’s are built as Python wrappers to provide an interoperable architecture. BioBB’s have been integrated in a chain of usual software management tools to generate data ontologies, documentation, installation packages, software containers and ways of integration with workflow managers, that make them usable in most computational environments."
authors:
-
affiliation: "Barcelona Supercomputing Center (BSC)"
family-names: "Andrio"
given-names: "Pau"
orcid: "https://orcid.org/0000-0003-2116-3880"
-
affiliation: "Institute for Research in Biomedicine (IRB Barcelona)"
family-names: "Hospital"
given-names: "Adam"
orcid: "https://orcid.org/0000-0002-8291-8071"
-
affiliation: "Barcelona Supercomputing Center (BSC)"
family-names: "Conejero"
given-names: "Javier"
orcid: "https://orcid.org/0000-0001-6401-6229"
-
affiliation: "Barcelona Supercomputing Center (BSC)"
family-names: "Jordà"
given-names: "Luis"
orcid: "https://orcid.org/0000-0002-9407-9703"
-
affiliation: "Barcelona Supercomputing Center (BSC)"
family-names: "Del Pino"
given-names: "Marc"
orcid: "https://orcid.org/0000-0001-5565-7577"
-
affiliation: "Barcelona Supercomputing Center (BSC)"
family-names: "Laia"
given-names: "Codó"
orcid: "https://orcid.org/0000-0002-6797-8746"
-
affiliation: "School of computer Science, the University of Manchester"
family-names: Werkhoven
given-names: Ben
name-particle: van
orcid: "https://orcid.org/0000-0002-7508-3272"
-
affiliation: "University of Manchester (UOM)"
family-names: "Soiland-Reyes"
given-names: "Stian"
orcid: "https://orcid.org/0000-0001-9842-9718"
-
affiliation: "University of Manchester (UOM)"
family-names: "Goble"
given-names: "Carole"
orcid: "https://orcid.org/0000-0003-1219-2137"
-
affiliation: "Barcelona Supercomputing Center (BSC)"
family-names: "Lezzi"
given-names: "Daniele"
orcid: "https://orcid.org/0000-0001-5081-7244"
-
affiliation: "Barcelona Supercomputing Center (BSC)"
family-names: "Rosa M"
given-names: "Badia"
orcid: "https://orcid.org/0000-0003-2941-5499"
-
affiliation: "Institute for Research in Biomedicine (IRB Barcelona), University of Barcelona (UB)"
family-names: "Orozco"
given-names: "Modesto"
orcid: "https://orcid.org/0000-0002-8608-3278"
-
affiliation: "Barcelona Supercomputing Center (BSC), University of Barcelona (UB)"
family-names: "Gelpí"
given-names: "Josep Ll."
orcid: "https://orcid.org/0000-0002-0566-7723"
email: "[email protected]"

cff-version: "1.2.0"
date-released: "2019-09-10"
keywords:
- "BioExcel"
- "BioBB"
- "Bioinformatics"
- "Computational Biology"
- "Biomolecular Workflows"
license: "Apache-2.0"
message: "If you use this software, please cite it using these metadata."
repository-code: "https://github.com/bioexcel/biobb"
title: "BioExcel Building Blocks, a software library for interoperable biomolecular simulation workflows"
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
[![](https://img.shields.io/github/last-commit/bioexcel/biobb_haddock?label=Last%20Commit)](https://github.com/bioexcel/biobb_haddock/commits/master)
[![](https://img.shields.io/github/issues/bioexcel/biobb_haddock.svg?color=brightgreen&label=Issues)](https://GitHub.com/bioexcel/biobb_haddock/issues/)

[![fair-software.eu](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F-green)](https://fair-software.eu)
[![](https://www.bestpractices.dev/projects/8847/badge)](https://www.bestpractices.dev/projects/8847)

[](https://bestpractices.coreinfrastructure.org/projects/8847/badge)

[//]: # (The previous line invisible link is for compatibility with the howfairis script https://github.com/fair-software/howfairis-github-action/tree/main wich uses the old bestpractices URL)

# biobb_haddock

### Introduction
Expand Down Expand Up @@ -79,7 +86,7 @@ Using SINGULARITY:
* Installation:


singularity pull --name biobb_haddock.sif shub://bioexcel/biobb_haddock
singularity pull --name biobb_haddock.sif https://depot.galaxyproject.org/singularity/biobb_haddock:4.1.0--pyhdfd78af_0


* Usage:
Expand Down
2 changes: 1 addition & 1 deletion biobb_haddock/docs/source/_static/theme_overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ a:visited { color:#9e8830; }

.highlight { background: #fffae4; }

.rst-content dl:not(.docutils) dt { background: #d5f0f1; color: #29b3b5; border-top: solid 3px #29b3b5; }
.rst-content dl:not(.docutils) dt { background: #d5f0f1!important; color: #29b3b5!important; border-top: solid 3px #29b3b5!important; }
.rst-content .viewcode-link, .rst-content .viewcode-back { color: #dcbc3c; }
.rst-versions .rst-current-version { color: #29b3b5; }

Expand Down
6 changes: 3 additions & 3 deletions biobb_haddock/docs/source/_static/theme_overrides.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
$(document).ready(function() {
var path = '';

if($('.icon.icon-home').attr('href') == '../index.html') path = '../';
else if($('.icon.icon-home').attr('href') == '../../index.html') path = '../../';
if($('.wy-side-nav-search .icon.icon-home').attr('href') == '../index.html') path = '../';
else if($('.wy-side-nav-search .icon.icon-home').attr('href') == '../../index.html') path = '../../';

$('.icon.icon-home').html('<img src="' + path + '_static/logo.png" class="logo" alt="Logo">');
$('.wy-side-nav-search .icon.icon-home').html('<img src="' + path + '_static/logo.png" class="logo" alt="Logo">');
});
Loading

0 comments on commit 5a5dbdc

Please sign in to comment.