Ensembl Python Base Library
Project description
Ensembl Python Base Library
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ensembl_py-3.0.1.tar.gz.
File metadata
- Download URL: ensembl_py-3.0.1.tar.gz
- Upload date:
- Size: 184.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1eba2cf78be296346c9de7383c741d14dd3cfe235937a2aba0fdc1f6cae8ea6b
|
|
| MD5 |
8b54dca8d06a442ef8818fac8dfffd28
|
|
| BLAKE2b-256 |
cdf29752c882563262a85488143caf40b72a4eeed52ac27b15a600f7b53396ec
|
Provenance
The following attestation bundles were made for ensembl_py-3.0.1.tar.gz:
Publisher:
publish.yml on Ensembl/ensembl-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ensembl_py-3.0.1.tar.gz -
Subject digest:
1eba2cf78be296346c9de7383c741d14dd3cfe235937a2aba0fdc1f6cae8ea6b - Sigstore transparency entry: 760388363
- Sigstore integration time:
-
Permalink:
Ensembl/ensembl-py@fcd4ba1c93140f087f417f4b17fec59a53e0040b -
Branch / Tag:
- Owner: https://github.com/Ensembl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fcd4ba1c93140f087f417f4b17fec59a53e0040b -
Trigger Event:
release
-
Statement type:
File details
Details for the file ensembl_py-3.0.1-py3-none-any.whl.
File metadata
- Download URL: ensembl_py-3.0.1-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.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1cf9d3aa818e8cc28ceec2d84336182c81e7a1dd7a72e270ce8efdd0be38bcb
|
|
| MD5 |
df90c667009f5d6b69e557abd74763e7
|
|
| BLAKE2b-256 |
0ed5ed660321983f867f835d65dd0f9b8b8c60e29ce2036bc16fb6823841390e
|
Provenance
The following attestation bundles were made for ensembl_py-3.0.1-py3-none-any.whl:
Publisher:
publish.yml on Ensembl/ensembl-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ensembl_py-3.0.1-py3-none-any.whl -
Subject digest:
c1cf9d3aa818e8cc28ceec2d84336182c81e7a1dd7a72e270ce8efdd0be38bcb - Sigstore transparency entry: 760388364
- Sigstore integration time:
-
Permalink:
Ensembl/ensembl-py@fcd4ba1c93140f087f417f4b17fec59a53e0040b -
Branch / Tag:
- Owner: https://github.com/Ensembl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fcd4ba1c93140f087f417f4b17fec59a53e0040b -
Trigger Event:
release
-
Statement type: