Skip to main content

Webserver for robot framework and python assets documentation

Project description

rfhub2

Build Status codecov image image image Docker Cloud Automated build Docker Cloud Build Status

Development

Install dependencies

pip install -r requirements.txt -r requirements-dev.txt

To run app with Postgres db install additional dependencies:

pip install -r requirements-postgres.txt
Frontend

Requirements:

  • Node.js
  • Yarn
cd frontend && yarn install

Build docker image

To build image using SQLite DB:

docker build -f docker/Dockerfile -t rfhub2 .

To build image using PostgreSQL DB:

docker build -f docker/Dockerfile-postgres -t rfhub2:postgres .

Run application (web server)

To run with default (SQLite) database:

python -m rfhub2

To run with Postgres database:

RFHUB_DB_URI=postgresql://postgres:postgres@localhost:5432/postgres python -m rfhub2

To run application using docker image with default (SQLite) database:

docker run -it -p 8000:8000 rfhub2

To run application using docker image with Postgres database:

docker run -it -p 8000:8000 --network=host -e RFHUB_DB_URI="postgresql://postgres:postgres@localhost:5432/postgres" rfhub2:postgres
Frontend

To run frontend development server

cd frontend && yarn start

To create frontend build

yarn build

To create frontend build and add its files to rfhub2 package static files directory

./build_ui.sh

Populate application with data

To populate application running on localhost:

python -m rfhub2.cli ../your_repo ../your_other_repo

To populate app running on another host, with non-default credentials:

python -m rfhub2.cli -a http://your_host:8000 -u user -p password ../your_repo ../your_other_repo

To populate app but to skip loading RFWK installed libraries:

python -m rfhub2.cli --no-installed-keywords ../your_repo ../your_other_repo

To preserve previously loaded collections and add new ones:

python -m rfhub2.cli --no-db-flush ../your_repo ../your_other_repo

Run unit tests

python -m unittest tests

Formatting

Black is used for code formatting. It is included in CI pipeline. To reformat code after edit, execute:

black -t py36 rfhub2 tests

You can consider adding a git hook or integrating it with your IDE for automated execution.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rfhub2-0.4.tar.gz (546.0 kB view hashes)

Uploaded Source

Built Distribution

rfhub2-0.4-py3-none-any.whl (567.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page