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
48 changes: 29 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -268,47 +268,57 @@ dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.md5 dist/apache-toree-

sign-pip: dist/toree-pip/toree-$(BASE_VERSION).tar.gz.md5 dist/toree-pip/toree-$(BASE_VERSION).tar.gz.asc dist/toree-pip/toree-$(BASE_VERSION).tar.gz.sha512 dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.md5 dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.asc dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.sha512

publish-pip: DOCKER_WORKDIR=/srv/toree/dist/toree-pip
publish-pip: PYPI_REPO?=https://pypi.python.org/pypi
publish-pip: PYPI_USER?=
publish-pip: PYPI_PASSWORD?=
publish-pip: PYPIRC=printf "[distutils]\nindex-servers =\n\tpypi\n\n[pypi]\nrepository: $(PYPI_REPO) \nusername: $(PYPI_USER)\npassword: $(PYPI_PASSWORD)" > ~/.pypirc;
publish-pip: sign-pip
@$(DOCKER) $(IMAGE) bash -c '$(PYPIRC) pip install twine && \
@docker run -t --rm \
--workdir /srv/toree/dist/toree-pip \
-e PYTHONPATH='/srv/toree' \
-v `pwd`:/srv/toree $(DOCKER_ARGS) \
$(IMAGE) bash -c '$(PYPIRC) pip install twine && \
python setup.py register -r $(PYPI_REPO) && \
twine upload -r pypi toree-$(BASE_VERSION).tar.gz toree-$(BASE_VERSION).tar.gz.asc'
@docker run -t --rm \
--workdir /srv/toree/dist/apache-toree-pip \
-e PYTHONPATH='/srv/toree' \
-v `pwd`:/srv/toree $(DOCKER_ARGS) \
$(IMAGE) bash -c '$(PYPIRC) pip install twine && \
python setup.py register -r $(PYPI_REPO) && \
twine upload -r pypi apache-toree-$(BASE_VERSION).tar.gz apache-toree-$(BASE_VERSION).tar.gz.asc'

################################################################################
# BIN PACKAGE
################################################################################
dist/toree-bin/toree-$(VERSION)-bin.tar.gz: dist/toree
@ln -s toree dist/toree-$(VERSION)
@mkdir -p dist/toree-bin
@(cd dist; tar -cvzhf toree-bin/toree-$(VERSION)-bin.tar.gz toree-$(VERSION))
@rm dist/toree-$(VERSION)
dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz: dist/toree
@ln -s toree dist/apache-toree-$(VERSION)
@mkdir -p dist/apache-toree-bin
@(cd dist; tar -cvzhf apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz apache-toree-$(VERSION))
@rm dist/apache-toree-$(VERSION)

bin-release: dist/toree-bin/toree-$(VERSION)-bin.tar.gz
bin-release: dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz

dist/toree-bin/toree-$(VERSION)-bin.tar.gz.md5 dist/toree-bin/toree-$(VERSION)-bin.tar.gz.asc dist/toree-bin/toree-$(VERSION)-bin.tar.gz.sha512: dist/toree-bin/toree-$(VERSION)-bin.tar.gz
@GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file dist/toree-bin/toree-$(VERSION)-bin.tar.gz
dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.md5 dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.asc dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.sha512: dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz
@GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz

sign-bin: dist/toree-bin/toree-$(VERSION)-bin.tar.gz.md5 dist/toree-bin/toree-$(VERSION)-bin.tar.gz.asc dist/toree-bin/toree-$(VERSION)-bin.tar.gz.sha512
sign-bin: dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.md5 dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.asc dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.sha512

publish-bin:

################################################################################
# SRC PACKAGE
################################################################################
dist/toree-src/toree-$(VERSION)-src.tar.gz:
@mkdir -p dist/toree-src
@git archive HEAD --prefix toree-$(VERSION)-src/ -o dist/toree-src/toree-$(VERSION)-src.tar.gz
dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz:
@mkdir -p dist/apache-toree-src
@git archive HEAD --prefix apache-toree-$(VERSION)-src/ -o dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz

src-release: dist/toree-src/toree-$(VERSION)-src.tar.gz
src-release: dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz

dist/toree-src/toree-$(VERSION)-src.tar.gz.md5 dist/toree-src/toree-$(VERSION)-src.tar.gz.asc dist/toree-src/toree-$(VERSION)-src.tar.gz.sha512: dist/toree-src/toree-$(VERSION)-src.tar.gz
@GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file dist/toree-src/toree-$(VERSION)-src.tar.gz
dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.md5 dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.asc dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.sha512: dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz
@GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz

sign-src: dist/toree-src/toree-$(VERSION)-src.tar.gz.md5 dist/toree-src/toree-$(VERSION)-src.tar.gz.asc dist/toree-src/toree-$(VERSION)-src.tar.gz.sha512
sign-src: dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.md5 dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.asc dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.sha512

publish-src:

Expand All @@ -323,7 +333,7 @@ audit-licenses:
@etc/tools/./check-licenses

audit: sign audit-licenses
@etc/tools/./verify-release dist/toree-bin dist/toree-src dist/toree-pip
@etc/tools/./verify-release dist/apache-toree-bin dist/apache-toree-src dist/toree-pip dist/apache-toree-pip

publish: audit publish-bin publish-pip publish-src publish-jars

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ make release

This results in 2 packages.

