-
-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
home-assistant: support ista_ecotrend component #326492
Conversation
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.
Please reformat all new python-packages with nixfmt-rfc-style.
src = fetchzip { | ||
url = "https://github.com/leeyoshinari/Small_Tool/releases/download/${version}/pyjson-${version}.tar.gz"; | ||
sha256 = "sha256-KF03x5O8hJICdd2RNMmTCEVl19tcVSR4fYta3Sue9e8="; | ||
}; |
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.
Use fetchFromGitHub
and sourceRoot
instead. That way we get a fetcher that supports automatic updates.
]; | ||
|
||
pythonImportsCheck = [ "pyjson" ]; |
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.
]; | |
pythonImportsCheck = [ "pyjson" ]; | |
]; | |
doCheck = false; # no tests | |
pythonImportsCheck = [ "pyjson" ]; |
owner = "Ludy87"; | ||
repo = "pyecotrend-ista"; | ||
rev = "refs/tags/${version}"; | ||
sha256 = "sha256-NAJ3/37dlwOiP1cilxfADUcuUt1VKF+eo/3JKgSUo3M="; |
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.
sha256 = "sha256-NAJ3/37dlwOiP1cilxfADUcuUt1VKF+eo/3JKgSUo3M="; | |
hash = "sha256-NAJ3/37dlwOiP1cilxfADUcuUt1VKF+eo/3JKgSUo3M="; |
|
||
nativeCheckInputs = [ | ||
pytestCheckHook | ||
pytest-cov |
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.
We don't care about test coverage. Remove the dependency and patch it out
src = {
...
};
postPatch = ''
sed -i "/addopts =/d" pyproject.toml
'';
https://github.com/Ludy87/pyecotrend-ista/blob/main/pyproject.toml#L24
]; | ||
|
||
pythonImportsCheck = [ "pytest_dataset" ]; |
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.
]; | |
pythonImportsCheck = [ "pytest_dataset" ]; | |
]; | |
doCheck = false; # no tests | |
pythonImportsCheck = [ "pytest_dataset" ]; |
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.
The commit messages should be e.g. python312Packages.pyjson: init at 1.4.5
.
|
||
postPatch = '' | ||
substituteInPlace setup.py \ | ||
--replace-warn "setuptools_scm ~= 6.0" "setuptools_scm >= 6.0" |
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.
--replace-warn "setuptools_scm ~= 6.0" "setuptools_scm >= 6.0" | |
--replace-fail "setuptools_scm ~= 6.0" "setuptools_scm >= 6.0" |
''; | ||
|
||
build-system = [ | ||
setuptools |
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.
setuptools |
redundant
9d25372
to
6a0844f
Compare
meta = { | ||
changelog = "https://github.com/leeyoshinari/Small_Tool/releases/tag/${version}"; | ||
description = "Compare the similarities between two JSONs"; | ||
homepage = "https://github.com/leeyoshinari/Small_Tool"; |
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.
could be
homepage = "https://github.com/leeyoshinari/Small_Tool"; | |
homepage = "https://github.com/leeyoshinari/Small_Tool/tree/master/pyjson"; |
but that's optional.
version = "0.3.2"; | ||
pyproject = true; | ||
|
||
src = fetchPypi { |
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.
If you want you can ask upstream to tag their releases.
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.
Currently looking into how hard it would be to get pyecotrend-ista
to use pytest-datadir
instead of pytest-dataset
.
6a0844f
to
56e519f
Compare
I opened a PR upstream to remove the dependency on |
56e519f
to
80dd59f
Compare
Alright, the PR is through and upstream has cut a new release, completely removing the dependency. |
Description of changes
This adds all relevant packages for supporting the ista EcoTrend Home Assistant integration. Since this is my first contribution, I have also added myself as a maintainer.
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.