Skip to content

Commit

Permalink
Merge pull request #148 from r2dt-bio/develop
Browse files Browse the repository at this point in the history
Release 2.0
  • Loading branch information
AntonPetrov authored Sep 28, 2024
2 parents c78e855 + 5b5eec9 commit bf0dce4
Show file tree
Hide file tree
Showing 8,734 changed files with 885,754 additions and 485,607 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 10 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM mcr.microsoft.com/devcontainers/universal:2-linux

RUN wget -qO - 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null && \
echo "deb [arch=all,$(dpkg --print-architecture) signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list && \
sudo apt-get -qq update && \
sudo apt-get install --no-install-recommends -qq -y \
imagemagick \
libmagickwand-dev \
chafa \
just
16 changes: 16 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "R2DT",
"build": {
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-vscode-remote.remote-containers",
"ms-azuretools.vscode-docker"
]
}
}
}
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ docs/_*
.vscode
.git
1.4/
.venv/
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Mark PostScript files as vendored
*.ps linguist-vendored
2 changes: 1 addition & 1 deletion .github/workflows/base-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Build and push Docker image
id: build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
- main
- develop


permissions:
pull-requests: write

jobs:
initial-notification:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -53,7 +57,7 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
Expand All @@ -63,7 +67,7 @@ jobs:
tags: ${{ steps.docker_meta.outputs.tags }}

- name: Find comment for image tags
uses: peter-evans/find-comment@v2
uses: peter-evans/find-comment@v3
if: github.event_name == 'pull_request'
id: fc
with:
Expand All @@ -72,7 +76,7 @@ jobs:
body-includes: Docker image tag(s) pushed

- name: Create or update comment for image tags
uses: peter-evans/create-or-update-comment@v2
uses: peter-evans/create-or-update-comment@v4
if: github.event_name == 'pull_request'
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
Expand Down
101 changes: 101 additions & 0 deletions .github/workflows/parallel-base-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Build and Push Base Docker image (parallel)

on:
pull_request:
paths:
- 'base_image/**'
- '.github/workflows/parallel-base-image.yml'

jobs:
build-stages:
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: true
matrix:
stage: [rscape, tRNAscan-SE, Bio-Easel, traveler, scripts, ribovore-infernal-easel]
platform: [linux/amd64, linux/arm64]
include:
- platform: 'linux/amd64'
runner: 'ubuntu-latest'
shorthand: 'amd64'
- platform: 'linux/arm64'
runner: 'buildjet-2vcpu-ubuntu-2204-arm'
shorthand: 'arm64'
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build ${{ matrix.stage }} stage
uses: docker/build-push-action@v6
with:
platforms: ${{ matrix.platform }}
target: ${{ matrix.stage }}
cache-from: type=registry,ref=rnacentral/r2dt-base:cache-${{ matrix.stage }}-${{ matrix.shorthand }}
cache-to: type=registry,ref=rnacentral/r2dt-base:cache-${{ matrix.stage }}-${{ matrix.shorthand }},mode=max
file: base_image/Dockerfile
context: base_image/

