<commit_before>---
# install all requirements from requirements.txt
#
# use_pip_compile == True:
#   before installing requirements.txt, install pip-tools and recompile 
#   requirements inputs configured in requirement_files
#
# tag: update_requirements
#

- name: install pip-tools
  pip: >
    virtualenv="{{ virtualenv_path }}"
    executable="{{ virtualenv_path }}/bin/pip"
    name={{ item }}
    state=latest
  with_items:
    - "pip"
    - "pip-tools"
  when: use_pip_compile
  tags: update_requirements

- name: recompile requirements input
  command: >
    {{ virtualenv_path }}/bin/pip-compile {{ install_path }}/requirements/{{ item }}.in
  with_items: requirement_files
  when: use_pip_compile
  tags: update_requirements

- name: install django app requirements
  pip: >
    virtualenv="{{ virtualenv_path }}"
    executable="{{ virtualenv_path }}/bin/pip"
    requirements="{{ install_path }}/requirements.txt"
    extra_args="--exists-action w"
    state=latest
  notify:
    - restart service group
  tags: update_requirements<commit_msg>Enable upgrading to latest possible on pip-compile (update_requirements)<commit_after>---
# install all requirements from requirements.txt
#
# use_pip_compile == True:
#   before installing requirements.txt, install pip-tools and recompile 
#   requirements inputs configured in requirement_files
#
# tag: update_requirements
#

- name: install pip-tools
  pip: >
    virtualenv="{{ virtualenv_path }}"
    executable="{{ virtualenv_path }}/bin/pip"
    name={{ item }}
    state=latest
  with_items:
    - "pip"
    - "pip-tools"
  when: use_pip_compile
  tags: update_requirements

- name: recompile requirements input
  command: >
    {{ virtualenv_path }}/bin/pip-compile {{ install_path }}/requirements/{{ item }}.in --upgrade
  with_items: requirement_files
  when: use_pip_compile
  tags: update_requirements

- name: install django app requirements
  pip: >
    virtualenv="{{ virtualenv_path }}"
    executable="{{ virtualenv_path }}/bin/pip"
    requirements="{{ install_path }}/requirements.txt"
    extra_args="--exists-action w"
    state=latest
  notify:
    - restart service group
  tags: update_requirements
{'fraction_non_alphanumeric': 0.11519045433685177, 'fraction_numerical': 0.0, 'mean_word_length': 3.9545454545454546, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6431575', 'n_tokens_mistral': 666, 'n_tokens_neox': 649, 'n_words': 169}