<commit_before>machine:
  environment:
    SCRATCH: "$HOME/scratch"
    CIRCLE_NPROCS: 2

  services:
    - docker

dependencies:
  cache_directories:
    - "~/docker"
    - "~/data"

  pre:
    - mkdir -p ~/data/ ~/docker ${CIRCLE_TEST_REPORTS}/py2 ${CIRCLE_TEST_REPORTS}/py3
    - mkdir -p $SCRATCH && sudo setfacl -d -m group:ubuntu:rwx $SCRATCH && sudo setfacl -m group:ubuntu:rwx $SCRATCH
    - mkdir -p $SCRATCH/py2 $SCRATCH/py3
  override:
    - if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi :
        timeout: 6000
    - docker build --rm=false -t niworkflows:py3 .
    - docker build --rm=false -t niworkflows:py2 --build-arg PYTHON_MAJOR=2 .
    - docker save poldracklab/neuroimaging-core:freesurfer-0.0.2 niworkflows:py3 niworkflows:py2 > ~/docker/image.tar :
        timeout: 6000
test:
  override:
    - bash .circle/pytests.sh :
        timeout: 36000
        parallel: true

general:
  artifacts:
    - "~/scratch"

deployment:
  hub:
    tag: /.*/
    commands:
      - sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'$CIRCLE_TAG'/" niworkflows/info.py
      - printf "[distutils]\nindex-servers =\n    pypi\n\n[pypi]\nusername:$PYPI_USER\npassword:$PYPI_PASS\n" > ~/.pypirc
      - python setup.py sdist upload -r pypi<commit_msg>split sdist and upload commands<commit_after>machine:
  environment:
    SCRATCH: "$HOME/scratch"
    CIRCLE_NPROCS: 2

  services:
    - docker

dependencies:
  cache_directories:
    - "~/docker"
    - "~/data"

  pre:
    - mkdir -p ${SCRATCH}/dist ~/data/ ~/docker ${CIRCLE_TEST_REPORTS}/py2 ${CIRCLE_TEST_REPORTS}/py3
    - mkdir -p $SCRATCH && sudo setfacl -d -m group:ubuntu:rwx $SCRATCH && sudo setfacl -m group:ubuntu:rwx $SCRATCH
    - mkdir -p $SCRATCH/py2 $SCRATCH/py3
  override:
    - if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi :
        timeout: 6000
    - docker build --rm=false -t niworkflows:py3 .
    - docker build --rm=false -t niworkflows:py2 --build-arg PYTHON_MAJOR=2 .
    - docker save poldracklab/neuroimaging-core:freesurfer-0.0.2 niworkflows:py3 niworkflows:py2 > ~/docker/image.tar :
        timeout: 6000
test:
  override:
    - bash .circle/pytests.sh :
        timeout: 36000
        parallel: true

general:
  artifacts:
    - "~/scratch"

deployment:
  hub:
    tag: /.*/
    commands:
      - sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'$CIRCLE_TAG'/" niworkflows/info.py
      - printf "[distutils]\nindex-servers =\n    pypi\n\n[pypi]\nusername:$PYPI_USER\npassword:$PYPI_PASS\n" > ~/.pypirc
      - python setup.py sdist
      - cp dist/* ${SCRATCH}/dist || true
      - python setup.py upload -r pypi
{'fraction_non_alphanumeric': 0.15248493975903615, 'fraction_numerical': 0.021837349397590362, 'mean_word_length': 2.5664429530201343, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3977102', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1050, 'n_words': 212}