Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watson: 1.10.0 -> 2.0.0 #116831

Merged
merged 2 commits into from Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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"
SuperSandro2000 marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -482,6 +482,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