Skip to content

Commit

Permalink
things build...
Browse files Browse the repository at this point in the history
  • Loading branch information
codekansas committed Nov 23, 2024
1 parent a9e6a35 commit e707b89
Show file tree
Hide file tree
Showing 12 changed files with 589 additions and 55 deletions.
6 changes: 6 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[target.aarch64-apple-darwin]

rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
prost-build = "0.12"

[workspace]
members = ["python"]
members = ["python/krec/bindings"]
86 changes: 86 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
[tool.black]

line-length = 120
target-version = ["py311"]
include = '\.pyi?$'

[tool.pytest.ini_options]

addopts = "-rx -rf -x -q --full-trace"
testpaths = ["tests"]

markers = [
"slow: Marks test as being slow",
]

[tool.mypy]

pretty = true
show_column_numbers = true
show_error_context = true
show_error_codes = true
show_traceback = true
disallow_untyped_defs = true
strict_equality = true
allow_redefinition = true

warn_unused_ignores = true
warn_redundant_casts = true

incremental = true
namespace_packages = false

[[tool.mypy.overrides]]

module = [
"setuptools",
"setuptools_rust",
]
ignore_missing_imports = true

[[tool.mypy.overrides]]

module = ["krec.bindings"]

disable_error_code = ["no-untyped-def"]

[tool.isort]

profile = "black"

[tool.ruff]

line-length = 120
target-version = "py310"

[tool.ruff.lint]

select = ["ANN", "D", "E", "F", "I", "N", "PGH", "PLC", "PLE", "PLR", "PLW", "W"]

ignore = [
"ANN101", "ANN102",
"D101", "D102", "D103", "D104", "D105", "D106", "D107",
"N812", "N817",
"PLR0911", "PLR0912", "PLR0913", "PLR0915", "PLR2004",
"PLW0603", "PLW2901",
]

dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[tool.ruff.lint.per-file-ignores]

"__init__.py" = ["E402", "F401", "F403", "F811"]

[tool.ruff.lint.isort]

known-first-party = ["krec", "tests"]
combine-as-imports = true

[tool.ruff.lint.pydocstyle]

convention = "google"

[build-system]

requires = ["setuptools>=42", "wheel", "setuptools-rust>=1.5.2"]
build-backend = "setuptools.build_meta"
14 changes: 0 additions & 14 deletions python/Cargo.toml

This file was deleted.

Empty file added python/krec/__init__.py
Empty file.
16 changes: 16 additions & 0 deletions python/krec/bindings/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "bindings"
version = "0.1.0"
edition = "2021"

[lib]
name = "bindings"
crate-type = ["cdylib", "rlib"]

[dependencies]
pyo3 = { version = ">= 0.21", features = ["extension-module"] }
pyo3-stub-gen = ">= 0.6"
tracing = "0.1"

# Workspace packages.
krec = { version = "0.1.0", path = "../../.." }
Loading

0 comments on commit e707b89

Please sign in to comment.