-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
python312Packages.pygerber: init at 2.4.2, pytest-lsp: init at 0.4.3 #359437
Conversation
do I need to do anything else? Sorry it's my first PR so I'm not sure. @steeleduncan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not familiar enough with python derivations to leave an approving review, but I certainly wouldn't want to block it
If you can find someone who has merged some python commits recently and ping them for a review that is probably the best approach to get it merged
@natsukium Hello, hope it's ok for me to ping you here. I opened this PR about 3 weeks ago and I wasn't sure if I had to do anything else to get it merged. |
@FliegendeWurst Just committed your suggestions, fixed a little error and squashed them, hopefully this is how I was supposed to do this. Anything else I should do? |
Yes. So far you only activated the import check. It would be good to run the real test suite, if the project has one. Add pytestCheckHook (or another hook, depending on the framework) to nativeCheckInputs for that. |
@FliegendeWurst I looked into it, but I can't test because |
Here you go. Untested. {
lib,
fetchPypi,
buildPythonPackage,
hatchling,
pygls,
pytestCheckHook,
pytest-asyncio,
}:
buildPythonPackage rec {
pname = "pytest-lsp";
version = "0.4.3";
pyproject = true;
src = fetchPypi {
inherit version;
pname = "pytest_lsp";
hash = "sha256-ND9r2i+qMg7V/Ld8lCDScDzlZdHRRP6CfjGYp9wpkRw=";
};
build-system = [
hatchling
];
dependencies = [
pygls
pytest-asyncio
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "pytest_lsp" ];
meta = {
homepage = "https://github.com/swyddfa/lsp-devtools";
changelog = "https://github.com/swyddfa/lsp-devtools/blob/develop/lib/pytest-lsp/CHANGES.md";
description = "Pytest plugin for writing end-to-end tests for language servers";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ clemjvdm fliegendewurst ];
};
} |
@FliegendeWurst Thanks a lot! But I'm sorry, I'm not sure how I should go about this. Open a new PR with pytest_lsp, or just write this somewhere in this PR? |
You can put it in this PR. Ideally it would be done in a commit before the pygerber package is added. |
@FliegendeWurst Just to be sure before I do this, pygerber documentation states that to run tests one should do:
I assumed this wasn't the right way to do this here since this would imply letting poetry manage dependencies. I also tried just installing the required dependencies and doing
Which is why I figured maybe using pytests (which poepoet refers to) directly was the right approach. But in hindsight I'm not sure. |
I think either way we'll need |
I think pytestCheckHook will work. You may need to add some more plugins though: |
@FliegendeWurst Yeah I figured, I'll try that then. Thanks :) |
b4182a9
to
e357721
Compare
@FliegendeWurst New issue! Yay! I was able to get everything working with Is there a good way of solving this? I presume maybe we can fetch them in nix and then patch the tests but I don't have time nor am I qualified to do that I think. |
If it's only some tests you can disable them using disabledTests = [ .... ]. |
@FliegendeWurst Ok that worked! Do we care about skipped, xfailed and xpassed tests?
Otherwise I'll commit. |
That looks good to me 👍 |
@FliegendeWurst All done. Thanks you sm for the help :) |
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.