about summary refs log tree commit diff
path: root/pkgs/development/python-modules/finvizfinance
diff options
context:
space:
mode:
authoricyrockcom <icyrock.com@icyrock.com>2023-02-08 17:34:29 -0500
committericyrockcom <icyrock.com@icyrock.com>2023-05-04 13:03:11 -0400
commit476713fc66714809025b6e910a827a642d7fb484 (patch)
tree4f25e63d952fb9203bc7eea42f4138c6a6ed284c /pkgs/development/python-modules/finvizfinance
parent89424b41716b23a4f9ba1b1bc179cbdca115b6c8 (diff)
pythonPackages.finvizfinance: init at 0.14.5
Diffstat (limited to 'pkgs/development/python-modules/finvizfinance')
-rw-r--r--pkgs/development/python-modules/finvizfinance/default.nix71
1 files changed, 71 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/finvizfinance/default.nix b/pkgs/development/python-modules/finvizfinance/default.nix
new file mode 100644
index 0000000000000..064b8291b8ce7
--- /dev/null
+++ b/pkgs/development/python-modules/finvizfinance/default.nix
@@ -0,0 +1,71 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, beautifulsoup4
+, datetime
+, lxml
+, pandas
+, pytest-mock
+, pytestCheckHook
+, requests
+}:
+
+buildPythonPackage rec {
+  pname = "finvizfinance";
+  version = "0.14.5";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.5";
+
+  src = fetchFromGitHub {
+    owner = "lit26";
+    repo = "finvizfinance";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-yhOa/CS+9UdI+TVMObBsOqIp9XggMJvNjteSMa5DJcM=";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "bs4" "beautifulsoup4"
+  '';
+
+  nativeCheckInputs = [
+    pytest-mock
+    pytestCheckHook
+  ];
+
+  propagatedBuildInputs = [
+    beautifulsoup4
+    datetime
+    lxml
+    pandas
+    requests
+  ];
+
+  pythonImportsCheck = [
+    "finvizfinance"
+  ];
+
+  disabledTests = [
+    # Tests require network access
+    "test_finvizfinance_calendar"
+    "test_finvizfinance_crypto"
+    "test_forex_performance_percentage"
+    "test_group_overview"
+    "test_finvizfinance_insider"
+    "test_finvizfinance_news"
+    "test_finvizfinance_finvizfinance"
+    "test_statements"
+    "test_screener_overview"
+  ];
+
+  meta = with lib; {
+    description = "Finviz Finance information downloader";
+    homepage = "https://github.com/lit26/finvizfinance";
+    changelog = "https://github.com/lit26/finvizfinance/releases/tag/v${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ icyrockcom ];
+  };
+}
+