Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,17 @@ Desktop.ini
*claude*
*Claude*
*CLAUDE*

# OpenEnv-specific
# Environment outputs (logs, evaluations, etc.)
**/outputs/
outputs/

# Generated requirements files from pyproject.toml
**/server/requirements.txt.generated

# UV root lock file (env lock files should be committed)
/uv.lock
.uv/

*.backup*/
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,45 @@ my_env/
├── client.py # Implement YourEnv(HTTPEnvClient)
├── README.md # Document your environment
├── openenv.yaml # Environment manifest
├── pyproject.toml # Dependencies and package configuration
├── outputs/ # Runtime outputs (logs, evals) - gitignored
│ ├── logs/
│ └── evals/
└── server/
├── your_environment.py # Implement YourEnvironment(Environment)
├── app.py # Create FastAPI app
├── requirements.txt # Dependencies for Docker (can be generated)
└── Dockerfile # Define container image
```

#### Dependency Management

OpenEnv uses `pyproject.toml` as the primary dependency specification:

- **Environment-level `pyproject.toml`**: Each environment defines its own dependencies
- **Root-level `pyproject.toml`**: Contains shared core dependencies (fastapi, pydantic, uvicorn)
- **Server `requirements.txt`**: Can be auto-generated from `pyproject.toml` for Docker builds

**Development Workflow:**

```bash
# Install environment in editable mode
cd my_env
pip install -e .

# Or using uv (faster)
uv pip install -e .

# Run server locally without Docker
uv run server --host 0.0.0.0 --port 8000
```

**Benefits:**
- ✅ **Client-side extensions**: Modify client classes locally without repo changes
- ✅ **Better dependency management**: Clear separation between environments
- ✅ **Flexible workflows**: Use pip, uv, or Docker for different scenarios
- ✅ **CI/CD ready**: Automated dependency generation and validation

See [`src/envs/README.md`](src/envs/README.md) for a complete guide on building environments.

### For Environment Users
Expand Down
18 changes: 12 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,25 @@ build-backend = "setuptools.build_meta"

[project]
name = "openenv"
version = "0.1.0"
version = "0.1.1"
description = "A unified framework for reinforcement learning environments"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"torch>=1.9.0",
"numpy>=1.19.0",
"requests>=2.25.0",
# Core shared dependencies - minimal set required for all environments
# Heavy dependencies (torch, numpy, smolagents, etc.) should be in
# individual environment pyproject.toml files
"fastapi>=0.104.0",
"pydantic>=2.0.0",
"uvicorn>=0.24.0",
"smolagents>=1.22.0,<2",
"requests>=2.25.0",
# CLI dependencies
"typer>=0.9.0",
"rich>=13.0.0",
"pyyaml>=6.0",
"huggingface_hub>=0.20.0"
"huggingface_hub>=0.20.0",
"tomli>=2.3.0",
"tomli-w>=1.2.0",
]

[project.scripts]
Expand Down
Loading