<commit_before>rule pylint 
  command = pylint --rcfile pylintrc $in > $out.tmp; if [ -s $out.tmp ]; then cat $out.tmp 1>&2 ; rm -f $out.tmp; false; else rm $out.tmp; fi
  description = lint $in

rule pytest
  command = python $in 2> $out.tmp; if grep FAILED $out.tmp; then cat $out.tmp 1>&2 ; rm $out.tmp; false; else rm $out.tmp; fi
  description = pytest $in

rule pymeta
  command = python pymeta_helper.py $in
  description = generating $out

build lint : phony $
  .pylint.pymeta_helper.py $
  .pylint.pyn.py $
  .pylint.ninja_parser.py $
  .pylint.ninja_parser_test.py

build ninja_parser.py : pymeta ninja.pym

build test : phony .pytest.ninja_parser_test.py

build .pylint.ninja_parser.py : pylint ninja_parser.py
build .pylint.ninja_parser_test.py : pylint ninja_parser_test.py | ninja_parser.py
build .pylint.pyn.py : pylint pyn.py
build .pylint.pymeta_helper.py : pylint pymeta_helper.py
build .pytest.ninja_parser_test.py : pytest ninja_parser_test.py | ninja_parser.py

default ninja_parser.py
<commit_msg>tweak build rules<commit_after>rule pylint 
  command = pylint --rcfile pylintrc $in > $out.tmp; if [ -s $out.tmp ]; then cat $out.tmp 1>&2 ; rm -f $out.tmp; false; else rm $out.tmp; fi
  description = pylint --rcfile pylintrc $in

rule pytest
  command = python $in 2> $out.tmp; if grep FAILED $out.tmp; then cat $out.tmp 1>&2 ; rm $out.tmp; false; else rm $out.tmp; fi
  description = python $in

rule pymeta
  command = python pymeta_helper.py $in

build lint : phony $
  .pylint.pymeta_helper.py $
  .pylint.pyn.py $
  .pylint.ninja_parser.py $
  .pylint.ninja_parser_test.py

build ninja_parser.py : pymeta ninja.pym

build test : phony .pytest.ninja_parser_test.py

build .pylint.ninja_parser.py : pylint ninja_parser.py
build .pylint.ninja_parser_test.py : pylint ninja_parser_test.py | ninja_parser.py
build .pylint.pyn.py : pylint pyn.py
build .pylint.pymeta_helper.py : pylint pymeta_helper.py
build .pytest.ninja_parser_test.py : pytest ninja_parser_test.py | ninja_parser.py

default ninja_parser.py

{'fraction_non_alphanumeric': 0.11220472440944881, 'fraction_numerical': 0.004921259842519685, 'mean_word_length': 3.8987951807228916, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2788570', 'n_tokens_mistral': 838, 'n_tokens_neox': 824, 'n_words': 199}