Skip to content

Latest commit

 

History

History
132 lines (88 loc) · 3.24 KB

DEVELOPER_GUIDE.md

File metadata and controls

132 lines (88 loc) · 3.24 KB

For Contributers

Prerequisites

  • Python>=3.7

Installation

git clone https://github.com/marcskovmadsen/paithon
cd paithon

Create your virtual environment.

python -m venv .venv

Activate your virtual environment. On Windows with Git Bash it can be done via

source .venv/Scripts/activate

Install the paithon package for editing

pip install -e .[all]

Install the Panel Jupyter Preview

jupyter serverextension enable panel.io.jupyter_server_extension

Tests

invoke test.all

will run isort, autoflake, black, pylint, mypy and pytest. It should look like

$ invoke test.all

Running isort the Python code import sorter
===========================================

isort .
Skipped 7 files

Running autoflake to remove unused imports on all .py files recursively
=======================================================================

autoflake --imports=pytest,pandas,numpy,plotly,dash,urllib3 --in-place --recur
sive .

Running Black the Python code formatter
=======================================

black .
All done! \u2728 \U0001f370 \u2728
16 files left unchanged.

Running pylint.
Pylint looks for programming errors, helps enforcing a coding standard,
sniffs for code smells and offers simple refactoring suggestions.
=======================================================================

pylint setup.py tasks paithon tests

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)


Running mypy for identifying python type errors
===============================================

mypy setup.py tasks paithon tests
Success: no issues found in 16 source files

Running pytest the test framework
=================================

pytest tests --doctest-modules --cov=paithon -m "not functionaltest a
nd not integrationtest" --cov-report html:test_results/cov_html
============================= test session starts =============================
platform win32 -- Python 3.8.4, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
rootdir: C:\repos\private\paithon, configfile: pytest.ini, testpaths: tests
plugins: anyio-2.2.0, cov-2.11.1
collected 6 items

tests\test_config.py .                                                   [ 16%]
tests\test_highchart.py ...                                              [ 66%]
tests\models\test_highchart.py ..                                        [100%]

----------- coverage: platform win32, python 3.8.4-final-0 -----------
Coverage HTML written to dir test_results/cov_html


============================== 6 passed in 2.07s ==============================

All Tests Passed Successfully
=============================

Package build

In the VERSION file update the version number and then run

python setup.py sdist bdist_wheel

Package Deploy

to production

python -m twine upload dist/*VERSION*

or to test

python -m twine upload --repository testpypi dist/*VERSION*

Have binder build the new image: binder