Skip to content

Commit

Permalink
Merge pull request #70 from epics-extensions/unit-tests
Browse files Browse the repository at this point in the history
YAML Reader unit tests
  • Loading branch information
minijackson authored Dec 12, 2023
2 parents 45a3cd2 + 90a90bf commit 4efa3b4
Show file tree
Hide file tree
Showing 40 changed files with 345 additions and 491 deletions.
52 changes: 30 additions & 22 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,40 +26,48 @@
];
};
in {
packages.default = pkgs.poetry2nix.mkPoetryApplication {
projectDir = ./.;

packages.default = let
# Numpy 1.19.5 doesn't compile with Python3.10+
#
# This was fixed in later versions of Numpy, but Numpy >=1.20 doesn't
# support Python 3.6, which we need to support older systems.
python = pkgs.python39;
in
pkgs.poetry2nix.mkPoetryApplication {
projectDir = ./.;

inherit python;

nativeBuildInputs = with pkgs; [makeWrapper];
propagatedBuildInputs = with pkgs.python39Packages; [tkinter];
nativeBuildInputs = with pkgs; [makeWrapper];
propagatedBuildInputs = with python.pkgs; [tkinter];

overrides = pkgs.poetry2nix.overrides.withDefaults (_final: prev: {
reportlab = prev.reportlab.overridePythonAttrs (_old: {
buildInputs = with pkgs; [(freetype.overrideAttrs (_: {dontDisableStatic = true;}))];
overrides = pkgs.poetry2nix.overrides.withDefaults (_final: prev: {
reportlab = prev.reportlab.overridePythonAttrs (_old: {
buildInputs = with pkgs; [(freetype.overrideAttrs (_: {dontDisableStatic = true;}))];
});
});
});

postInstall = let
inherit (epnix.packages.x86_64-linux) epics-base;
in ''
wrapProgram $out/bin/wetest \
--set PYEPICS_LIBCA "${epics-base}/lib/linux-x86_64/libca.so"
'';
postInstall = let
inherit (epnix.packages.x86_64-linux) epics-base;
in ''
wrapProgram $out/bin/wetest \
--set PYEPICS_LIBCA "${epics-base}/lib/linux-x86_64/libca.so"
'';

doCheck = true;
doCheck = true;
checkPhase = ''
runHook preCheck
pytest
runHook postCheck
'';

meta = {
description = "Tests automation utility for EPICS";
mainProgram = "wetest";
license = epnix.lib.licenses.epics;
maintainers = with epnix.lib.maintainers; [minijackson];
meta = {
description = "Tests automation utility for EPICS";
mainProgram = "wetest";
license = epnix.lib.licenses.epics;
maintainers = with epnix.lib.maintainers; [minijackson];
};
};
};

devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [poetry python39Full];
Expand Down
170 changes: 152 additions & 18 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.dependencies]
python = ">=3.6, <4"
python = ">=3.7, <4"
PyYAML = "^6.0"
colorlog = "^6.6.0"
numpy = "^1.19.5, <1.20.0"
pyepics = "^3.5.1"
pykwalify = "^1.8.0"
reportlab = "^3.6.8"
semver = "^3.0.2"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.3"

[tool.ruff]
select = ["ALL"]
Expand Down
File renamed without changes.
Loading

0 comments on commit 4efa3b4

Please sign in to comment.