Skip to main content

Get version of any tools

Project description

https://badge.fury.io/py/versionix.svg https://github.com/sequana/versionix/actions/workflows/main.yml/badge.svg https://coveralls.io/repos/github/sequana/versionix/badge.svg?branch=main https://zenodo.org/badge/658721856.svg
Python version:

Python 3.8, 3.9, 3.10, 3.11, 3.12

Source:

See http://github.com/sequana/versionix.

Issues:

Please fill a report on github

Overview

Versionix is a lightweight tool designed to display the version of standalone software directly on the screen, handling various versioning formats.

Installation

If you are in a hurry, just type:

pip install versionix  --upgrade

This is pure Python so no need for fancy libraries.

Usage

Then, just type versionix followed by an executable installed on your system, e.g for linux users:

versionix ls

where ls is a standard command. In bioinformatics, fastqc is quite common. You can check its version as follows:

versionix fastqc

versionix prints the version as X.Y.Z string.

Most tools would work. However, a registry is available for complex cases. Registered tools can be obtained with the following command. If your favorite tool is not there, create a PR or an issue:

versionix --registered

Type:

versionix --help

to get more help like this example:

doc/versionix_usage.png

For developers only

Contributions are welcome. Please submit pull requests. If you do so, please also add or update tests if needed.

We use pytest, that can be used as follow in the root of the project:

pytest -v –cov versionix

DESCRIPTION

The first difficulty is that standalone applications have different ways to obtain their version information. Some require the use of a long or short argument (–version or -v), while others do not require any argument at all. In addition, display channels (stdout or stderr) and formats of the version output differs between applications. To handle these various cases, we define a regular expression that should work for maybe 80% of applications (difficult to estimate). For non standard case, a dictionnary of metadata related to the different standalones is available. These metadata helps in the identification of the command to run, the options to use, if the information is directed to stdout or stderr and the method to parse the output to obtain the version number.

Versionix is designed to be used with all Sequana pipelines and is not intended to be universal. You can add your own standalone version in the versionix/register.py file and provide a Pull Request.

Changelog

Version

Description

0.99.2

Handle cases where e.g. –version is returned to the stderr (instead of stdout)

0.99.1

Remove warning if we are using registered entry.

0.99.0

Final version before 1.0.0

0.3.0

Refactor to use regular expression and registry only if needed. This make versionix quite generic.

0.2.4

More tools in the registry and added precommit

0.2.3

More tools in the registry

0.2.2

add all tools required by sequana pipelines (oct 2023)

0.2.1

More tools added.

0.2

simplification. Add tests. Add more tools

0.1

first draft

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

versionix-0.99.3.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

versionix-0.99.3-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file versionix-0.99.3.tar.gz.

File metadata

  • Download URL: versionix-0.99.3.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.10.14 Linux/6.14.5-100.fc40.x86_64

File hashes

Hashes for versionix-0.99.3.tar.gz
Algorithm Hash digest
SHA256 ab2257ce1c1eecebba695ec3f4aac40d0ca4dcfdfede1f1dad920486588a1dfa
MD5 196d650df70923e0946f04db979544be
BLAKE2b-256 f2e9609847d7fdc7d4046025a155c8e75ba8e373dadd5ae5dd93f881eeeafa2b

See more details on using hashes here.

File details

Details for the file versionix-0.99.3-py3-none-any.whl.

File metadata

  • Download URL: versionix-0.99.3-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.10.14 Linux/6.14.5-100.fc40.x86_64

File hashes

Hashes for versionix-0.99.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6d49c4a3b88dbe04e3639f95b4a02b4f237a6c8eb1acdb29e444981d8082ded2
MD5 4f6c63870bd559a21057813eb204f780
BLAKE2b-256 789f3c0315a838494fbb9d68ad3af9c79b707b482e228485cba1bc578bda1539

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page