final-build:
needs: build-stages
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker Meta
id: docker_meta
uses: docker/metadata-action@v4
with:
images: rnacentral/r2dt-base
flavor: latest=false
tags: |
type=ref,event=pr
- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push final Docker image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
labels: ${{ steps.docker_meta.outputs.labels }}
tags: ${{ steps.docker_meta.outputs.tags }}
cache-from: |
type=registry,ref=rnacentral/r2dt-base:cache-rscape-amd64
type=registry,ref=rnacentral/r2dt-base:cache-tRNAscan-SE-amd64
type=registry,ref=rnacentral/r2dt-base:cache-Bio-Easel-amd64
type=registry,ref=rnacentral/r2dt-base:cache-traveler-amd64
type=registry,ref=rnacentral/r2dt-base:cache-scripts-amd64
type=registry,ref=rnacentral/r2dt-base:cache-ribovore-infernal-easel-amd64
type=registry,ref=rnacentral/r2dt-base:cache-rscape-arm64
type=registry,ref=rnacentral/r2dt-base:cache-tRNAscan-SE-arm64
type=registry,ref=rnacentral/r2dt-base:cache-Bio-Easel-arm64
type=registry,ref=rnacentral/r2dt-base:cache-traveler-arm64
type=registry,ref=rnacentral/r2dt-base:cache-scripts-arm64
type=registry,ref=rnacentral/r2dt-base:cache-ribovore-infernal-easel-arm64
type=registry,ref=rnacentral/r2dt-base:cache-final
cache-to: type=registry,ref=rnacentral/r2dt-base:cache-final,mode=max
file: base_image/Dockerfile
context: base_image/
target: final-build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ data/crw-bpseq/*.sto
data/crw-bpseq/*.fasta
data/cms/*
data/rfam/RF*/*.seed
data/local_data/*
RF00177.cm
temp.*
output/*
Expand All @@ -19,6 +20,7 @@ tests/**/*.png
docs/_build/*
results/**
1.4/**
2.0/**
.idea/**
.python-version
.venv
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@ repos:
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/MarcoGorelli/auto-walrus
rev: 'v0.2.2'
hooks:
- id: auto-walrus
name: Auto-apply the walrus operator :=
exclude: .+?\.(cm|ps|bpseq|tr|fasta|xml|svg)$
13 changes: 0 additions & 13 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
# only in one or another interpreter, leading to false positives when analysed.
analyse-fallback-blocks=no

# Clear in-memory caches upon conclusion of linting. Useful if running pylint
# in a server-like mode.
clear-cache-post-run=no

# Load and enable all available extensions. Use --list-extensions to see a list
# all available extensions.
#enable-all-extensions=
Expand Down Expand Up @@ -93,12 +89,6 @@ py-version=3.11
# Discover python modules and packages in the file system subtree.
recursive=yes

# Add paths to the list of the source roots. Supports globbing patterns. The
# source root is an absolute path or a path relative to the current working
# directory used to determine a package namespace for modules located under the
# source root.
source-roots=.

# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes
Expand Down Expand Up @@ -363,9 +353,6 @@ single-line-if-stmt=no
# one.
allow-any-import-level=

# Allow explicit reexports by alias from a package __init__.
allow-reexport-from-package=no

# Allow wildcard imports from modules that define __all__.
allow-wildcard-with-all=no

Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM rnacentral/r2dt-base:pr-123
ARG BASE_IMAGE_VERSION=v2.0

FROM rnacentral/r2dt-base:${BASE_IMAGE_VERSION}

# Create venv
ENV VENV=$RNA/venv
Expand Down
6 changes: 4 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# R2DT

**Version 1.4 (2023)**
**Version 2.0 (2024)**

**[See the R2DT documentation](https://r2dt.readthedocs.io/)**

The [R2DT software](https://github.com/RNAcentral/R2DT) automatically generates [RNA secondary structure](https://en.wikipedia.org/wiki/Nucleic_acid_secondary_structure) diagrams in consistent, reproducible and recongnisable layouts using a library of templates representing a wide range of RNAs.
The [R2DT software](https://github.com/r2dt-bio/R2DT) automatically generates [RNA secondary structure](https://en.wikipedia.org/wiki/Nucleic_acid_secondary_structure) diagrams in consistent, reproducible and recongnisable layouts using a library of templates representing a wide range of RNAs.

## Examples

Expand All @@ -20,6 +20,8 @@ R2DT can be used in a number of ways:
* [API](https://www.ebi.ac.uk/Tools/common/tools/help/index.html?tool=r2dt) powered by EMBL-EBI Web Services
* As a command line tool with [Docker](https://www.docker.com), [Singularity](https://sylabs.io/docs/#singularity), or in a bare metal installation

You can also [![open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/RNAcentral/R2DT)

## Citation

If you use R2DT in your work, please consider citing the following paper:
Expand Down
Loading

0 comments on commit bf0dce4

Please sign in to comment.