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

python3Packages.mkdocs-git-committers-plugin-2: init at 2.4.1 #344615

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12942,6 +12942,17 @@
githubId = 24735185;
name = "Mahmoud Ayman";
};
mahtaran = {
email = "luka.leer@gmail.com";
github = "mahtaran";
githubId = 22727323;
name = "Luka Leer";
keys = [
{
fingerprint = "C7FF B72E 0527 423A D470 E132 AA82 C4EB CB16 82E0";
}
];
};
majesticmullet = {
email = "hoccthomas@gmail.com.au";
github = "MajesticMullet";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
# Evaluation
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,

# Build
setuptools,

# Dependencies
gitpython,
mkdocs,
requests,
}:

buildPythonPackage rec {
pname = "mkdocs-git-committers-plugin-2";
version = "2.4.1";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "ojacques";
repo = "mkdocs-git-committers-plugin-2";
rev = "refs/tags/${version}";
hash = "sha256-hKt0K5gOkdUDwTlyMTwodl4gD1RD+s+CM+zEpngSnlc=";
};

build-system = [
setuptools
];

dependencies = [
gitpython
mkdocs
requests
];

# Upstream has no tests
doCheck = false;
pythonImportsCheck = [ "mkdocs_git_committers_plugin_2" ];

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you enable tests?

Make sure the tests are enabled using for example pytestCheckHook and, in the case of libraries, are passing for all interpreters. If certain tests fail they can be disabled individually. Try to avoid disabling the tests altogether. In any case, when you disable tests, leave a comment explaining why.

https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/python.section.md#contributing-guidelines-contributing-guidelines

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, the upstream package does not have any test suite, and since it is a plugin that has to do with Git history, mocking one would be pretty complicated I feel. I explicitly disabled the check for now, but if there's any better way to do it, please let me know!

meta = {
description = "MkDocs plugin for displaying a list of contributors on each page";
homepage = "https://github.com/ojacques/mkdocs-git-committers-plugin-2";
changelog = "https://github.com/ojacques/mkdocs-git-committers-plugin-2/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ mahtaran ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8012,6 +8012,8 @@ self: super: with self; {

mkdocs-git-authors-plugin = callPackage ../development/python-modules/mkdocs-git-authors-plugin { };

mkdocs-git-committers-plugin-2 = callPackage ../development/python-modules/mkdocs-git-committers-plugin-2 { };

mkdocs-git-revision-date-localized-plugin = callPackage ../development/python-modules/mkdocs-git-revision-date-localized-plugin { };

mkdocs-gitlab = callPackage ../development/python-modules/mkdocs-gitlab-plugin { };
Expand Down