-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
262 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k=" | ||
|
||
use devenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
{ | ||
"nodes": { | ||
"devenv": { | ||
"locked": { | ||
"dir": "src/modules", | ||
"lastModified": 1732585607, | ||
"owner": "cachix", | ||
"repo": "devenv", | ||
"rev": "a520f05c40ebecaf5e17064b27e28ba8e70c49fb", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"dir": "src/modules", | ||
"owner": "cachix", | ||
"repo": "devenv", | ||
"type": "github" | ||
} | ||
}, | ||
"flake-compat": { | ||
"flake": false, | ||
"locked": { | ||
"lastModified": 1696426674, | ||
"owner": "edolstra", | ||
"repo": "flake-compat", | ||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "edolstra", | ||
"repo": "flake-compat", | ||
"type": "github" | ||
} | ||
}, | ||
"gitignore": { | ||
"inputs": { | ||
"nixpkgs": [ | ||
"pre-commit-hooks", | ||
"nixpkgs" | ||
] | ||
}, | ||
"locked": { | ||
"lastModified": 1709087332, | ||
"owner": "hercules-ci", | ||
"repo": "gitignore.nix", | ||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "hercules-ci", | ||
"repo": "gitignore.nix", | ||
"type": "github" | ||
} | ||
}, | ||
"nixpkgs": { | ||
"locked": { | ||
"lastModified": 1716977621, | ||
"owner": "cachix", | ||
"repo": "devenv-nixpkgs", | ||
"rev": "4267e705586473d3e5c8d50299e71503f16a6fb6", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "cachix", | ||
"ref": "rolling", | ||
"repo": "devenv-nixpkgs", | ||
"type": "github" | ||
} | ||
}, | ||
"nixpkgs-stable": { | ||
"locked": { | ||
"lastModified": 1731797254, | ||
"owner": "NixOS", | ||
"repo": "nixpkgs", | ||
"rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "NixOS", | ||
"ref": "nixos-24.05", | ||
"repo": "nixpkgs", | ||
"type": "github" | ||
} | ||
}, | ||
"nixpkgs-unstable": { | ||
"locked": { | ||
"lastModified": 1732238832, | ||
"owner": "nixos", | ||
"repo": "nixpkgs", | ||
"rev": "8edf06bea5bcbee082df1b7369ff973b91618b8d", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "nixos", | ||
"ref": "nixpkgs-unstable", | ||
"repo": "nixpkgs", | ||
"type": "github" | ||
} | ||
}, | ||
"pre-commit-hooks": { | ||
"inputs": { | ||
"flake-compat": "flake-compat", | ||
"gitignore": "gitignore", | ||
"nixpkgs": [ | ||
"nixpkgs" | ||
], | ||
"nixpkgs-stable": "nixpkgs-stable" | ||
}, | ||
"locked": { | ||
"lastModified": 1732021966, | ||
"owner": "cachix", | ||
"repo": "pre-commit-hooks.nix", | ||
"rev": "3308484d1a443fc5bc92012435d79e80458fe43c", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "cachix", | ||
"repo": "pre-commit-hooks.nix", | ||
"type": "github" | ||
} | ||
}, | ||
"root": { | ||
"inputs": { | ||
"devenv": "devenv", | ||
"nixpkgs": "nixpkgs", | ||
"nixpkgs-unstable": "nixpkgs-unstable", | ||
"pre-commit-hooks": "pre-commit-hooks" | ||
} | ||
} | ||
}, | ||
"root": "root", | ||
"version": 7 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{ | ||
pkgs, | ||
lib, | ||
config, | ||
inputs, | ||
... | ||
}: | ||
|
||
let | ||
unstablePkgs = import inputs.nixpkgs-unstable { system = pkgs.stdenv.system; }; | ||
rosettaPkgs = | ||
if unstablePkgs.stdenv.isDarwin && unstablePkgs.stdenv.isAarch64 then | ||
unstablePkgs.pkgsx86_64Darwin | ||
else | ||
unstablePkgs; | ||
pyp = unstablePkgs.python312Packages; | ||
in | ||
{ | ||
|
||
packages = [ | ||
pkgs.git | ||
rosettaPkgs.ghdl | ||
pkgs.gtkwave | ||
pyp.python-lsp-server | ||
pyp.pylsp-mypy | ||
pyp.pylsp-rope | ||
unstablePkgs.mypy | ||
unstablePkgs.ruff | ||
|
||
]; | ||
|
||
languages.python = { | ||
enable = true; | ||
package = unstablePkgs.python312; | ||
uv.enable = true; | ||
uv.package = unstablePkgs.uv; | ||
uv.sync.enable = true; | ||
uv.sync.allExtras = true; | ||
}; | ||
|
||
tasks = { | ||
"bash:link_uv_lock" = { | ||
exec = "ln -s uvPython3.12.lock uv.lock"; | ||
before = ["devenv:enterShell"]; | ||
status = "[ -L uv.lock ]"; | ||
}; | ||
}; | ||
|
||
pre-commit.hooks = { | ||
shellcheck.enable = true; | ||
ripsecrets.enable = true; # don't commit secrets | ||
ruff.enable = true; # lint and automatically fix simple problems/reformat | ||
taplo.enable = true; # reformat toml | ||
nixfmt-rfc-style.enable = true; # reformat nix | ||
ruff-format.enable = true; | ||
mypy = { | ||
enable = false; | ||
}; # check type annotations | ||
end-of-file-fixer.enable = true; | ||
commitizen.enable = true; # help adhering to commit style guidelines | ||
check-toml.enable = true; # check toml syntax | ||
check-case-conflicts.enable = true; | ||
check-added-large-files.enable = true; | ||
}; | ||
|
||
enterTest = | ||
let | ||
runCommandWithPython = | ||
cmd: | ||
( | ||
version: | ||
"UV_PROJECT_ENVIRONMENT=.venv_${version} uv run --no-env-file --isolated --noprogress --python ${version} ${cmd}" | ||
); | ||
runPytest = runCommandWithPython "pytest"; | ||
in | ||
'' | ||
rm uv.lock | ||
if [ -f | ||
ln -s uvPython3.11.lock uv.lock | ||
${runPytest "python3.11"} | ||
rm uv.lock | ||
ln -s uvPython3.12.lock uv.lock | ||
uv run --python python3.12 pytest | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json | ||
inputs: | ||
nixpkgs: | ||
url: github:cachix/devenv-nixpkgs/rolling | ||
nixpkgs-unstable: | ||
url: github:nixos/nixpkgs/nixpkgs-unstable | ||
# If you're using non-OSS software, you can set allowUnfree to true. | ||
# allowUnfree: true | ||
|
||
# If you're willing to use a package that's vulnerable | ||
# permittedInsecurePackages: | ||
# - "openssl-1.1.1w" | ||
|
||
# If you have more than one devenv you can merge them | ||
#imports: | ||
# - ./backend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,20 +3,31 @@ name = "elasticai.creator" | |
version = "0.59.2" | ||
description = "Design, train and compile neural networks optimized specifically for FPGAs." | ||
readme = "README.md" | ||
repository = "https://github.com/es-ude/elastic-ai.creator" | ||
author = ["Department Embedded Systems - University Duisburg Essen"] | ||
license = "MIT" | ||
authors = [ | ||
{name = "Intelligent Embedded Systems - University Duisburg Essen"}, | ||
] | ||
|
||
maintainers = [ | ||
{name = "Lukas Einhaus", email="[email protected]"}, | ||
{name = "Julian Hoever", email="[email protected]"}, {name="Leo Buron", email="[email protected]"} | ||
] | ||
|
||
dependencies = [ | ||
"torch>=1.11", | ||
"numpy>=1.23.0", | ||
] | ||
requires-python = ">=3.10" | ||
keywords = ["fpga", "embedded", "hw accelerators", "neural networks", "embedded ai", "tinyml"] | ||
repository = "https://github.com/es-ude/elastic-ai.creator" | ||
|
||
[dependency-groups] | ||
dev = [ | ||
"black>=24.10.0", | ||
"mypy>=1.13.0", | ||
"pylint>=3.3.1", | ||
"pytest>=8.3.3", | ||
"ruff>=0.8.0", | ||
"semantic-release>=0.1.0", | ||
] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
uv.lock |