Skip to content

Latest commit

 

History

History
149 lines (87 loc) · 3.65 KB

installation.rst

File metadata and controls

149 lines (87 loc) · 3.65 KB

Installation

What How To Install
The Core Library

IDOM is on PyPI - use pip to install a stable version:

pip install idom[stable]
Javascript Packages

Installing Javascript packages with IDOM requires npm.

idom install some-js-package

For more info see the :ref:`Custom Javascript` section.

Extra Features

To install specific features see :ref:`Extra Features`, but to install all of them:

# all extra features
pip install idom[all]
Pre Release

This may be unstable or subject to breaking changes

pip install idom --pre

Development Version

In order to work with IDOM's source code you'll need to install:

You'll begin by copying the source from GitHub onto your computer using Git:

git clone https://github.com/rmorshea/idom.git
cd idom

At this point you should be able to run the command below to:

  • Install an editable version of the Python code
  • Download, build, and install Javascript dependencies
  • Install some pre-commit hooks for Git
pip install -e . -r requirements.txt && pre-commit install

Since we're using native ES modules for our Javascript, you should usually be able to refresh your browser page to see your latest changes to the client. However if you modify any dependencies you can run standard npm commands to install them or simply run the following to re-evaluate the package.json:

pip install -e .

Running The Tests

The test suite for IDOM is executed using Tox and covers:

  1. Server-side Python code using PyTest
  2. The end-to-end application using Selenium
  3. (Coming soon) Client side Javascript code

To run the full suite of tests you'll need to install:

Warning

Be sure the version of Google Chrome and ChromeDriver you install are compatible.

Once you've installed the aforementined browser and web driver you should be able to run:

tox --factor py38

Note

You can substitute py38 for your prefered Python version, however only a subset of the tests are configured to run on versions besides 3.8

If you prefer to run the tests using a headless browser:

tox --factor py38 -- --headless

Building The Documentation

Building the documentation as it's deployed in production requires Docker. Once you've installed docker you'll need to build and then run a container with the service:

docker build . --file docs/Dockerfile --tag idom-docs:latest
docker run -p 5000:5000 -e DEBUG=true -it idom-docs:latest

You should then navigate to http://127.0.0.1:5000 to see the documentation.