Webserver for robot framework and python assets documentation
Project description
rfhub2
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file rfhub2-0.3.tar.gz
.
File metadata
- Download URL: rfhub2-0.3.tar.gz
- Upload date:
- Size: 545.8 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d68ed6792900dda526bea572e9f47a986867c186c7aeb195de952b366ff49cc |
|
MD5 | a486be707e7cea7e1af346b65ad5d19f |
|
BLAKE2b-256 | cc6d78d6222fe64e6174b4cbc58b145eca3579832daddab5f36a63db970520bb |
File details
Details for the file rfhub2-0.3-py3-none-any.whl
.
File metadata
- Download URL: rfhub2-0.3-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 313b85fbf9e51c3022e9d236ada7e075da397003db2659a56d428945220b20af |
|
MD5 | 91c37c8b295091939761aeeeeb873d18 |
|
BLAKE2b-256 | ca79ca80bf21d4f031b0bb67e05e458bc0957a1c2c7d56bf1e0aa6ea9cad5273 |