Skip to content

Commit

Permalink
implement version marcos
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewprzh authored and asl committed Apr 16, 2024
1 parent 85b6259 commit a3c0f8f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 13 deletions.
15 changes: 15 additions & 0 deletions docs/getversion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

def define_env(env):

@env.macro
def spades_version():
try:
lines = open("VERSION").readlines()
version = lines[0].strip()
# FIXME: dirty hack for current VERSION file
if version.find("dev") != -1:
version = "3.15.5"
return version
except:
return "3.15.5"

2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ SPAdes package contains assembly pipelines for isolated and single-cell bacteria
Additional modes allow to discover bacterial plasmids and RNA viruses, as well as perform HMM-guided assembly.
Besides, SPAdes package includes supplementary tools for efficient k-mer counting and k-mer-based read filtering, assembly graph construction and simplification, sequence-to-graph alignment and metagenomic binning refinement.

SPAdes version 3.15.5 was released under GPLv2 on July 14th, 2022 and can be downloaded [here](https://github.com/ablab/spades/releases/latest/).
SPAdes version {{ spades_version() }} was released under GPLv2 on July 14th, 2022 and can be downloaded [here](https://github.com/ablab/spades/releases/latest/).

The latest SPAdes paper describing various pipelines in a protocol format is available [here](https://currentprotocols.onlinelibrary.wiley.com/doi/abs/10.1002/cpbi.102).
24 changes: 12 additions & 12 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ In case of successful installation the following files will be placed in the `bi

## Downloading SPAdes Linux binaries

To download [SPAdes Linux binaries](https://github.com/ablab/spades/releases/download/v3.15.5/SPAdes-3.15.5-Linux.tar.gz) and extract them, go to the directory in which you wish SPAdes to be installed and run:
To download [SPAdes Linux binaries](https://github.com/ablab/spades/releases/download/v{{ spades_version() }}/SPAdes-{{ spades_version() }}-Linux.tar.gz) and extract them, go to the directory in which you wish SPAdes to be installed and run:

``` bash
wget https://github.com/ablab/spades/releases/download/v3.15.5/SPAdes-3.15.5-Linux.tar.gz
tar -xzf SPAdes-3.15.5-Linux.tar.gz
cd SPAdes-3.15.5-Linux/bin/
wget https://github.com/ablab/spades/releases/download/v{{ spades_version() }}/SPAdes-{{ spades_version() }}-Linux.tar.gz
tar -xzf SPAdes-{{ spades_version() }}-Linux.tar.gz
cd SPAdes-{{ spades_version() }}-Linux/bin/
```

In this case you do not need to run any installation scripts - SPAdes is ready to use. We also suggest adding SPAdes installation directory to the `PATH` variable.
Expand All @@ -40,12 +40,12 @@ Note, that pre-build binaries do not work on new Linux kernels.

## Downloading SPAdes binaries for Mac

To obtain [SPAdes binaries for Mac](https://github.com/ablab/spades/releases/download/v3.15.5/SPAdes-3.15.5-Darwin.tar.gz), go to the directory in which you wish SPAdes to be installed and run:
To obtain [SPAdes binaries for Mac](https://github.com/ablab/spades/releases/download/v{{ spades_version() }}/SPAdes-{{ spades_version() }}-Darwin.tar.gz), go to the directory in which you wish SPAdes to be installed and run:

``` bash
curl https://github.com/ablab/spades/releases/download/v3.15.5/SPAdes-3.15.5-Darwin.tar.gz
tar -zxf SPAdes-3.15.5-Darwin.tar.gz
cd SPAdes-3.15.5-Darwin/bin/
curl https://github.com/ablab/spades/releases/download/v{{ spades_version() }}/SPAdes-{{ spades_version() }}-Darwin.tar.gz
tar -zxf SPAdes-{{ spades_version() }}-Darwin.tar.gz
cd SPAdes-{{ spades_version() }}-Darwin/bin/
```

Just as in Linux, SPAdes is ready to use and no further installation steps are required. We also suggest adding SPAdes installation directory to the `PATH` variable.
Expand All @@ -60,12 +60,12 @@ If you wish to compile SPAdes by yourself you will need the following libraries
- zlib
- libbz2

If you meet these requirements, you can download the [SPAdes source code](https://github.com/ablab/spades/releases/download/v3.15.5/SPAdes-3.15.5.tar.gz):
If you meet these requirements, you can download the [SPAdes source code](https://github.com/ablab/spades/releases/download/v{{ spades_version() }}/SPAdes-{{ spades_version() }}.tar.gz):

``` bash
wget https://github.com/ablab/spades/releases/download/v3.15.5/SPAdes-3.15.5.tar.gz
tar -xzf SPAdes-3.15.5.tar.gz
cd SPAdes-3.15.5
wget https://github.com/ablab/spades/releases/download/v{{ spades_version() }}/SPAdes-{{ spades_version() }}.tar.gz
tar -xzf SPAdes-{{ spades_version() }}.tar.gz
cd SPAdes-{{ spades_version() }}
```

and build it with the following script:
Expand Down
6 changes: 6 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use_directory_urls: false
theme:
name: material
logo: spades.png
favicon: spades.png
palette:
primary: white
features:
Expand All @@ -38,3 +39,8 @@ markdown_extensions:
- pymdownx.superfences
- attr_list
- md_in_html

plugins:
- macros:
module_name: docs/getversion

0 comments on commit a3c0f8f

Please sign in to comment.