Skip to content

Commit

Permalink
Convert ICE into a Python package (oughtinc#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
lslunis authored Nov 28, 2022
2 parents 350a6a5 + a1313f3 commit 888f3e1
Show file tree
Hide file tree
Showing 75 changed files with 2,000 additions and 7,747 deletions.
23 changes: 0 additions & 23 deletions .devcontainer/devcontainer.json

This file was deleted.

1 change: 0 additions & 1 deletion .dockerignore

This file was deleted.

61 changes: 0 additions & 61 deletions .github/workflows/deploy-preview.yml

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows/deploy-prod.yml

This file was deleted.

31 changes: 11 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,27 @@ on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"] # TODO: other python versions
name: Tests
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
driver-opts: network=host
python-version: ${{ matrix.python-version }}

- name: Build ICE
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
push: false
load: true
cache-from: |
type=gha, scope=dev
cache-to: |
type=gha, scope=dev
tags: |
ice:latest
- name: Install ICE
run: |
pip install -U pip
pip install .[dev]
- name: Run all tests
run: scripts/run-tests-action.sh
run: pytest --cov . -x
env:
COMPOSE_DOCKER_CLI_BUILD: "1"
DOCKER_BUILDKIT: "1"
COMPOSE_IMAGE: ice:latest
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_ORG_ID: ${{ secrets.OPENAI_ORG_ID }}
OUGHT_INFERENCE_API_KEY: ${{ secrets.OUGHT_INFERENCE_API_KEY }}
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# Since these ignore rules are shared between Git and Docker, every rule should take one of three forms:
# **/SOME_PATTERN
# /SOME_PATTERN
# !/SOME_PATTERN

**/__pycache__
**/.DS_Store
**/.vscode
**/*.egg-info
**/*.pickle
**/*.pt
**/*.sqlite
Expand All @@ -14,13 +10,17 @@
/.git
/.mypy_cache
/.pre-commit-home
/build/
/data
/dist/
/ice/contrib/*/
/ice/routes/ui/
/ice/version.py
/papers/*.pdf
/papers/*.txt
!/papers/keenan-2018-tiny.txt
!/papers/keenan-2018.pdf
/store
/ui/.next/
/ui/node_modules
/ui/public/traces/*.jsonl
/venv/
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,32 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.1] - 2022-11-23

### Added

- Environment variable defaults are now read from `$OUGHT_ICE_DIR/.env`.

### Fixed

- When running a recipe, the trace url is no longer printed with the wrong port.

## [0.3.0] - 2022-11-23

### Added

- When running a recipe, the trace server now starts automatically.

### Changed

- **Breaking change**: ICE no longer uses Docker.
- **Breaking change**: Python package dependencies are now listed in `setup.cfg`.
- **Breaking change**: ICE data is now stored in `~/.ought-ice` by default. This can be customized by setting the `OUGHT_ICE_DIR` environment variable.

### Removed

- **Breaking change**: Removed most of `scripts/`.

## [0.2.0] - 2022-10-07

### Added
Expand Down
51 changes: 0 additions & 51 deletions Dockerfile

This file was deleted.

3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Include the files created by `npm run build`.
# The `*` just means include everything under the given directory.
recursive-include ice/routes/ui *
Loading

0 comments on commit 888f3e1

Please sign in to comment.