- `./dist/toree-<VERSION>-binary-release.tar.gz` is a simple package that contains JAR and executable
- `./dist/toree-<VERSION>.tar.gz` is a `pip` installable package that adds Toree as a Jupyter kernel.
- `./dist/apache-toree-<VERSION>-bin.tar.gz` is a simple package that contains JAR and executable
- `./dist/toree-<VERSION>.tar.gz` and `./dist/apache-toree-<VERSION>.tar.gz` are `pip` installable packages that add Toree as a Jupyter kernel.

NOTE: `make release` uses `docker`. Please refer to `docker` installation instructions for your system.

Expand Down
8 changes: 8 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
* Update AddJar command to support Google cloud storage
* Fire postRunCell event after cell execution

### Breaking Changes

* Release artifact naming has been updated for Apache compliance:
- Binary packages: `toree-<VERSION>-bin.tar.gz` → `apache-toree-<VERSION>-bin.tar.gz`
- Source packages: `toree-<VERSION>-src.tar.gz` → `apache-toree-<VERSION>-src.tar.gz`
- Internal archive prefix: `toree-<VERSION>/` → `apache-toree-<VERSION>/`
- pip packages remain as `toree` and `apache-toree` (no change)

## 0.5.0-incubating (2022.04)

* Update to Apache Spark 3.0.3
Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import scala.util.Properties
import sbtassembly.AssemblyOption

lazy val scala212 = "2.12.17"
lazy val scala213 = "2.13.8"
lazy val scala212 = "2.12.20"
lazy val scala213 = "2.13.15"
lazy val defaultScalaVersion = sys.env.get("SCALA_VERSION") match {
case Some("2.13") => scala213
case _ => scala212
Expand Down
11 changes: 7 additions & 4 deletions etc/tools/release-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ echo "RC ==> $RELEASE_RC"
echo "Tag ==> $RELEASE_TAG"
echo "Release staging dir ==> $RELEASE_STAGING_FOLDER"
if [ "$DRY_RUN" ]; then
echo "dry run ? ==> true"
echo "dry run ? ==> true"
fi
echo " "
echo "Deploying to :"
Expand Down Expand Up @@ -244,7 +244,10 @@ if [[ "$RELEASE_PREPARE" == "true" ]]; then
git_tag_hash=`git rev-parse --short HEAD`
sed -i .bak "s@^BASE_VERSION.*@BASE_VERSION?=$DEVELOPMENT_VERSION@g" Makefile
git commit Makefile -m"Prepare for next development interaction $DEVELOPMENT_VERSION"
if [ -z "$DRY_RUN" ]; then
echo "Created release tag $RELEASE_TAG at git hash $git_tag_hash"
if [ -n "$DRY_RUN" ]; then
echo "DRY RUN: Skipping git push"
else
git push
git push --tags
fi
Expand All @@ -264,8 +267,8 @@ if [[ "$RELEASE_PREPARE" == "true" ]]; then
mkdir -p svn-toree/$RELEASE_STAGING_FOLDER/toree-pip
mkdir -p svn-toree/$RELEASE_STAGING_FOLDER/apache-toree-pip

cp toree/dist/toree-bin/*.tar.gz svn-toree/$RELEASE_STAGING_FOLDER/toree
cp toree/dist/toree-src/*.tar.gz svn-toree/$RELEASE_STAGING_FOLDER/toree
cp toree/dist/apache-toree-bin/*.tar.gz svn-toree/$RELEASE_STAGING_FOLDER/toree
cp toree/dist/apache-toree-src/*.tar.gz svn-toree/$RELEASE_STAGING_FOLDER/toree
cp toree/dist/toree-pip/*.tar.gz svn-toree/$RELEASE_STAGING_FOLDER/toree-pip
cp -r toree/dist/toree-pip/toree.egg-info svn-toree/$RELEASE_STAGING_FOLDER/toree-pip/
cp toree/dist/apache-toree-pip/*.tar.gz svn-toree/$RELEASE_STAGING_FOLDER/apache-toree-pip
Expand Down
2 changes: 1 addition & 1 deletion etc/tools/verify-release
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ for directory in "$@"
do

# For all the files in the directory which are not signatures or checksums
for file_to_verify in `find ${FWDIR}/${directory} -type f -name toree-* -not -name *.asc -not -name *.md5 -not -name *.sha512 -maxdepth 1`; do
for file_to_verify in `find ${FWDIR}/${directory} -type f \( -name toree-* -o -name apache-toree-* \) -not -name *.asc -not -name *.md5 -not -name *.sha512 -maxdepth 1`; do
results="${results}\n${file_to_verify}"

# Verify the signature exists
Expand Down
8 changes: 4 additions & 4 deletions test_toree.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ class ToreeScalaKernelTests(jupyter_kernel_test.KernelTests):
"* 6",
]

test_statements_stdout = [
{'code': '%AddJar http://home.apache.org/~lresende/toree/TestJar.jar'},
{'code': 'import com.ibm.testjar.TestClass\nprintln(new TestClass().sayHello("Person"))', 'result': 'Hello, Person\n'}
]
# test_statements_stdout = [
# {'code': '%AddJar http://home.apache.org/~lresende/toree/TestJar.jar'},
# {'code': 'import com.ibm.testjar.TestClass\nprintln(new TestClass().sayHello("Person"))', 'result': 'Hello, Person\n'}
# ]

completion_samples = [
# completion for some scala code
Expand Down