<commit_before>{ lib
, buildPythonApplication
, fetchFromGitHub
, dill
, coverage
, coveralls
, mock
, nose
}:

buildPythonApplication rec {
  pname = "expiringdict";
  version = "1.2.2";

  # use fetchFromGitHub instead of fetchPypi because the test suite of
  # the package is not included into the PyPI tarball
  src = fetchFromGitHub {
    owner = "mailgun";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-vRhJSHIqc51I+s/wndtfANM44CKW3QS1iajqyoSBf0I=";
  };

  checkInputs = [
    dill
    coverage
    coveralls
    mock
    nose
  ];

  checkPhase = ''
    nosetests -v --with-coverage --cover-package=expiringdict
  '';

  pythonImportsCheck = [ "expiringdict" ];

  meta = with lib; {
    description = "Dictionary with auto-expiring values for caching purposes";
    homepage = "https://pypi.org/project/expiringdict/";
    license = licenses.asl20;
    maintainers = with maintainers; [ gravndal ];
  };
}<commit_msg>python3Packages.expiringdict: Use buildPythonPackage<commit_after>{ lib
, buildPythonPackage
, fetchFromGitHub
, dill
, coverage
, coveralls
, mock
, nose
}:

buildPythonPackage rec {
  pname = "expiringdict";
  version = "1.2.2";
  format = "setuptools";

  # use fetchFromGitHub instead of fetchPypi because the test suite of
  # the package is not included into the PyPI tarball
  src = fetchFromGitHub {
    owner = "mailgun";
    repo = pname;
    rev = "refs/tags/v${version}";
    sha256 = "sha256-vRhJSHIqc51I+s/wndtfANM44CKW3QS1iajqyoSBf0I=";
  };

  checkInputs = [
    dill
    coverage
    coveralls
    mock
    nose
  ];

  checkPhase = ''
    runHook preCheck
    nosetests -v --with-coverage --cover-package=expiringdict
    runHook postCheck
  '';

  pythonImportsCheck = [
    "expiringdict"
  ];

  meta = with lib; {
    description = "Dictionary with auto-expiring values for caching purposes";
    homepage = "https://github.com/mailgun/expiringdict";
    license = licenses.asl20;
    maintainers = with maintainers; [ gravndal ];
  };
}
{'fraction_non_alphanumeric': 0.10828343313373254, 'fraction_numerical': 0.018463073852295408, 'mean_word_length': 3.265957446808511, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '933278', 'n_tokens_mistral': 726, 'n_tokens_neox': 681, 'n_words': 160}