Files
factorio-learning-environment/pyproject.toml
Harshit Sharma 8143457e55
Some checks failed
Lint and Format / lint (push) Has been cancelled
Faster ci cd (#311)
* sessions based

* try out caching + no sleep

* update fixture usage

* better reset usge

* state less on tech, probably breaking change

* better fixtures + decouple resets

* use pytest-xdist w 2 servers

* using diff grouping for dep

* formatting

* formatting

* caching for image

* formatting

* formatting

* use uv

* use uv caching

* remove docker caching (its slower)

* how about 4 workers?

* no redundant resets

* parameterize

* change names

* update all_technologies_researched usage

change log:

- used uv and cache dependencies
- used 2 factorio headless server instances
- added pytest-xdist & used 2 pytest workers
- parametrized the slowest test -- `test_sleep.py` so as to balance it across workers
- clarified resets in `instance.py` so separate instances arent needed for research testing
- better fixture usage, with autouse reset
- added configure_game callback for per test file setup of inventories & research state.
- updated task abc all_technologies_researched usage, its now a param for reset
- using 4 workers instead of 2, can probably double it again lol
- pytest parameterized a slow test
- fixed redundant reset in conftest

final speedup: 9m 4s -> 1m, ≈9.07× faster
2025-08-21 17:31:28 +05:30

145 lines
3.1 KiB
TOML

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "factorio-learning-environment"
version = "0.2.2"
description = "Factorio Learning Environment"
authors = [
{name = "Jack Hopkins", email = "noreply@github.com"},
{name = "Mart Bakler", email = "noreply@github.com"},
{name = "Neel Kant", email = "contact@neelkant.io"},
{name = "Kian Kyars", email = "kiankyars@gmail.com"},
]
readme = "README.md"
requires-python = ">=3.10"
license = {text = "MIT"}
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
"python-dotenv>=1.0.1",
"pydantic>=2.10.6",
"lupa>=2.4",
"slpp>=1.2.3",
"factorio-rcon-py==1.2.1",
"construct>=2.10.70",
"pillow>=11.1.0",
"tomli",
"numpy>=2.2.3",
"gym",
"a2a-sdk",
"anthropic>=0.49.0",
"openai>=1.66.3",
"tenacity>=9.0.0",
"psycopg2>=2.9.10",
"aiohttp>=3.8.0",
"uvicorn>=0.15.0",
"gym",
"a2a-sdk",
"anthropic>=0.49.0",
"openai>=1.66.3",
"tenacity>=9.0.0",
"psycopg2>=2.9.10",
"aiohttp>=3.8.0",
"uvicorn>=0.15.0",
"pytest>=8.4.1",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"black>=23.0.0",
"isort>=5.12.0",
"rich>=14.0.0",
"questionary>=2.1.0",
"pytest-xdist>=3.8.0",
]
agents = [
"anthropic>=0.49.0",
"openai>=1.66.3",
]
cluster = [
"docker>=6.0.0",
"boto3>=1.26.0",
"opencv-python",
"pyautogui>=0.9.54",
"pillow>=10.0.0",
"psutil>=5.9.0",
"opencv-python",
"pyautogui>=0.9.54",
"pillow>=10.0.0",
"psutil>=5.9.0",
]
eval = [
"scikit-image>=0.25.2",
"psycopg2>=2.9.10",
]
all = [
"docker>=6.0.0",
"boto3>=1.26.0",
"scikit-image>=0.25.2",
]
mcp = [
"mcp[cli]",
"dulwich",
]
env = [
"anyio",
"pygame",
"neptune",
"rich",
"openai",
"scipy",
"scikit-image",
"pyautogui",
"tenacity",
"fastapi>=0.68.0",
]
[project.scripts]
fle = "fle.run:main"
[tool.hatch.version]
path = "fle/__init__.py"
[tool.hatch.build]
exclude = [
"fle/**/__pycache__",
"fle/**/*.pyc",
"fle/**/*.pyo",
"fle/**/*.pyd",
]
[tool.hatch.build.targets.wheel]
packages = ["fle"]
[tool.pytest.ini_options]
pythonpath = "fle/env"
testpaths = "tests"
python_files = "test_*.py"
[project.urls]
homepage = "https://jackhopkins.github.io/factorio-learning-environment/"
leaderboard = "https://jackhopkins.github.io/factorio-learning-environment/leaderboard/"
[[tool.uv.index]]
name = "pypi"
url = "https://pypi.org/simple"
publish-url = "https://upload.pypi.org/legacy/"
[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/legacy/"
publish-url = "https://test.pypi.org/legacy/"