housekeeping, update poetry and flake.nix
This commit is contained in:
14
.travis.yml
14
.travis.yml
@@ -1,14 +0,0 @@
|
||||
language: python
|
||||
python:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
# command to install dependencies
|
||||
install: "poetry install"
|
||||
# command to run tests
|
||||
script:
|
||||
- bandit -c bandit.yaml -r src/python3
|
||||
- pytest --black --isort --pylint --mypy --flake8 --cov=pyrad3
|
||||
after_success:
|
||||
- coveralls
|
||||
|
||||
22
default.nix
22
default.nix
@@ -1,22 +0,0 @@
|
||||
{ buildPythonPackage, lib, pytest, }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyrad3";
|
||||
version = "3.0.0";
|
||||
|
||||
src = "./.";
|
||||
|
||||
checkInputs = [ pytest ];
|
||||
|
||||
checkPhase = ''
|
||||
pytest
|
||||
'';
|
||||
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python RADIUS Implementation";
|
||||
homepage = "";
|
||||
license = [licenses.mit licenses.apache2];
|
||||
maintainers = [ maintainers.lvkm ];
|
||||
};
|
||||
}
|
||||
43
flake.lock
generated
Normal file
43
flake.lock
generated
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1623875721,
|
||||
"narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "f7e004a55b120c02ecb6219596820fcd32ca8772",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1626852498,
|
||||
"narHash": "sha256-lOXUJvi0FJUXHTVSiC5qsMRtEUgqM4mGZpMESLuGhmo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "16105403bdd843540cbef9c63fc0f16c1c6eaa70",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
29
flake.nix
Normal file
29
flake.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, ... }:
|
||||
flake-utils.lib.eachDefaultSystem(system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in rec {
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
poetry
|
||||
(python3.withPackages (ps:
|
||||
with ps; [
|
||||
black
|
||||
isort
|
||||
pylint
|
||||
bandit
|
||||
]))
|
||||
bashInteractive
|
||||
];
|
||||
# shellHook = ''
|
||||
# PYTHONPATH=$PYTHONPATH:$(pwd)
|
||||
# '';
|
||||
};
|
||||
});
|
||||
}
|
||||
795
poetry.lock
generated
795
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -53,7 +53,6 @@ pytest-flake8 = "^1.0"
|
||||
pytest-isort = "^1.1.0"
|
||||
pytest-mypy = "^0.7"
|
||||
pytest-pylint = "^0.17"
|
||||
pytest-xdist = "^2.1.0"
|
||||
|
||||
|
||||
[tool.black]
|
||||
|
||||
38
shell.nix
38
shell.nix
@@ -1,38 +0,0 @@
|
||||
let pkgs = import <nixpkgs> { };
|
||||
|
||||
in pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
git
|
||||
nixfmt
|
||||
freeradius
|
||||
gnumake
|
||||
python3
|
||||
python37
|
||||
python37Packages.virtualenv
|
||||
python38
|
||||
python38Packages.virtualenv
|
||||
python39
|
||||
python39Packages.virtualenv
|
||||
python3Packages.bandit
|
||||
python3Packages.black
|
||||
python3Packages.coveralls
|
||||
python3Packages.pep8-naming
|
||||
python3Packages.poetry
|
||||
python3Packages.pygments
|
||||
python3Packages.pytest
|
||||
python3Packages.pytest-black
|
||||
python3Packages.pytestcov
|
||||
python3Packages.pytest-flake8
|
||||
python3Packages.pytest-isort
|
||||
python3Packages.pytest-mypy
|
||||
python3Packages.pytest-pylint
|
||||
python3Packages.sphinx
|
||||
python3Packages.pytoml # needed for isort
|
||||
python3Packages.tox
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
export PYTHONPATH=${./src}:$PYTHONPATH
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user