Skip to main content

Ensembl Python Base Library

Project description

Ensembl Python Base Library

License Coverage CI Release

Centralise generic Python code use across all other project within Ensembl, more particularly database access layers and ORMs, reusable eHive components, etc.

Getting Started

Installing the development environment with venv

python -m venv <VIRTUAL_ENVIRONMENT_NAME>
source <VIRTUAL_ENVIRONMENT_NAME>/bin/activate
git clone https://github.com/Ensembl/ensembl-py.git
cd ensembl-py
pip install -e .[cicd,dev,docs]

Testing with pytest

Run test suite from the root of the repository is as simple as to run:

pytest

To run tests, calculate and display testing coverage stats:

coverage run -m pytest
coverage report -m

Generate documentation via mkdocs

mkdocs build

Open automatically generated documentation page at site/index.html.

Automatic formatting (PEP8 compliance)

black --check .

Use --diff to print a diff of what Black would change, without actually changing the files.

To actually reformat all files in the repository:

black .

Linting and type checking

pylint src/python/ensembl
pylint --recursive=y src/python/tests
mypy src/python/ensembl
mypy src/python/tests

pylint will check the code for syntax, name errors and formatting style. mypy will use type hints to statically type check the code.

It should be relatively easy (and definitely useful) to integrate both pylint and mypy in your IDE/Text editor.

Useful resources

Python Documentation

Python virtual environments management

Auto-generating documentation

Linting, type checking and formatting

Testing

CI/CD

Development tools

Distributing

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

ensembl_py-2.1.3.tar.gz (184.8 kB view details)

Uploaded Source

Built Distribution

ensembl_py-2.1.3-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file ensembl_py-2.1.3.tar.gz.

File metadata

  • Download URL: ensembl_py-2.1.3.tar.gz
  • Upload date:
  • Size: 184.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for ensembl_py-2.1.3.tar.gz
Algorithm Hash digest
SHA256 cbf6a9279fc3888acc53cd7ee70727da07265d79386e1bce9b0a40e36cba12ad
MD5 2d6a9d700cae6ff99120ae06ef5572bf
BLAKE2b-256 db8cf7b2177bba7cbb3ab6904a175b7e694b343197cdf8e9f3db8839a72c6bc2

See more details on using hashes here.

File details

Details for the file ensembl_py-2.1.3-py3-none-any.whl.

File metadata

  • Download URL: ensembl_py-2.1.3-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for ensembl_py-2.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9a939ca23c566815f0c6336c1c66143d110d814cc2d439d874aaf4bfeda26c94
MD5 49061be49ea9a6ee48f34cae6e0a4b99
BLAKE2b-256 3f6191b9be1afd65c219331b18dba1f342c00700bdd51f9236eb05b326748c90

See more details on using hashes here.

Supported by

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