<commit_before>- name: Install gettext package
  package:
    name: gettext
    state: present
  become: yes

- name: Check to see if the constraints file exists
  stat:
    path: "{{ constraints_file|default('missing') }}"
    get_checksum: false
    get_mime: false
    get_md5: false
  register: stat_results
  when: constraints_file is defined

- name: Record file location
  set_fact:
    upper_constraints: "-c {{ constraints_file }}"
  when: not stat_results|skipped and stat_results.stat.exists

- name: Setup venv
  shell:
    chdir: '{{ zuul_work_dir }}'
    executable: /bin/bash
    cmd: |
      set -e
      set -x

      UPPER_CONSTRAINTS="{{ upper_constraints }}"
      python -m virtualenv .venv
      VENV=.venv/bin
      $VENV/pip install sphinx $UPPER_CONSTRAINTS
      $VENV/pip install openstackdocstheme $UPPER_CONSTRAINTS
      $VENV/pip install reno $UPPER_CONSTRAINTS
      # Optionally, install local requirements
      if [ -e releasenotes/requirements.txt ] ; then
          $VENV/pip install -r releasenotes/requirements.txt $UPPER_CONSTRAINTS
      fi
      # TODO(jaegerandi): Remove once all repos are fixed.
      # Try installing current repo in case it needs to be available for
      # example for version number calculation. Ignore any failures here.
      $VENV/pip install . || true<commit_msg>Try to install more dependencies in the release notes job<commit_after>- name: Install gettext package
  package:
    name: gettext
    state: present
  become: yes

- name: Check to see if the constraints file exists
  stat:
    path: "{{ constraints_file|default('missing') }}"
    get_checksum: false
    get_mime: false
    get_md5: false
  register: stat_results
  when: constraints_file is defined

- name: Record file location
  set_fact:
    upper_constraints: "-c {{ constraints_file }}"
  when: not stat_results|skipped and stat_results.stat.exists

- name: Setup venv
  shell:
    chdir: '{{ zuul_work_dir }}'
    executable: /bin/bash
    cmd: |
      set -e
      set -x

      OPTIONAL_REQUIREMENTS_SOURCES="
      docs/requirements.txt
      requirements.txt
      test-requirements.txt
      "

      UPPER_CONSTRAINTS="{{ upper_constraints }}"
      python -m virtualenv .venv
      VENV=.venv/bin
      $VENV/pip install sphinx $UPPER_CONSTRAINTS
      $VENV/pip install openstackdocstheme $UPPER_CONSTRAINTS
      $VENV/pip install reno $UPPER_CONSTRAINTS

      # Install from other optional sources, ignoring errors.
      # TODO(jaegerandi): as below, these extra requirements are only
      # for things like oslosphix which some releasenotes jobs still
      # depend on.
      for reqfile in $OPTIONAL_REQUIREMENTS_SOURCES; do
          if [ -e $reqfile ] ; then
              $VENV/pip install -r $reqfile $UPPER_CONSTRAINTS || true
          fi
      done

      # Optionally, install local requirements
      if [ -e releasenotes/requirements.txt ] ; then
          $VENV/pip install -r releasenotes/requirements.txt $UPPER_CONSTRAINTS
      fi
      # TODO(jaegerandi): Remove once all repos are fixed.
      # Try installing current repo in case it needs to be available for
      # example for version number calculation. Ignore any failures here.
      if [ -f setup.cfg ] ; then
          $VENV/pip install $UPPER_CONSTRAINTS . || true
      fi
{'fraction_non_alphanumeric': 0.0782477341389728, 'fraction_numerical': 0.0006042296072507553, 'mean_word_length': 2.779680365296804, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2343335', 'n_tokens_mistral': 1061, 'n_tokens_neox': 1023, 'n_words': 313}