Developer Note
==============

Installation
------------

.. code-block:: shell

    git clone git@github.com:lan496/dsenum.git
    cd dsenum
    pip install -e ".[dev,docs]"
    pre-commit install

Cython
------

:code:`*.c` files are generated by Cython.

.. code-block:: shell

    cython core.pyx

Ref: https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html

Github Actions
--------------

To use :code:`actions/setup-python`, we need to use the full container (costs >18GB...)

.. code-block:: shell

    act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04

Benchmark
---------

.. code-block:: shell

    pytest --benchmark-only --benchmark-columns=mean,stddev tests/

Documentation
-------------

Local build

.. code-block:: shell

    sphinx-autobuild --host 0.0.0.0 docs docs_build

Release
-------

Create and push git tag

.. code-block:: shell

    git tag v0.3.1
    git push origin --tags

Confirm the version number

.. code-block:: shell

    python -m setuptools_scm

Publish in PyPI
---------------

.. code-block:: shell

    pip install twine
    python setup.py sdist bdist_wheel

    # Test PyPI
    python -m twine upload --repository testpypi dist/*
