Merge pull request #95 from Ensembl/bau/notice-update Update NOTICE copyright year
Merge pull request #95 from Ensembl/bau/notice-update
Update NOTICE copyright year
Centralise generic Python code use across all other project within Ensembl, more particularly database access layers and ORMs, reusable eHive components, etc.
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]
pytest
Run test suite from the root of the repository is as simple as to run:
To run tests, calculate and display testing coverage stats:
coverage run -m pytest coverage report -m
mkdocs
mkdocs build
Open automatically generated documentation page at site/index.html.
site/index.html
black --check .
Use --diff to print a diff of what Black would change, without actually changing the files.
--diff
To actually reformat all files in the repository:
black .
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.
pylint
mypy
It should be relatively easy (and definitely useful) to integrate both pylint and mypy in your IDE/Text editor.
用于访问和操作Ensembl基因组数据库的Python接口
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
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
venvTesting with
pytestRun test suite from the root of the repository is as simple as to run:
To run tests, calculate and display testing coverage stats:
Generate documentation via
mkdocsOpen automatically generated documentation page at
site/index.html.Automatic formatting (PEP8 compliance)
Use
--diffto print a diff of what Black would change, without actually changing the files.To actually reformat all files in the repository:
Linting and type checking
pylintwill check the code for syntax, name errors and formatting style.mypywill use type hints to statically type check the code.It should be relatively easy (and definitely useful) to integrate both
pylintandmypyin 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