Skip to content

Commit

Permalink
[TOML CLEANUP]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Mar 5, 2024
1 parent b9f84bb commit cb2f86b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.DEFAULT_GOAL := all
sources = python/pydantic_core tests generate_self_schema.py wasm-preview/run_tests.py
sources = python/swarms_core tests generate_self_schema.py wasm-preview/run_tests.py

mypy-stubtest = python -m mypy.stubtest pydantic_core._pydantic_core --allowlist .mypy-stubtest-allowlist
mypy-stubtest = python -m mypy.stubtest swarms_core._main --allowlist .mypy-stubtest-allowlist

# using pip install cargo (via maturin via pip) doesn't get the tty handle
# so doesn't render color without some help
Expand All @@ -28,7 +28,7 @@ install-rust-coverage:

.PHONY: build-dev
build-dev:
@rm -f python/pydantic_core/*.so
@rm -f python/swarms_core/*.so
ifneq ($(USE_MATURIN),)
maturin develop
else
Expand All @@ -37,7 +37,7 @@ endif

.PHONY: build-prod
build-prod:
@rm -f python/pydantic_core/*.so
@rm -f python/swarms_core/*.so
ifneq ($(USE_MATURIN),)
maturin develop --release
else
Expand All @@ -46,7 +46,7 @@ endif

.PHONY: build-profiling
build-profiling:
@rm -f python/pydantic_core/*.so
@rm -f python/swarms_core/*.so
ifneq ($(USE_MATURIN),)
maturin develop --profile profiling
else
Expand All @@ -55,7 +55,7 @@ endif

.PHONY: build-coverage
build-coverage:
@rm -f python/pydantic_core/*.so
@rm -f python/swarms_core/*.so
ifneq ($(USE_MATURIN),)
RUSTFLAGS='-C instrument-coverage' maturin develop --release
else
Expand All @@ -64,7 +64,7 @@ endif

.PHONY: build-pgo
build-pgo:
@rm -f python/pydantic_core/*.so
@rm -f python/swarms_core/*.so
$(eval PROFDATA := $(shell mktemp -d))
ifneq ($(USE_MATURIN),)
RUSTFLAGS='-Cprofile-generate=$(PROFDATA)' maturin develop --release
Expand Down Expand Up @@ -99,7 +99,7 @@ lint-python:
ruff check $(sources)
ruff format --check $(sources)
$(mypy-stubtest)
griffe dump -f -d google -LWARNING -o/dev/null python/pydantic_core
griffe dump -f -d google -LWARNING -o/dev/null python/swarms_core

.PHONY: lint-rust
lint-rust:
Expand All @@ -126,7 +126,7 @@ testcov: build-coverage
coverage run -m pytest
coverage report
coverage html -d htmlcov/python
coverage-prepare html python/pydantic_core/*.so
coverage-prepare html python/swarms_core/*.so

.PHONY: all
all: format build-dev lint test
Expand Down Expand Up @@ -161,4 +161,4 @@ clean:
rm -f .coverage.*
rm -rf build
rm -rf perf.data*
rm -rf python/pydantic_core/*.so
rm -rf python/swarms_core/*.so
16 changes: 11 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = 'maturin'

[tool.poetry]
name = "swarms-core"
version = "0.0.1"
version = "0.0.2"
description = "Swarms Core - Python"
license = "MIT"
authors = ["Kye Gomez <[email protected]>"]
Expand Down Expand Up @@ -46,7 +46,12 @@ Source = 'https://github.com/kyegomez/swarms-core'
[tool.poetry.dependencies]
python = "^3.6"
swarms = "*"
zetascale = "*"

[tool.poetry.dev-dependencies]
pytest = "^6.2.4"
pytest-benchmark = "^3.4.1"
maturin = "*"


[tool.poetry.group.lint.dependencies]
ruff = "^0.1.6"
Expand Down Expand Up @@ -79,9 +84,10 @@ preview = true

[tool.maturin]
python-source = "python"
module-name = "pydantic_core._pydantic_core"
module-name = "swarms_core._main"
bindings = 'pyo3'
features = ["pyo3/extension-module"]
include = [{ path = "path/**/*", format = "sdist" }]

[tool.ruff.lint]
extend-select = ['Q', 'RUF100', 'C90', 'I']
Expand All @@ -90,7 +96,7 @@ extend-ignore = [
]
flake8-quotes = {inline-quotes = 'single', multiline-quotes = 'double'}
mccabe = { max-complexity = 13 }
isort = { known-first-party = ['pydantic_core', 'tests'] }
isort = { known-first-party = ['swarms_core', 'tests'] }

[tool.ruff.format]
quote-style = 'single'
Expand All @@ -109,7 +115,7 @@ addopts = [
]

[tool.coverage.run]
source = ['pydantic_core']
source = ['swarms_core']
branch = true

[tool.coverage.report]
Expand Down
File renamed without changes.
Empty file added python/swarms_core/_main.py
Empty file.

0 comments on commit cb2f86b

Please sign in to comment.