Skip to content

Commit

Permalink
Use the now-versioned interactive-templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ghickman committed Sep 12, 2023
1 parent faf4977 commit 312edbe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
14 changes: 0 additions & 14 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ prodenv: requirements-prod
# exit if .txt file has not changed since we installed them (-nt == "newer than', but we negate with || to avoid error exit code)
test requirements.prod.txt -nt $VIRTUAL_ENV/.prod || exit 0

# Locally, changes to the interactive_templates package are not picked up automatically, because we are usng a zipfile rather
# than providing explicit versions. This means we need to uninstall and reinstall the package to pick up any changes.
# Note: this is not a problem in CI because it is building from a fresh environment each time.
$PIP uninstall -y interactive_templates

# --no-deps is recommended when using hashes, and also worksaround a bug with constraints and hashes.
# https://pip.pypa.io/en/stable/topics/secure-installs/#do-not-use-setuptools-directly
$PIP install --no-deps -r requirements.prod.txt
Expand Down Expand Up @@ -117,15 +112,6 @@ upgrade env package="": virtualenv
FORCE=true {{ just_executable() }} requirements-{{ env }} $opts


update-interactive-templates ref="": && prodenv
#!/usr/bin/bash
set -euo pipefail

test "{{ ref }}" == "" && ref=$(git ls-remote https://github.com/opensafely-core/interactive-templates HEAD | awk '{print $1}')
prefix="interactive_templates@https://github.com/opensafely-core/interactive-templates/archive"
sed -i "s#${prefix}.*#${prefix}/{{ ref }}.zip#" requirements.prod.in


# Run the dev project with telemetry
run-telemetry: devenv
$BIN/opentelemetry-instrument $BIN/python manage.py runserver --noreload
Expand Down
2 changes: 1 addition & 1 deletion requirements.prod.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ furl
https://github.com/opensafely-core/pipeline/archive/refs/tags/v2023.08.09.102223.zip#egg=opensafely-pipeline
gunicorn
incuna-mail
interactive_templates@https://github.com/opensafely-core/interactive-templates/archive/06ae9bc49fd536599aef77973912757594f851d3.zip
https://github.com/opensafely-core/interactive-templates/archive/refs/tags/v2023.09.12.100407.zip#egg=interactive_templates
itsdangerous
lxml
markdown
Expand Down
4 changes: 2 additions & 2 deletions requirements.prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ incuna-mail==4.1.1 \
--hash=sha256:4071949a7cc70f88c1acea5f06ac8ba439029f655ff5d8c98277bbc8cc8d4bd5 \
--hash=sha256:d8ef4979264fba729fa1478819d71f66af17a795e82d9607d8e7ccd7edaafe10
# via -r requirements.prod.in
interactive-templates @ https://github.com/opensafely-core/interactive-templates/archive/06ae9bc49fd536599aef77973912757594f851d3.zip \
--hash=sha256:8271e48be9caa52eccc5672e9d5f0a473153e24b8ca44fa8771cbbb6fc24f913
interactive-templates @ https://github.com/opensafely-core/interactive-templates/archive/refs/tags/v2023.09.12.100407.zip \
--hash=sha256:a6bfaa4f6a7a44633dc1cd161b886819808505d513116fc9ab7d5b28149f10cf
# via -r requirements.prod.in
itsdangerous==2.1.2 \
--hash=sha256:2c2349112351b88699d8d4b6b075022c0808887cb7ad10069318a8b0bc88db44 \
Expand Down

0 comments on commit 312edbe

Please sign in to comment.