kbase / execution_engine2

KBase Execution Engine
http://www.kbase.us/services/ee2
MIT License
0 stars 7 forks source link

execution_engine2

Codacy Badge codecov Quality Gate Status

This is a KBase module generated by the KBase Software Development Kit (SDK).

You will need to have the SDK installed to use this module. Learn more about the SDK and how to use it.

You can also learn more about the apps implemented in this module from its catalog page or its spec file.

Contributing

Setup and test locally

See the .travis file for information on how to test locally

Setup and test with docker-compose on MacOS/Linux

Build and exec into the dev container

Make sure you have the latest versions of

git clone https://github.com/kbase/execution_engine2.git
cd execution_engine2
docker build . -t execution_engine2:test
docker-compose up -d
docker-compose exec ee2_with_ssh bash
# (This directory is linked to your pwd via the docker-compose file)
cd /ee2
make test-coverage

Once the docker image is built, it does not need to be rebuilt after code changes to rerun tests. Just ensure the services are up, exec into the container, and run the tests.

To run a specific test directory or specific file

PYTHONPATH=.:lib:test pytest --cov-report=xml --cov lib/execution_engine2/ --verbose test/tests_for_db/
PYTHONPATH=.:lib:test pytest --cov-report=xml --cov lib/execution_engine2/ --verbose test/tests_for_db/ee2_model_test.py

To run a specific test file via PyCharm

See Testing with Pycharm

To run pre-commit hooks

exec into the docker container as before and switch to the /ee2 directory.

pip install pre-commit
pre-commit install
pre-commit run --all-files

To remove the pre commit hooks:

pre-commit uninstall

Installing HTCondor Bindings from the mac

Test Running Options

PyCharm

Develop

KBase Catalog interactions

Client Groups

EE2 understands client group specifications in JSON and CSV formats. Both formats have special fields in common:

The client group is handled differently for JSON and CSV:

Any fields other than the above are sent on to the scheduler as key value pairs.

For example, to set the client group to bigmem, request 32 CPUs, 64GB of memory, and 1TB of disk, the following would be entered in the catalog UI:

Note that the representation of this data in the catalog API is idiosyncratic - both the JSON and CSV data are split by commas into parts. EE2 will detect JSON entries and reconsitute them before deserialization.

CronJobs/Reaper Scripts

PurgeBadJobs

PurgeHeldJobs

Horizontal Scaling

Help

Contact @Tianhao-Gu, @bio_boris, @briehl