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-3.0.0.tar.gz (185.0 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ensembl_py-3.0.0.tar.gz
  • Upload date:
  • Size: 185.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ensembl_py-3.0.0.tar.gz
Algorithm Hash digest
SHA256 9820a3c27d995eeceb782e67346f9a09d9d8300a8b34a10808d839a04d0f0ae5
MD5 9bfa5b61a244809afe0d162eb9161e98
BLAKE2b-256 36b36f5196115312af3e7e640a4fe9c570bfa9f9208e812c50a5f41bcd57b31f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ensembl_py-3.0.0.tar.gz:

Publisher: publish.yml on Ensembl/ensembl-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

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

File hashes

Hashes for ensembl_py-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ec22438c6411a4496966496739397e7e8c4ec51e4f3c94baf95d1bf270aabd4
MD5 2ea7e64cc09beafe1c05872c7ea5da22
BLAKE2b-256 dfc62847d55d7be40e5ed633984ba59828dec8a79135f3e6196cde4060d2a522

See more details on using hashes here.

Provenance

The following attestation bundles were made for ensembl_py-3.0.0-py3-none-any.whl:

Publisher: publish.yml on Ensembl/ensembl-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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