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
Add an additional dependency for home-assistant #41328
Conversation
@GrahamcOfBorg build python27Packages.voluptuous-serialize python36Packages.voluptuous-serialize |
Success on aarch64-linux (full log) Attempted: python27Packages.voluptuous-serialize, python36Packages.voluptuous-serialize Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: python27Packages.voluptuous-serialize, python36Packages.voluptuous-serialize Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: python36Packages.voluptuous-serialize Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: python36Packages.voluptuous-serialize Partial log (click to expand)
|
Please specify an appropriate Also, do you want to maintain this package? |
24ff10b
to
a1bcaf3
Compare
@dotlambda But I still get So not sure what to test now... |
Success on x86_64-linux (full log) Attempted: python36Packages.voluptuous-serialize Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: python36Packages.voluptuous-serialize Partial log (click to expand)
|
I've tried the following, but none of them run any tests: diff --git a/pkgs/development/python-modules/voluptuous-serialize/default.nix b/pkgs/development/python-modules/voluptuous-serialize/default.nix
index f899e869758..7954ab15155 100644
--- a/pkgs/development/python-modules/voluptuous-serialize/default.nix
+++ b/pkgs/development/python-modules/voluptuous-serialize/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildPythonPackage, fetchFromGitHub, voluptuous }:
+{ stdenv, buildPythonPackage, fetchFromGitHub, voluptuous, pytest, python }:
buildPythonPackage rec {
pname = "voluptuous-serialize";
@@ -15,6 +15,20 @@ buildPythonPackage rec {
voluptuous
];
+ checkInputs = [
+ pytest
+ ];
+
+ checkPhase = ''
+ ${python.interpreter} -m unittest discover -s ./tests -p ./tests/test_lib.py
+ ${python.interpreter} -m unittest discover -p tests/test_lib.py
+ ${python.interpreter} -m unittest discover
+ ${python.interpreter} -m unittest tests/test_lib.py
+ ${python.interpreter} tests/test_lib.py
+ ${python.interpreter} -m unittest
+ '';
+
meta = with stdenv.lib; {
homepage = https://github.com/balloob/voluptuous-serialize;
license = licenses.asl20; So I have no idea what more to try... |
a1bcaf3
to
b69d12c
Compare
Looking at https://github.com/balloob/voluptuous-serialize/blob/master/requirements_test.txt, it seems like the pytest should be used. I've force-pushed an appropriate change and I disabled Python 2 support because the tests fail. |
@dotlambda My python knowledge is quite limited to writing basic python because I've never done any bigger projects with it. But this looks fine to me :) |
@GrahamcOfBorg build python36Packages.voluptuous-serialize |
Success on aarch64-linux (full log) Attempted: python36Packages.voluptuous-serialize Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: python36Packages.voluptuous-serialize Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: home-assistant, python36Packages.voluptuous-serialize Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: home-assistant, python36Packages.voluptuous-serialize Partial log (click to expand)
|
@etu I just checked and I think I shouldn't have merged this. Did you read the first line of |
As you can see in https://github.com/home-assistant/home-assistant/blob/dev/requirements_all.txt#L1336, this is not a dependency of the hue components but of |
@dotlambda I have seen changes in Hmm, that might be the case that it's not specifically a hue dependency, I just know that it showed up in my logs when trying to use hue so I assumed it to be needed by hue. Then I guess it should be a dep for home-assistant overall instead of hue to be able to use the config entries thingy? |
It's always generated by I've no idea what config_entries is. Do you? |
No idea, but in the hass-config page there's a page named Integrations where it had discovered Hue. But when I pressed that button, nothing did happen because of this missing dependency. That's why I thought it was Hue related. So this dependency is needed by something, but it should probably be put somewhere else. |
I think it's loaded by https://github.com/home-assistant/home-assistant/blob/0.69.1/homeassistant/config_entries.py, so let's just add this as a dependency for Home Assistant directly. That's what I did in 47a08c1. |
Thanks, looks good 😄 |
Motivation for this change
I've tried to set up my hue bridge with home-assistant but it failed. But then I've packaged this dep and now it works:
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)cc @dotlambda @f-breidenstein