{"id":21881092,"url":"https://github.com/wtsi-hgi/test-with-irods","last_synced_at":"2026-04-13T12:31:48.430Z","repository":{"id":146402660,"uuid":"65539400","full_name":"wtsi-hgi/test-with-irods","owner":"wtsi-hgi","description":"Deprecated: Use https://github.com/wtsi-hgi/useintest/ instead","archived":false,"fork":false,"pushed_at":"2017-01-11T15:50:25.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T00:44:38.030Z","etag":null,"topics":["deprecated","irods","python","testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wtsi-hgi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-12T09:02:00.000Z","updated_at":"2017-02-21T15:28:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"451e8e07-ac07-4f0f-82e7-3574bbc7b7ea","html_url":"https://github.com/wtsi-hgi/test-with-irods","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wtsi-hgi/test-with-irods","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtsi-hgi%2Ftest-with-irods","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtsi-hgi%2Ftest-with-irods/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtsi-hgi%2Ftest-with-irods/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtsi-hgi%2Ftest-with-irods/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wtsi-hgi","download_url":"https://codeload.github.com/wtsi-hgi/test-with-irods/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtsi-hgi%2Ftest-with-irods/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31753075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deprecated","irods","python","testing"],"created_at":"2024-11-28T09:17:46.669Z","updated_at":"2026-04-13T12:31:48.422Z","avatar_url":"https://github.com/wtsi-hgi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"***\n\n__Deprecated: please use [Use In Test](https://github.com/wtsi-hgi/useintest) instead, which has a [predefined setup for \niRODS](http://useintest.readthedocs.io/en/latest/predefined/#irods).__\n\n***\n\n\u0026nbsp;\n\n\n\n[![Build Status](https://travis-ci.org/wtsi-hgi/test-with-irods.svg)](https://travis-ci.org/wtsi-hgi/test-with-irods)\n[![codecov.io](https://codecov.io/github/wtsi-hgi/test-with-irods/coverage.svg?branch=master)](https://codecov.io/github/wtsi-hgi/test-with-irods?branch=master)\n\n# Test with iRODS\nTest with iRODS exploits [Docker](http://docker.com) to simplify the testing of software that interacts with an iRODS \n(iCAT) server.\n\n\n## Use\n### Basic Usage\n```python\nfrom testwithirods.api import IrodsVersion\nfrom testwithirods.api import get_static_irods_server_controller\n\n# Controllers available for iRODS version: 3.3.1, 4.1.8, 4.1.9, 4.1.10\nController = get_static_irods_server_controller(irods_version=IrodsVersion.v4_1_10)\ntry:\n    # Start a server (any number can be started)\n    irods_server = Controller.start_server()\n    \n    # Do interesting things with iRODS...\n    \n    # Stop a single server\n    Controller.stop_server(irods_server)\nfinally:\n    # Ensure all servers are stopped\n    Controller.tear_down()\n```\n*Warning: ensure servers are stopped else they will keep running after your program exits! You may wish to exploit\n [`try... finally` blocks](*https://docs.python.org/3/reference/compound_stmts.html#try) or Python's \n [atexit](https://docs.python.org/3/library/atexit.html) functionality to achieve this.*\n \n \n## iCommands\nThis library provides the ability to create a temporary set of icommand-like executables on the host machine. The \nexecutables use icommands inside of a Docker instance linked to the iCAT server to produce the same results as they \nwould if the icommands were installed on the host machine.\n```python\nfrom testwithirods.proxies import ICommandProxyController\n\nproxy_controller = ICommandProxyController(irods_server, \"mercury/icat:%s\" % irods_server.version)\ntry:\n    icommands_location = proxy_controller.create_proxy_binaries()\n    \n    # Do interesting things with icommands, linked to the iRODS server\nfinally:\n    proxy_controller.tear_down()\n ```\n\n\n### Setup Helpers\nTo help with the setup of tests, a number of helper methods are available:\n```python\nfrom testwithirods.helpers import SetupHelper, AccessLevel\nfrom testwithirods.models import IrodsResource, IrodsUser, Metadata\n\nsetup_helper = SetupHelper(\"icommands_location\")\nsetup_helper.create_data_object(\"name\", contents=\"contents\")   # type: str\nsetup_helper.replicate_data_object(\"/path/to/data_object\", \"resourceName\")\nsetup_helper.create_collection(\"name\")   # type: str\nsetup_helper.add_metadata_to(\"/path/to/entity\", Metadata({\"attribute\": \"value\"}))\nsetup_helper.get_checksum(\"/path/to/entity\")   # type: str\nsetup_helper.create_replica_storage()   # type: IrodsResource\nsetup_helper.create_user(\"username\", \"zone\")    # type: IrodsUser\nsetup_helper.set_access(\"username_or_group\", AccessLevel.OWN, \"/path/to/entity\")\nsetup_helper.run_icommand([\"icommand_binary\", \"--any\", \"arguments\"])    # type: str\n```\n\n\n## Specifying the Docker Daemon\nIt is possible to specify the Docker daemon that you wish to use by setting environment variables. In particular, \n`DOCKER_TLS_VERIFY`, `DOCKER_HOST` and `DOCKER_CERT_PATH` can be set. For example, the configuration's environment\nvariables could be:\n```bash\nDOCKER_TLS_VERIFY=1\nDOCKER_HOST=tcp://192.168.99.100:2376\nDOCKER_CERT_PATH=/Users/you/.docker/machine/machines/default\n```\n*[Information on how to set these variables in Pycharm.](https://www.jetbrains.com/pycharm/help/run-debug-configuration-python.html#d427982e277)*\n\nIf these variables are not set, it is assumed the daemon is accessible via the default UNIX socket: \n`unix:///var/run/docker.sock`.\n\n\n## Development\n### Setup\nInstall both the library dependencies and the dependencies needed for testing:\n```bash\n$ pip3 install -q -r requirements.txt\n$ pip3 install -q -r test_requirements.txt\n```\n\n### Testing\nUsing nosetests, in the project directory, run:\n```bash\n$ nosetests -v --exclude-test=testwithirods.tests._common.create_tests_for_all_icat_setups --exclude-test=testwithirods.tests._common.IcatTest\n```\n\nTo generate a test coverage report with nosetests:\n```bash\n$ nosetests -v --with-coverage --cover-package=testwithirods --cover-inclusive --exclude-test=testwithirods.tests._common.create_tests_for_all_icat_setups --exclude-test=testwithirods.tests._common.IcatTest\n```\n\nTo limit testing to a specific version iRODS, set the environment variable `SINGLE_TEST_SETUP` to match \nthe name of the controller associated to the server, e.g. \n`SINGLE_TEST_SETUP=Irods4_1_8ServerController`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtsi-hgi%2Ftest-with-irods","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwtsi-hgi%2Ftest-with-irods","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtsi-hgi%2Ftest-with-irods/lists"}