Skip to content

Commit

Permalink
Merge pull request EGA-archive#102 from EGA-archive/EE-1760-enforce-p…
Browse files Browse the repository at this point in the history
…ython36-version

EE-1760: increased the minimum required Python version to 3.6
  • Loading branch information
jorizci authored Jan 15, 2021
2 parents 911975f + 51da7be commit d9a3146
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 9 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The pyEGA3 download client is a python-based tool for viewing and downloading fi

## Requirements

* Python3 ([download instructions](https://www.python.org/downloads/))
* Python 3.6 or newer. ([download instructions](https://www.python.org/downloads/))

### Firewall ports

Expand Down Expand Up @@ -107,6 +107,21 @@ If the ports are open, both of the sites should load with no timeouts.
pyega3/pyega3.py --help
```

### Using Docker

There are Docker images built by Bioconda: https://bioconda.github.io/recipes/pyega3/README.html
An example of running pyEGA3 in a Docker container:

```bash
docker run --rm -v /tmp:/app -w /app quay.io/biocontainers/pyega3:3.4.0--py_0 pyega3 -d -t fetch EGAF00001775036
```

This example command mounts your /tmp folder into the Docker container as /app,
starts the 3.4.0 version of pyEGA3 and downloads a test file.
The test file will be downloaded into your /tmp folder.
You can find other, possibly newer, versions ("tags") of the pyEGA3 Docker image
on the above-mentioned Bioconda page.

## Usage - File download

```bash
Expand Down
2 changes: 1 addition & 1 deletion pyega3/pyega3.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import requests
from tqdm import tqdm

version = "3.4.0"
version = "3.4.1"
session_id = random.getrandbits(32)
logging_level = logging.INFO

Expand Down
35 changes: 28 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
import sys

from setuptools import setup, find_packages

CURRENT_PYTHON_VERSION = sys.version_info[:2]

# When changing the value of the REQUIRED_PYTHON_VERSION variable,
# make sure to also change the "python_requires" variable
# and the "classifiers" section in this file (setup.py).
REQUIRED_PYTHON_VERSION = (3, 6)

if CURRENT_PYTHON_VERSION < REQUIRED_PYTHON_VERSION:
sys.stderr.write("""
==========================
Unsupported Python version
==========================
This version of pyEGA3 requires Python {}.{}, but you're trying to
install it on Python {}.{}. Please try to upgrade to a newer Python
version or maybe use pyEGA3 in a Docker container (see the README for that).
""".format(*(REQUIRED_PYTHON_VERSION + CURRENT_PYTHON_VERSION)))
sys.exit(1)

with open("README.md", encoding='utf-8') as f:
long_description = f.read()

Expand All @@ -9,9 +29,10 @@
long_description=long_description,
long_description_content_type="text/plain",
packages=find_packages(),
version = "3.4.0",
version="3.4.1",
author="EGA team",
author_email="[email protected]",
python_requires=">=3.6",
install_requires=["requests", "tqdm", "htsget", "psutil"],
keywords=["EGA", "archive"],
license="Apache License, Version 2.0",
Expand All @@ -21,11 +42,11 @@
"Development Status :: 3 - Alpha",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.5"
],
"Programming Language :: Python :: 3.6"
],
entry_points={
"console_scripts": [
"pyega3 = pyega3.pyega3:main",
]
}
"console_scripts": [
"pyega3 = pyega3.pyega3:main",
]
}
)

0 comments on commit d9a3146

Please sign in to comment.