From 142020d5ace85bf7234cca1e4b1c18df97fcfa5d Mon Sep 17 00:00:00 2001 From: octvs Date: Sat, 9 Nov 2024 18:49:08 +0100 Subject: [PATCH 1/3] maintainers: add octvs as maintainer --- maintainers/maintainer-list.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 26530c77919c0..7a54cd7ff795b 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -16258,6 +16258,13 @@ github = "octodi"; githubId = 127038896; }; + octvs = { + name = "octvs"; + email = "octvs@posteo.de"; + matrix = "@octvs:matrix.org"; + github = "octvs"; + githubId = 42993892; + }; oddlama = { email = "oddlama@oddlama.org"; github = "oddlama"; From 89281cba811ddd2f18cabe1b11bb21d8c19b82b5 Mon Sep 17 00:00:00 2001 From: octvs Date: Sat, 9 Nov 2024 18:49:42 +0100 Subject: [PATCH 2/3] python312Packages.arxiv: init at 2.1.0 --- .../python-modules/arxiv/default.nix | 70 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 72 insertions(+) create mode 100644 pkgs/development/python-modules/arxiv/default.nix diff --git a/pkgs/development/python-modules/arxiv/default.nix b/pkgs/development/python-modules/arxiv/default.nix new file mode 100644 index 0000000000000..87628f6d2cb6f --- /dev/null +++ b/pkgs/development/python-modules/arxiv/default.nix @@ -0,0 +1,70 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + setuptools, + + # dependencies + feedparser, + requests, + + # tests + mock, + pytestCheckHook, +}: +buildPythonPackage rec { + pname = "arxiv"; + version = "2.1.3"; + pyproject = true; + + src = fetchFromGitHub { + owner = "lukasschwab"; + repo = "arxiv.py"; + rev = "refs/tags/${version}"; + hash = "sha256-Niu3N0QTVxucboQx1FQq1757Hjj1VVWeDZn7O7YtjWY="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + feedparser + requests + ]; + + nativeCheckInputs = [ + pytestCheckHook + mock + ]; + + disabledTests = [ + # Require network access + "test_from_feed_entry" + "test_download_from_query" + "test_download_tarfile_from_query" + "test_download_with_custom_slugify_from_query" + "test_get_short_id" + "test_invalid_format_id" + "test_invalid_id" + "test_legacy_ids" + "test_max_results" + "test_missing_title" + "test_no_duplicates" + "test_nonexistent_id_in_list" + "test_offset" + "test_query_page_count" + "test_result_shape" + "test_search_results_offset" + ]; + + pythonImportsCheck = [ "arxiv" ]; + + meta = { + description = "Python wrapper for the arXiv API"; + homepage = "https://github.com/lukasschwab/arxiv.py"; + changelog = "https://github.com/lukasschwab/arxiv.py/releases/tag/${version}"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.octvs ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3781cbfb0b260..4b60e32fc0e11 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -810,6 +810,8 @@ self: super: with self; { arviz = callPackage ../development/python-modules/arviz { }; + arxiv = callPackage ../development/python-modules/arxiv { }; + arxiv2bib = callPackage ../development/python-modules/arxiv2bib { }; asana = callPackage ../development/python-modules/asana { }; From bfec9ac865899a6d6f86b3e9bd9c0b773f51f3dc Mon Sep 17 00:00:00 2001 From: octvs Date: Sat, 9 Nov 2024 18:54:27 +0100 Subject: [PATCH 3/3] python312Packages.papis: 0.13 -> 0.14 --- .../python-modules/papis/default.nix | 93 ++++++++++--------- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/pkgs/development/python-modules/papis/default.nix b/pkgs/development/python-modules/papis/default.nix index f7f36edfb2012..c2f4b8f21d6d0 100644 --- a/pkgs/development/python-modules/papis/default.nix +++ b/pkgs/development/python-modules/papis/default.nix @@ -1,62 +1,65 @@ { lib, - stdenv, - arxiv2bib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + hatchling, + + # dependencies + arxiv, beautifulsoup4, bibtexparser, - buildPythonPackage, - chardet, click, colorama, - configparser, dominate, - fetchFromGitHub, filetype, habanero, isbnlib, lxml, + platformdirs, prompt-toolkit, pygments, pyparsing, - pytestCheckHook, python-doi, python-slugify, - pythonOlder, pyyaml, requests, stevedore, - tqdm, - typing-extensions, - whoosh, -}: + # tests + docutils, + git, + pytestCheckHook, + sphinx, + sphinx-click, +}: buildPythonPackage rec { pname = "papis"; - version = "0.13"; - format = "setuptools"; - - disabled = pythonOlder "3.7"; + version = "0.14"; + pyproject = true; src = fetchFromGitHub { owner = "papis"; - repo = pname; + repo = "papis"; rev = "refs/tags/v${version}"; - hash = "sha256-iRrf37hq+9D01JRaQIqg7yTPbLX6I0ZGnzG3r1DX464="; + hash = "sha256-UpZoMYk4URN8tSFGIynVzWMk+9S0izROAgbx6uI2cN8="; }; - propagatedBuildInputs = [ - arxiv2bib + build-system = [ hatchling ]; + + dependencies = [ + arxiv beautifulsoup4 bibtexparser - chardet click colorama - configparser dominate filetype habanero isbnlib lxml + platformdirs prompt-toolkit pygments pyparsing @@ -65,52 +68,50 @@ buildPythonPackage rec { pyyaml requests stevedore - tqdm - typing-extensions - whoosh ]; postPatch = '' - substituteInPlace setup.cfg \ - --replace "--cov=papis" "" + substituteInPlace pyproject.toml \ + --replace-fail "--cov=papis" "" ''; - nativeCheckInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "papis" ]; + + nativeCheckInputs = [ + docutils + git + pytestCheckHook + sphinx + sphinx-click + ]; preCheck = '' export HOME=$(mktemp -d); ''; - pytestFlagsArray = [ "papis tests" ]; + pytestFlagsArray = [ + "papis" + "tests" + ]; disabledTestPaths = [ + # Require network access "tests/downloaders" "papis/downloaders/usenix.py" ]; disabledTests = [ - "get_document_url" - "match" - "test_doi_to_data" - "test_downloader_getter" - "test_general" - "test_get_config_dirs" - "test_get_configuration" - "test_get_data" - "test_valid_dblp_key" - "test_validate_arxivid" - "test_yaml" - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_default_opener" ]; - - pythonImportsCheck = [ "papis" ]; + # Require network access + "test_yaml_unicode_dump" + ]; - meta = with lib; { + meta = { description = "Powerful command-line document and bibliography manager"; mainProgram = "papis"; homepage = "https://papis.readthedocs.io/"; changelog = "https://github.com/papis/papis/blob/v${version}/CHANGELOG.md"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ nico202 teto ];