Skip to content

Commit

Permalink
Update pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
kyegomez authored Dec 27, 2024
1 parent a3879c5 commit 75b1968
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "swarms"
version = "6.8.0"
version = "6.8.1"
description = "Swarms - TGSC"
license = "MIT"
authors = ["Kye Gomez <[email protected]>"]
Expand Down

1 comment on commit 75b1968

@jmikedupont2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To reduce the install footprint and make the large packages optional, you can utilize Poetry's extras feature. Extras allow you to specify optional dependencies that can be installed only when needed. Here's how you can modify your pyproject.toml to make the large packages optional:

  1. Uncomment the [tool.poetry.extras] section and list the large packages as optional dependencies.
  2. Use these optional dependencies only when needed.

Here is your modified pyproject.toml:

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "swarms"
version = "6.8.3"
description = "Swarms - TGSC"
license = "MIT"
authors = ["Kye Gomez <[email protected]>"]
homepage = "https://github.com/kyegomez/swarms"
documentation = "https://docs.swarms.world"
readme = "README.md"
repository = "https://github.com/kyegomez/swarms"
keywords = [
    "artificial intelligence",
    "deep learning",
    "optimizers",
    "Prompt Engineering",
    "swarms",
    "agents",
    "llms",
    "transformers",
    "multi-agent",
    "swarms of agents",
    "Enterprise-Grade Agents",
    "Production-Grade Agents",
    "Agents",
    "Multi-Grade-Agents",
    "Swarms",
    "Transformers",
    "LLMs",
    "Prompt Engineering",
    "Agents",
    "Generative Agents",
    "Generative AI",
    "Agent Marketplace",
    "Agent Store",
    "quant",
    "finance",
    "algorithmic trading",
    "portfolio optimization",
    "risk management",
    "financial modeling",
    "machine learning for finance",
    "natural language processing for finance",
]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3.10",
]

[tool.poetry.dependencies]
python = ">=3.10,<4.0"
asyncio = ">=3.4.3,<4.0"
toml = "*"
pypdf = "5.1.0"
swarm-models = "*"
loguru = "*"
pydantic = "*"
tenacity = "*"
psutil = "*"
sentry-sdk = "*"
python-dotenv = "*"
PyYAML = "*"
docstring_parser = "0.16"
tiktoken = "*"
networkx = "*"
aiofiles = "*"
clusterops = "*"
rich = "*"

[tool.poetry.scripts]
swarms = "swarms.cli.main:main"

[tool.poetry.group.lint.dependencies]
black = ">=23.1,<25.0"
ruff = ">=0.5.1,<0.8.5"
types-toml = "^0.10.8.1"
types-pytz = ">=2023.3,<2025.0"
types-chardet = "^5.0.4.6"
mypy-protobuf = "^3.0.0"

[tool.poetry.group.test.dependencies]
pytest = "^8.1.1"

[tool.poetry.extras]
# Extra for NLP-related functionalities
nlp = [
    "torch>=2.1.1,<3.0",
    "transformers>=4.39.0,<5.0.0",
    "sentence-transformers",
    "swarm-models",
]

# Extra for database-related functionalities
db = ["chromadb"]

# All optional dependencies for convenience
all = [
    "torch>=2.1.1,<3.0",
    "transformers>=4.39.0,<5.0.0",
    "sentence-transformers",
    "chromadb",
    "swarm-models"
]

[tool.ruff]
line-length = 70

[tool.black]
target-version = ["py38"]
line-length = 70
include = '\.pyi?$'
exclude = '''
/(
    \.git
  | \.hg
  | \.mypy_cache
  | \.tox
  | \.venv
  | _build
  | buck-out
  | build
  | dist
  | docs
)/
'''

With this setup, you can install the base dependencies using:

poetry install

And you can install additional optional dependencies as needed:

poetry install --extras "nlp"

or

poetry install --extras "db"

or all optional dependencies:

poetry install --extras "all"

This will help reduce the default install footprint by only including essential dependencies.

Please sign in to comment.