<commit_before>{ stdenv, python2, fetchFromGitHub }:

with python2.pkgs; buildPythonApplication rec {
  pname = "isso";
  version = "0.12.2";

  # no tests on PyPI
  src = fetchFromGitHub {
    owner = "posativ";
    repo = pname;
    rev = version;
    sha256 = "18v8lzwgl5hcbnawy50lfp3wnlc0rjhrnw9ja9260awkx7jra9ba";
  };

  propagatedBuildInputs = [
    bleach
    cffi
    configparser
    html5lib
    ipaddr
    jinja2
    misaka
    werkzeug
  ];

  checkInputs = [ nose ];

  checkPhase = ''
    ${python.interpreter} setup.py nosetests
  '';

  meta = with stdenv.lib; {
    description = "A commenting server similar to Disqus";
    homepage = "https://posativ.org/isso/";
    license = licenses.mit;
    maintainers = with maintainers; [ fgaz ];
  };
}

<commit_msg>isso: build from master<commit_after>{ stdenv, python3Packages, fetchFromGitHub }:

with python3Packages; buildPythonApplication rec {

  pname = "isso";
  # Can not use 0.12.2 because of:
  # https://github.com/posativ/isso/issues/617
  version = "unstable-2020-09-14";

  # no tests on PyPI
  src = fetchFromGitHub {
    owner = "posativ";
    repo = pname;
    rev = "f4d2705d4f1b51f444d0629355a6fcbcec8d57b5";
    sha256 = "02jgfzq3svd54zj09jj7lm2r7ypqqjynzxa9dgnnm0pqvq728wzr";
  };

  propagatedBuildInputs = [
    itsdangerous
    jinja2
    misaka
    html5lib
    werkzeug
    bleach
    flask-caching
  ];

  buildInputs = [
    cffi
  ];

  checkInputs = [ nose ];

  checkPhase = ''
    ${python.interpreter} setup.py nosetests
  '';

  meta = with stdenv.lib; {
    description = "A commenting server similar to Disqus";
    homepage = "https://posativ.org/isso/";
    license = licenses.mit;
    maintainers = with maintainers; [ fgaz ];
  };
}


{'fraction_non_alphanumeric': 0.1111111111111111, 'fraction_numerical': 0.05008635578583765, 'mean_word_length': 2.958997722095672, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, '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': '4527800', 'n_tokens_mistral': 718, 'n_tokens_neox': 666, 'n_words': 129}