Skip to content

Commit

Permalink
Merge pull request #116831 from oxzi/watson-2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Apr 12, 2021
2 parents 0fefa42 + 6e7740f commit 1bbb088
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 8 deletions.
12 changes: 4 additions & 8 deletions pkgs/applications/office/watson/default.nix
Expand Up @@ -4,26 +4,22 @@ with pythonPackages;

buildPythonApplication rec {
pname = "watson";
version = "1.10.0";
version = "2.0.0";

src = fetchFromGitHub {
owner = "TailorDev";
repo = "Watson";
rev = version;
sha256 = "1s0k86ldqky6avwjaxkw1y02wyf59qwqldcahy3lhjn1b5dgsb3s";
sha256 = "1yxqjirv7cpg4hqj4l3a53p3p3kl82bcx6drgvl9v849vcc3l7s0";
};

checkPhase = ''
pytest -vs tests
'';

postInstall = ''
installShellCompletion --bash --name watson watson.completion
installShellCompletion --zsh --name _watson watson.zsh-completion
'';

checkInputs = [ py pytest pytest-datafiles pytest-mock pytestrunner ];
propagatedBuildInputs = [ arrow click click-didyoumean requests ];
checkInputs = [ pytestCheckHook pytest-mock mock pytest-datafiles ];
propagatedBuildInputs = [ arrow_1 click click-didyoumean requests ];
nativeBuildInputs = [ installShellFiles ];

meta = with lib; {
Expand Down
41 changes: 41 additions & 0 deletions pkgs/development/python-modules/arrow/1.nix
@@ -0,0 +1,41 @@
{ lib, buildPythonPackage, fetchPypi, pythonOlder
, simplejson, typing-extensions, python-dateutil, pytz, pytest-mock, sphinx
, dateparser, pytestcov, pytestCheckHook
}:

buildPythonPackage rec {
pname = "arrow";
version = "1.0.3";

disabled = pythonOlder "3.6";

src = fetchPypi {
inherit pname version;
sha256 = "0793badh4hgbk2c5g70hmbl7n3d4g5d87bcflld0w9rjwy59r71r";
};

propagatedBuildInputs = [ python-dateutil ]
++ lib.optionals (!pythonOlder "3.8") [ typing-extensions ];

checkInputs = [
dateparser
pytestCheckHook
pytestcov
pytest-mock
pytz
simplejson
sphinx
];

# ParserError: Could not parse timezone expression "America/Nuuk"
disabledTests = [
"test_parse_tz_name_zzz"
];

meta = with lib; {
description = "Python library for date manipulation";
homepage = "https://github.com/crsmithdev/arrow";
license = licenses.asl20;
maintainers = with maintainers; [ thoughtpolice oxzi ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -495,6 +495,8 @@ in {

arrow = callPackage ../development/python-modules/arrow { };

arrow_1 = callPackage ../development/python-modules/arrow/1.nix { };

arviz = callPackage ../development/python-modules/arviz { };

arxiv2bib = callPackage ../development/python-modules/arxiv2bib { };
Expand Down

0 comments on commit 1bbb088

Please sign in to comment.