Skip to content

Commit

Permalink
Update packaging script locations. (braintrustdata#38)
Browse files Browse the repository at this point in the history
Since we are moving the submodule to a new location internally. Also
cleanup the Makefile.
  • Loading branch information
manugoyal authored Dec 7, 2023
1 parent e5f733b commit 868eea6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 27 deletions.
28 changes: 3 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ${VENV_INITIALIZED}:
VENV_PYTHON_PACKAGES := venv/.python_packages

${VENV_PYTHON_PACKAGES}: ${VENV_INITIALIZED}
bash -c 'source venv/bin/activate && python -m pip install --upgrade pip setuptools build twine'
bash -c 'source venv/bin/activate && python -m pip install --upgrade pip setuptools build twine openai'
bash -c 'source venv/bin/activate && python -m pip install -e .[dev]'
@touch $@

Expand All @@ -32,34 +32,12 @@ develop: ${VENV_PRE_COMMIT}
fixup:
pre-commit run --all-files

.PHONY: test test-py test-js build build-py test-py publish publish-py publish-js clean docs
.PHONY: test test-py test-js

test: test-py test-js

test-py:
source env.sh && python3 -m pytest

test-js:
npm run test

build: build-py build-js

build-py:
rm -rf ./pydist/*
./scripts/prepare_readme.py py
source env.sh && python3 -m build --outdir pydist
git checkout README.md

build-js:
npm run build

publish: publish-py publish-js

publish-py: build-py
source env.sh && python3 -m twine upload pydist/autoevals-${SDK_VERSION}*

publish-js: build-js
npm publish

clean:
source env.sh && rm -rf pydist/* jsdist/*
npm install && npm run test
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"watch": "tsc --watch",
"docs": "npx typedoc --options typedoc.json js/index.ts",
"test": "jest",
"prepublishOnly": "../../scripts/node_prepublish_autoevals.py",
"postpublish": "../../scripts/node_postpublish_autoevals.py"
"prepublishOnly": "../scripts/node_prepublish_autoevals.py",
"postpublish": "../scripts/node_postpublish_autoevals.py"
},
"author": "",
"license": "MIT",
Expand Down

0 comments on commit 868eea6

Please sign in to comment.