Initialize repo
This commit is contained in:
commit
2a27949a06
10 changed files with 109 additions and 0 deletions
9
.envrc
Normal file
9
.envrc
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
# the shebang is ignored, but nice for editors
|
||||
|
||||
if type -P lorri &>/dev/null; then
|
||||
eval "$(lorri direnv)"
|
||||
else
|
||||
echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]'
|
||||
use nix
|
||||
fi
|
||||
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
*.pyc
|
||||
__pycache__/*
|
||||
.env
|
||||
result
|
||||
todo.md
|
||||
0
README.md
Normal file
0
README.md
Normal file
2
default.nix
Normal file
2
default.nix
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
pkgs.callPackage ./derivation.nix {}
|
||||
10
derivation.nix
Normal file
10
derivation.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ lib, python313Packages }:
|
||||
with python313Packages;
|
||||
buildPythonApplication {
|
||||
pname = "cereal";
|
||||
version = "0.0.1";
|
||||
propagatedBuildInputs = [ flask requests waitress];
|
||||
src = ./.;
|
||||
pyproject = true;
|
||||
build-system = [setuptools];
|
||||
}
|
||||
1
result
Symbolic link
1
result
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
/nix/store/3sidag2a6iy1mdpn341ksvmzfk1wmlma-cereal-0.0.1
|
||||
49
ruff.toml
Normal file
49
ruff.toml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
exclude = [
|
||||
".direnv",
|
||||
".git",
|
||||
".git-rewrite",
|
||||
".ipynb_checkpoints",
|
||||
".mypy_cache",
|
||||
".pytest_cache",
|
||||
".pytype",
|
||||
".ruff_cache",
|
||||
"__pypackages__",
|
||||
"result"
|
||||
]
|
||||
|
||||
line-length = 120
|
||||
indent-width = 4
|
||||
|
||||
target-version = "py313"
|
||||
|
||||
[lint]
|
||||
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
|
||||
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
|
||||
# McCabe complexity (`C901`) by default.
|
||||
select = ["E4", "E7", "E9", "F"]
|
||||
ignore = []
|
||||
|
||||
# Allow fix for all enabled rules (when `--fix`) is provided.
|
||||
fixable = ["ALL"]
|
||||
unfixable = []
|
||||
|
||||
# Allow unused variables when underscore-prefixed.
|
||||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
||||
|
||||
[format]
|
||||
quote-style = "single"
|
||||
indent-style = "space"
|
||||
skip-magic-trailing-comma = false
|
||||
line-ending = "auto"
|
||||
# Enable auto-formatting of code examples in docstrings. Markdown,
|
||||
# reStructuredText code/literal blocks and doctests are all supported.
|
||||
#
|
||||
# This is currently disabled by default, but it is planned for this
|
||||
# to be opt-out in the future.
|
||||
docstring-code-format = false
|
||||
# Set the line length limit used when formatting code snippets in
|
||||
# docstrings.
|
||||
#
|
||||
# This only has an effect when the `docstring-code-format` setting is
|
||||
# enabled.
|
||||
docstring-code-line-length = "dynamic"
|
||||
9
setup.py
Normal file
9
setup.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name='cereal',
|
||||
verison='0.0.1',
|
||||
packages=find_packages(),
|
||||
include_package_data=True,
|
||||
scripts=['./src/main.py'],
|
||||
)
|
||||
21
shell.nix
Normal file
21
shell.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ pkgs ? import <nixpkgs> {}}:
|
||||
let
|
||||
mypy = pkgs.python313.withPackages (ps: with ps; [
|
||||
requests
|
||||
flask
|
||||
waitress
|
||||
]);
|
||||
in
|
||||
with pkgs;
|
||||
mkShell {
|
||||
buildInputs = [
|
||||
mypy
|
||||
pylint
|
||||
python313Packages.ipython
|
||||
python313Packages.ruff
|
||||
python313Packages.python-lsp-server
|
||||
python313Packages.jedi-language-server
|
||||
ty
|
||||
ffmpeg
|
||||
];
|
||||
}
|
||||
3
src/main.py
Normal file
3
src/main.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
print('hello, world!')
|
||||
Loading…
Add table
Add a link
Reference in a new issue