Development =========== Prerequisites ------------- It's recommended to use `pipenv `_ to manage the python enviroment during development. It may be installed using your operating system's package manager, or using ``pip install --upgrade pipenv`` or similar. If you choose not to use pipenv, at the very least you'll need the ``pyserial`` package installed, and ``sphinx`` to build the documentation. Obtaining the Source Code and Environment Configuration ------------------------------------------------------- Clone from git: .. code-block:: sh git clone https://gitlab.com/ptapping/thorlabs-mc2000b.git Configure development environment: .. code-block:: sh cd thorlabs-mc2000b pipenv install --dev Remember that to use the pipenv managed environment, preface commands with ``pipenv run ``, or drop into a full shell with ``pipenv shell`` and run commands as normal. Installing ---------- Install with pip as normal: .. code-block:: sh pip install . An "editable" install is also possible by adding the ``-e`` flag, which instead links the original source files, so that edits are reflected immediately in the install, without requiring a fresh ``pip install .`` step. Building the Documentation -------------------------- Build the documentation and autogenerated API documents with: .. code-block:: sh pipenv run make doc The output files will then be found under ``doc/build/html``. Open ``index.html`` in your web browser.