{"id":48822831,"url":"https://github.com/onsdigital/srm-rh-ui","last_synced_at":"2026-04-14T16:00:30.453Z","repository":{"id":183951230,"uuid":"671051373","full_name":"ONSdigital/srm-rh-ui","owner":"ONSdigital","description":"User Interface for respondents to access ONS Survey Data Collection questionnaires and services","archived":false,"fork":false,"pushed_at":"2026-04-01T15:14:27.000Z","size":292,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-01T16:24:14.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ONSdigital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-07-26T12:35:56.000Z","updated_at":"2026-04-01T14:23:21.000Z","dependencies_parsed_at":"2026-04-14T16:00:28.457Z","dependency_job_id":null,"html_url":"https://github.com/ONSdigital/srm-rh-ui","commit_stats":null,"previous_names":["onsdigital/srm-rh-ui"],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/ONSdigital/srm-rh-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fsrm-rh-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fsrm-rh-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fsrm-rh-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fsrm-rh-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ONSdigital","download_url":"https://codeload.github.com/ONSdigital/srm-rh-ui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fsrm-rh-ui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31803790,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2026-04-14T16:00:21.841Z","updated_at":"2026-04-14T16:00:30.448Z","avatar_url":"https://github.com/ONSdigital.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SRM Respondent Home UI\n\nUser Interface for respondents to access ONS Survey Data Collection questionnaires and services\n\n## Installation/build\n\nTo install all dependencies and download the templates run:\n\n```shell\nmake install\n```\n\nTo build the docker image and run the tests:\n\n```shell\nmake build\n```\n\n## Running\n\nOnce that's done, you can run the make command to run it in your terminal:\n\n```shell\nmake run\n```\n\nor to run it in Pycharm, use the run template that's specified and it should work as expected.\n\nPodman and Docker are both supported for building and running the application.\nBy default the Makefile will use `docker` unless you are on an `arm64` architecture (e.g. M1/M2 Mac) in which case it will use `podman`.\nYou can override this by setting the `DOCKER` environment variable to either `docker` or `podman`.\nFor example, to force using `docker` on an M1/M2 Mac:\n```shell\nDOCKER=docker make \u003ccommand\u003e\n```\n\n## Translations\n\nThe site uses PyBabel for translations.\n\nText to translate is marked up in `.html` and `.py` templates and files with the [gettext](https://en.wikipedia.org/wiki/Gettext) mechanism. Then a `messages.pot` file is build via Pybabel, which collates all the text to translate.\n\nBased on the content of the `.pot` file translation files `messages.po` are created for all specified language codes. Finally, the `.po` files are compiled into `.mo` files, which are then used on the page.\n\n1. Extract text to translation\n\nTo build/re-build the translation messages.pot use:\n\n```shell\npipenv run pybabel extract -F babel.cfg -o rh_ui/translations/messages.pot .\n```\n\n2. Create new language file\n\u003e [!CAUTION]\n\u003e Follow this step only when you want to add translation for a new language. Running it for an existing language code will overwrite the existing translations.\n\nTo create a new language messages file, run the following, changing the 2 character language code at the end to the\nrequired language code. Only generate a individual language file once.\n\n```shell\npipenv run pybabel init -i rh_ui/translations/messages.pot -d rh_ui/translations -l cy\n```\n\n3. Update translation files\n\nOnce created, you can update the existing language messages.po files to include changes in the messages.pot by running\nthe following. This will update ALL language files.\n\n```shell\npipenv run pybabel update -i rh_ui/translations/messages.pot -d rh_ui/translations\n```\n\n4. Compile the translations\n\n\u003e [!NOTE]\n\u003e Double check your translation files (messages.po) for the `#, fuzzy` comment. This indicates that the tranlsation isn't an exact match and won't be rendered on the page. Double check the translations and remove any incorrectly matched lines, then remove the `fuzzy` comment.\n\nTo compile updates to the messages.po files into messages.mo (the file actually used by the site) use:\n```shell\npipenv run pybabel compile -d rh_ui/translations\n```\n## Venom Tests\n\nWe have a suite of [Venom tests](https://github.com/ovh/venom) for testing the OWASP header recommendations. These tests\nare copied from the [OWASP Secure Headers Project](https://github.com/oshp/oshp-validator).\n\nSee [./tests/venom_tests.yml](./tests/venom_tests.yml).\n\nThese tests are designed to be run against a public HTTPS endpoint in a prod-like environment, since some of the headers\nthey check must not be present on HTTP responses e.g.\nthe [HSTS header](https://www.rfc-editor.org/rfc/rfc6797#section-6.1). Hence, these tests cannot all pass when run\nagainst a local HTTP only instance. However, it may be useful for development to still run them locally.\n\n### Running Venom locally\n\n* First, use our [docker dev](https://github.com/ONSdigital/ssdc-rm-docker-dev) to run our local development\n  environment to test against.\n\n* Now create a local copy of the venom test suite with the correct URL substituted in:\n\n  ```shell\n  sed -e \"s|\u003cVENOM_TARGET_URL\u003e|http://host.docker.internal:9092/en/start|\" ./tests/venom_tests.yml \u003e tmp_venom_local.yml\n  ```\n\n  It may be helpful to now open the created `tmp_venom_local.yml` file in an editor and comment out the\n  `Strict-Transport-Security` test case which is bound to fail locally.\n\n* Now run the tests against the docker dev RH UI using the official OVH Venom docker image (\n  See \u003chttps://github.com/ovh/venom?tab=readme-ov-file#docker-image\u003e for more details on running venom and docs on\n  configuration).\n\n  ```shell\n  mkdir -p tmp_venom_results\n  docker run --network=\"ssdcrmdockerdev_default\" \\\n    --mount type=bind,source=$(pwd)/tmp_venom_local.yml,target=/workdir/tests/tests.yml \\\n    --mount type=bind,source=$(pwd)/tmp_venom_results,target=/workdir/results \\\n    ovhcom/venom:latest \n  ```\n\n* The test results should be shown in your terminal, and details logs written in the `tmp_venom_results` folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonsdigital%2Fsrm-rh-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonsdigital%2Fsrm-rh-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonsdigital%2Fsrm-rh-ui/lists"}