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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file rfhub2-0.4.tar.gz.

File metadata

  • Download URL: rfhub2-0.4.tar.gz
  • Upload date:
  • Size: 546.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.7

File hashes

Hashes for rfhub2-0.4.tar.gz
Algorithm Hash digest
SHA256 bd5ce128baf3c7df006804d7a7dc3e7e129859a954ff23f240cb807f30dc9724
MD5 b67a19ec146ce0badcbae5a943878fd9
BLAKE2b-256 4e330cfc0349368a64adbdd3905e45b87e33eb066f1cce421cc80b3f83b5b2c6

See more details on using hashes here.

File details

Details for the file rfhub2-0.4-py3-none-any.whl.

File metadata

  • Download URL: rfhub2-0.4-py3-none-any.whl
  • Upload date:
  • Size: 567.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.7

File hashes

Hashes for rfhub2-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d47419fd8d7a9e6159fdfe6379021fdfd066d1ed6dbd471fb9604b3271284f30
MD5 ceb04b3d9ea8b83d31eeff8b0941b827
BLAKE2b-256 cc2b2a1cc7b05bae073755ec2e95f1bcbcbc797746050ffc86460ba2191c8f34

See more details on using hashes here.

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