From 2584039b24eb472c0fac721a2e382af25ff75742 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Mon, 22 Jun 2020 12:14:47 -0400 Subject: [PATCH 1/6] Use setuptools_scm for version plus a few other modernizations --- .gitignore | 3 +- Dockerfile | 2 +- MANIFEST.in | 1 - Makefile | 54 +- Pipfile | 27 + Pipfile.lock | 892 ++++++++++++++++++++++++++++++++++ pyproject.toml | 9 + rsconnect_jupyter/__init__.py | 6 +- setup.cfg | 25 + setup.py | 46 +- 10 files changed, 987 insertions(+), 78 deletions(-) create mode 100644 Pipfile create mode 100644 Pipfile.lock create mode 100644 pyproject.toml diff --git a/.gitignore b/.gitignore index ef221d66..a55507df 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ /*.eggs .DS_Store .vagrant -/rsconnect_jupyter/static/version.json \ No newline at end of file +/rsconnect_jupyter/static/version.json +/rsconnect_jupyter/version.py diff --git a/Dockerfile b/Dockerfile index 3cb70f05..72bd8faa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,4 +19,4 @@ RUN conda update conda USER ${NB_UID}:${NB_GID} RUN bash -c 'cd /home/builder \ - && conda create --yes --channel conda-forge --name py${PY_VERSION/./} python=${PY_VERSION} jupyter numpy matplotlib setuptools pip' + && conda create --yes --channel conda-forge --name py${PY_VERSION/./} python=${PY_VERSION} jupyter numpy matplotlib setuptools pip pipenv' diff --git a/MANIFEST.in b/MANIFEST.in index 2828faad..8929030b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,4 +3,3 @@ include rsconnect_jupyter/static/*.js include rsconnect_jupyter/static/*.json include rsconnect_jupyter/static/main.css include rsconnect_jupyter/static/images/*.png -include rsconnect_jupyter/version.txt diff --git a/Makefile b/Makefile index 7319557c..0ff42b81 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,7 @@ NB_UID=$(shell id -u) NB_GID=$(shell id -g) IMAGE=rstudio/rsconnect-jupyter-py -VERSION=$(shell cat rsconnect_jupyter/version.txt) -VERSION_BUILD=${VERSION}.$(shell printenv BUILD_NUMBER || echo 9999) +VERSION = $(shell pipenv run python setup.py --version) PORT = $(shell printenv PORT || echo 9999) clean: @@ -30,7 +29,6 @@ launch: -e NB_UID=$(NB_UID) \ -e NB_GID=$(NB_GID) \ -e PY_VERSION=$(PY_VERSION) \ - -e BUILD_NUMBER=$(BUILD_NUMBER) \ -p :$(PORT):9999 \ $(DOCKER_IMAGE) \ /rsconnect_jupyter/run.sh $(TARGET) @@ -58,22 +56,22 @@ test-selenium: dist: version-frontend # wheels don't get built if _any_ file it tries to touch has a timestamp < 1980 # (system files) so use the current timestamp as a point of reference instead - SOURCE_DATE_EPOCH="$(shell date +%s)"; python setup.py sdist bdist_wheel + SOURCE_DATE_EPOCH="$(shell date +%s)"; pipenv run python setup.py sdist bdist_wheel package: make DOCKER_IMAGE=$(IMAGE)3 PY_VERSION=3 TARGET=dist launch run: # link python package - python setup.py develop + pipenv install --dev # install rsconnect_jupyter as a jupyter extension - jupyter-nbextension install --symlink --user --py rsconnect_jupyter + pipenv run jupyter-nbextension install --symlink --user --py rsconnect_jupyter # enable js extension - jupyter-nbextension enable --py rsconnect_jupyter + pipenv run jupyter-nbextension enable --py rsconnect_jupyter # enable python extension - jupyter-serverextension enable --py rsconnect_jupyter + pipenv run jupyter-serverextension enable --py rsconnect_jupyter # start notebook - jupyter-notebook -y --notebook-dir=/notebooks --ip='0.0.0.0' --port=9999 --no-browser --NotebookApp.token='' + pipenv run jupyter-notebook -y --notebook-dir=/notebooks --ip='0.0.0.0' --port=9999 --no-browser --NotebookApp.token='' shell: bash @@ -85,31 +83,31 @@ dist-run%: make DOCKER_IMAGE=$(IMAGE)$* PY_VERSION=$* TARGET=dist-run launch dist-run: dist - pip install dist/rsconnect_jupyter-$(VERSION_BUILD)-py2.py3-none-any.whl - jupyter-nbextension install --symlink --user --py rsconnect_jupyter - jupyter-nbextension enable --py rsconnect_jupyter - jupyter-serverextension enable --py rsconnect_jupyter - jupyter-notebook -y --notebook-dir=/notebooks --ip='0.0.0.0' --port=9999 --no-browser --NotebookApp.token='' + pipenv run pip install dist/rsconnect_jupyter-$(VERSION)-py2.py3-none-any.whl + pipenv run jupyter-nbextension install --symlink --user --py rsconnect_jupyter + pipenv run jupyter-nbextension enable --py rsconnect_jupyter + pipenv run jupyter-serverextension enable --py rsconnect_jupyter + pipenv run jupyter-notebook -y --notebook-dir=/notebooks --ip='0.0.0.0' --port=9999 --no-browser --NotebookApp.token='' pypi-run%: make DOCKER_IMAGE=$(IMAGE)$* PY_VERSION=$* TARGET=pypi-run launch pypi-run: - pip install rsconnect_jupyter==$(VERSION_BUILD) - jupyter-nbextension install --symlink --user --py rsconnect_jupyter - jupyter-nbextension enable --py rsconnect_jupyter - jupyter-serverextension enable --py rsconnect_jupyter - jupyter-notebook -y --notebook-dir=/notebooks --ip='0.0.0.0' --port=9999 --no-browser --NotebookApp.token='' + pipenv run pip install rsconnect_jupyter==$(VERSION) + pipenv run jupyter-nbextension install --symlink --user --py rsconnect_jupyter + pipenv run jupyter-nbextension enable --py rsconnect_jupyter + pipenv run jupyter-serverextension enable --py rsconnect_jupyter + pipenv run jupyter-notebook -y --notebook-dir=/notebooks --ip='0.0.0.0' --port=9999 --no-browser --NotebookApp.token='' pypi-test-run%: make DOCKER_IMAGE=$(IMAGE)$* PY_VERSION=$* TARGET=pypi-test-run launch pypi-test-run: - pip install --index-url https://test.pypi.org/simple/ rsconnect_jupyter==$(VERSION_BUILD) - jupyter-nbextension install --symlink --user --py rsconnect_jupyter - jupyter-nbextension enable --py rsconnect_jupyter - jupyter-serverextension enable --py rsconnect_jupyter - jupyter-notebook -y --notebook-dir=/notebooks --ip='0.0.0.0' --port=9999 --no-browser --NotebookApp.token='' + pipenv run pip install --index-url https://test.pypi.org/simple/ rsconnect_jupyter==$(VERSION) + pipenv run jupyter-nbextension install --symlink --user --py rsconnect_jupyter + pipenv run jupyter-nbextension enable --py rsconnect_jupyter + pipenv run jupyter-serverextension enable --py rsconnect_jupyter + pipenv run jupyter-notebook -y --notebook-dir=/notebooks --ip='0.0.0.0' --port=9999 --no-browser --NotebookApp.token='' build/mock-connect/bin/flask: bash -c '\ @@ -143,10 +141,10 @@ endif ## Inside Jenkins (when JOB_NAME is defined), we are in the right type of ## Docker container. Otherwise, launch pandoc inside a ## rstudio/connect:docs container. -BUILD_DOC=env VERSION=${VERSION_BUILD} ./docs/build-doc.sh +BUILD_DOC=env VERSION=${VERSION} ./docs/build-doc.sh ifeq (${JOB_NAME},) BUILD_DOC=docker run --rm=true ${DOCKER_RUN_AS} \ - -e VERSION=${VERSION_BUILD} \ + -e VERSION=${VERSION} \ ${DOCKER_ARGS} \ -v $(CURDIR):/rsconnect_jupyter \ -w /rsconnect_jupyter \ @@ -160,8 +158,8 @@ docs-build: ${BUILD_DOC} -dist/rsconnect-jupyter-${VERSION_BUILD}.pdf: docs/README.md docs/*.gif +dist/rsconnect-jupyter-${VERSION}.pdf: docs/README.md docs/*.gif ${BUILD_DOC} version-frontend: - echo '{ "version": "${VERSION}"}' > rsconnect_jupyter/static/version.json + printf '{"version":"%s"}\n' $(VERSION) >rsconnect_jupyter/static/version.json diff --git a/Pipfile b/Pipfile new file mode 100644 index 00000000..eee54da8 --- /dev/null +++ b/Pipfile @@ -0,0 +1,27 @@ +[[source]] +name = "pypi" +url = "https://pypi.org/simple" +verify_ssl = true + +[dev-packages] +black = "*" +coverage = "*" +flake8 = "*" +importlib-metadata = "*" +ipython = "*" +pytest = "*" +pytest-cov = "*" +setuptools_scm = "*" +toml = "*" +twine = "*" +wheel = "*" + +[packages] +nbconvert = ">=5.0" +nbformat = "*" +notebook = "*" +rsconnect-python = "1.5.0b1" +six = "*" + +[pipenv] +allow_prereleases = true diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 00000000..514b4f6e --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,892 @@ +{ + "_meta": { + "hash": { + "sha256": "5cb58078850e67808139f76b8ef211c090c56d776718d54073f006da6a9b162b" + }, + "pipfile-spec": 6, + "requires": {}, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "appnope": { + "hashes": [ + "sha256:5b26757dc6f79a3b7dc9fab95359328d5747fcb2409d331ea66d0272b90ab2a0", + "sha256:8b995ffe925347a2138d7ac0fe77155e4311a0ea6d6da4f5128fe4b3cbe5ed71" + ], + "markers": "sys_platform == 'darwin' and platform_system == 'Darwin'", + "version": "==0.1.0" + }, + "attrs": { + "hashes": [ + "sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c", + "sha256:f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==19.3.0" + }, + "backcall": { + "hashes": [ + "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e", + "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255" + ], + "version": "==0.2.0" + }, + "bleach": { + "hashes": [ + "sha256:2bce3d8fab545a6528c8fa5d9f9ae8ebc85a56da365c7f85180bfe96a35ef22f", + "sha256:3c4c520fdb9db59ef139915a5db79f8b51bc2a7257ea0389f30c846883430a4b" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==3.1.5" + }, + "click": { + "hashes": [ + "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a", + "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==7.1.2" + }, + "decorator": { + "hashes": [ + "sha256:41fa54c2a0cc4ba648be4fd43cff00aedf5b9465c9bf18d64325bc225f08f760", + "sha256:e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7" + ], + "version": "==4.4.2" + }, + "defusedxml": { + "hashes": [ + "sha256:6687150770438374ab581bb7a1b327a847dd9c5749e396102de3fad4e8a3ef93", + "sha256:f684034d135af4c6cbb949b8a4d2ed61634515257a67299e5f940fbaa34377f5" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==0.6.0" + }, + "entrypoints": { + "hashes": [ + "sha256:589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19", + "sha256:c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451" + ], + "markers": "python_version >= '2.7'", + "version": "==0.3" + }, + "ipykernel": { + "hashes": [ + "sha256:731adb3f2c4ebcaff52e10a855ddc87670359a89c9c784d711e62d66fccdafae", + "sha256:a8362e3ae365023ca458effe93b026b8cdadc0b73ff3031472128dd8a2cf0289" + ], + "markers": "python_version >= '3.5'", + "version": "==5.3.0" + }, + "ipython": { + "hashes": [ + "sha256:0ef1433879816a960cd3ae1ae1dc82c64732ca75cec8dab5a4e29783fb571d0e", + "sha256:1b85d65632211bf5d3e6f1406f3393c8c429a47d7b947b9a87812aa5bce6595c" + ], + "markers": "python_version >= '3.6'", + "version": "==7.15.0" + }, + "ipython-genutils": { + "hashes": [ + "sha256:72dd37233799e619666c9f639a9da83c34013a73e8bbc79a7a6348d93c61fab8", + "sha256:eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8" + ], + "version": "==0.2.0" + }, + "jedi": { + "hashes": [ + "sha256:1ddb0ec78059e8e27ec9eb5098360b4ea0a3dd840bedf21415ea820c21b40a22", + "sha256:807d5d4f96711a2bcfdd5dfa3b1ae6d09aa53832b182090b222b5efb81f52f63" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==0.17.1" + }, + "jinja2": { + "hashes": [ + "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0", + "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==2.11.2" + }, + "jsonschema": { + "hashes": [ + "sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163", + "sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a" + ], + "version": "==3.2.0" + }, + "jupyter-client": { + "hashes": [ + "sha256:3a32fa4d0b16d1c626b30c3002a62dfd86d6863ed39eaba3f537fade197bb756", + "sha256:cde8e83aab3ec1c614f221ae54713a9a46d3bf28292609d2db1b439bef5a8c8e" + ], + "markers": "python_version >= '3.5'", + "version": "==6.1.3" + }, + "jupyter-core": { + "hashes": [ + "sha256:394fd5dd787e7c8861741880bdf8a00ce39f95de5d18e579c74b882522219e7e", + "sha256:a4ee613c060fe5697d913416fc9d553599c05e4492d58fac1192c9a6844abb21" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==4.6.3" + }, + "markupsafe": { + "hashes": [ + "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473", + "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161", + "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235", + "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5", + "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42", + "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff", + "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b", + "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1", + "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e", + "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183", + "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66", + "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b", + "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1", + "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15", + "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1", + "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e", + "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b", + "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905", + "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735", + "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d", + "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e", + "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d", + "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c", + "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21", + "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2", + "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5", + "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b", + "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6", + "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f", + "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f", + "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2", + "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7", + "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.1.1" + }, + "mistune": { + "hashes": [ + "sha256:59a3429db53c50b5c6bcc8a07f8848cb00d7dc8bdb431a4ab41920d201d4756e", + "sha256:88a1051873018da288eee8538d476dffe1262495144b33ecb586c4ab266bb8d4" + ], + "version": "==0.8.4" + }, + "nbconvert": { + "hashes": [ + "sha256:21fb48e700b43e82ba0e3142421a659d7739b65568cc832a13976a77be16b523", + "sha256:f0d6ec03875f96df45aa13e21fd9b8450c42d7e1830418cccc008c0df725fcee" + ], + "index": "pypi", + "version": "==5.6.1" + }, + "nbformat": { + "hashes": [ + "sha256:54d4d6354835a936bad7e8182dcd003ca3dc0cedfee5a306090e04854343b340", + "sha256:ea55c9b817855e2dfcd3f66d74857342612a60b1f09653440f4a5845e6e3523f" + ], + "index": "pypi", + "version": "==5.0.7" + }, + "notebook": { + "hashes": [ + "sha256:3edc616c684214292994a3af05eaea4cc043f6b4247d830f3a2f209fa7639a80", + "sha256:47a9092975c9e7965ada00b9a20f0cf637d001db60d241d479f53c0be117ad48" + ], + "index": "pypi", + "version": "==6.0.3" + }, + "packaging": { + "hashes": [ + "sha256:4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8", + "sha256:998416ba6962ae7fbd6596850b80e17859a5753ba17c32284f67bfff33784181" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==20.4" + }, + "pandocfilters": { + "hashes": [ + "sha256:b3dd70e169bb5449e6bc6ff96aea89c5eea8c5f6ab5e207fc2f521a2cf4a0da9" + ], + "version": "==1.4.2" + }, + "parso": { + "hashes": [ + "sha256:158c140fc04112dc45bca311633ae5033c2c2a7b732fa33d0955bad8152a8dd0", + "sha256:908e9fae2144a076d72ae4e25539143d40b8e3eafbaeae03c1bfe226f4cdf12c" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==0.7.0" + }, + "pexpect": { + "hashes": [ + "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937", + "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" + ], + "markers": "sys_platform != 'win32'", + "version": "==4.8.0" + }, + "pickleshare": { + "hashes": [ + "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca", + "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56" + ], + "version": "==0.7.5" + }, + "prometheus-client": { + "hashes": [ + "sha256:983c7ac4b47478720db338f1491ef67a100b474e3bc7dafcbaefb7d0b8f9b01c", + "sha256:c6e6b706833a6bd1fd51711299edee907857be10ece535126a158f911ee80915" + ], + "version": "==0.8.0" + }, + "prompt-toolkit": { + "hashes": [ + "sha256:563d1a4140b63ff9dd587bda9557cffb2fe73650205ab6f4383092fb882e7dc8", + "sha256:df7e9e63aea609b1da3a65641ceaf5bc7d05e0a04de5bd45d05dbeffbabf9e04" + ], + "markers": "python_full_version >= '3.6.1'", + "version": "==3.0.5" + }, + "ptyprocess": { + "hashes": [ + "sha256:923f299cc5ad920c68f2bc0bc98b75b9f838b93b599941a6b63ddbc2476394c0", + "sha256:d7cc528d76e76342423ca640335bd3633420dc1366f258cb31d05e865ef5ca1f" + ], + "markers": "os_name != 'nt'", + "version": "==0.6.0" + }, + "pygments": { + "hashes": [ + "sha256:647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44", + "sha256:ff7a40b4860b727ab48fad6360eb351cc1b33cbf9b15a0f689ca5353e9463324" + ], + "markers": "python_version >= '3.5'", + "version": "==2.6.1" + }, + "pyparsing": { + "hashes": [ + "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", + "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" + ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'", + "version": "==2.4.7" + }, + "pyrsistent": { + "hashes": [ + "sha256:28669905fe725965daa16184933676547c5bb40a5153055a8dee2a4bd7933ad3" + ], + "version": "==0.16.0" + }, + "python-dateutil": { + "hashes": [ + "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", + "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "version": "==2.8.1" + }, + "pyzmq": { + "hashes": [ + "sha256:07fb8fe6826a229dada876956590135871de60dbc7de5a18c3bcce2ed1f03c98", + "sha256:13a5638ab24d628a6ade8f794195e1a1acd573496c3b85af2f1183603b7bf5e0", + "sha256:15b4cb21118f4589c4db8be4ac12b21c8b4d0d42b3ee435d47f686c32fe2e91f", + "sha256:21f7d91f3536f480cb2c10d0756bfa717927090b7fb863e6323f766e5461ee1c", + "sha256:2a88b8fabd9cc35bd59194a7723f3122166811ece8b74018147a4ed8489e6421", + "sha256:342fb8a1dddc569bc361387782e8088071593e7eaf3e3ecf7d6bd4976edff112", + "sha256:4ee0bfd82077a3ff11c985369529b12853a4064320523f8e5079b630f9551448", + "sha256:54aa24fd60c4262286fc64ca632f9e747c7cc3a3a1144827490e1dc9b8a3a960", + "sha256:58688a2dfa044fad608a8e70ba8d019d0b872ec2acd75b7b5e37da8905605891", + "sha256:5b99c2ae8089ef50223c28bac57510c163bfdff158c9e90764f812b94e69a0e6", + "sha256:5b9d21fc56c8aacd2e6d14738021a9d64f3f69b30578a99325a728e38a349f85", + "sha256:5f1f2eb22aab606f808163eb1d537ac9a0ba4283fbeb7a62eb48d9103cf015c2", + "sha256:6ca519309703e95d55965735a667809bbb65f52beda2fdb6312385d3e7a6d234", + "sha256:87c78f6936e2654397ca2979c1d323ee4a889eef536cc77a938c6b5be33351a7", + "sha256:8952f6ba6ae598e792703f3134af5a01af8f5c7cf07e9a148f05a12b02412cea", + "sha256:931339ac2000d12fe212e64f98ce291e81a7ec6c73b125f17cf08415b753c087", + "sha256:956775444d01331c7eb412c5fb9bb62130dfaac77e09f32764ea1865234e2ca9", + "sha256:97b6255ae77328d0e80593681826a0479cb7bac0ba8251b4dd882f5145a2293a", + "sha256:aaa8b40b676576fd7806839a5de8e6d5d1b74981e6376d862af6c117af2a3c10", + "sha256:af0c02cf49f4f9eedf38edb4f3b6bb621d83026e7e5d76eb5526cc5333782fd6", + "sha256:b08780e3a55215873b3b8e6e7ca8987f14c902a24b6ac081b344fd430d6ca7cd", + "sha256:ba6f24431b569aec674ede49cad197cad59571c12deed6ad8e3c596da8288217", + "sha256:bafd651b557dd81d89bd5f9c678872f3e7b7255c1c751b78d520df2caac80230", + "sha256:bfff5ffff051f5aa47ba3b379d87bd051c3196b0c8a603e8b7ed68a6b4f217ec", + "sha256:cf5d689ba9513b9753959164cf500079383bc18859f58bf8ce06d8d4bef2b054", + "sha256:dcbc3f30c11c60d709c30a213dc56e88ac016fe76ac6768e64717bd976072566", + "sha256:f9d7e742fb0196992477415bb34366c12e9bb9a0699b8b3f221ff93b213d7bec", + "sha256:faee2604f279d31312bc455f3d024f160b6168b9c1dde22bf62d8c88a4deca8e" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "version": "==19.0.1" + }, + "rsconnect-python": { + "hashes": [ + "sha256:c2305e6658265f90fb25c41c159f4cd8963de61d2fc58702e55003122f550388", + "sha256:e81fd84acbe5dc5e053827428c0b412106d36a70a1ab07306ecbef8a14159159" + ], + "index": "pypi", + "version": "==1.4.4.1" + }, + "send2trash": { + "hashes": [ + "sha256:60001cc07d707fe247c94f74ca6ac0d3255aabcb930529690897ca2a39db28b2", + "sha256:f1691922577b6fa12821234aeb57599d887c4900b9ca537948d2dac34aea888b" + ], + "version": "==1.5.0" + }, + "six": { + "hashes": [ + "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", + "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" + ], + "index": "pypi", + "version": "==1.15.0" + }, + "terminado": { + "hashes": [ + "sha256:4804a774f802306a7d9af7322193c5390f1da0abb429e082a10ef1d46e6fb2c2", + "sha256:a43dcb3e353bc680dd0783b1d9c3fc28d529f190bc54ba9a229f72fe6e7a54d7" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==0.8.3" + }, + "testpath": { + "hashes": [ + "sha256:60e0a3261c149755f4399a1fff7d37523179a70fdc3abdf78de9fc2604aeec7e", + "sha256:bfcf9411ef4bf3db7579063e0546938b1edda3d69f4e1fb8756991f5951f85d4" + ], + "version": "==0.4.4" + }, + "tornado": { + "hashes": [ + "sha256:0fe2d45ba43b00a41cd73f8be321a44936dc1aba233dee979f17a042b83eb6dc", + "sha256:22aed82c2ea340c3771e3babc5ef220272f6fd06b5108a53b4976d0d722bcd52", + "sha256:2c027eb2a393d964b22b5c154d1a23a5f8727db6fda837118a776b29e2b8ebc6", + "sha256:5217e601700f24e966ddab689f90b7ea4bd91ff3357c3600fa1045e26d68e55d", + "sha256:5618f72e947533832cbc3dec54e1dffc1747a5cb17d1fd91577ed14fa0dc081b", + "sha256:5f6a07e62e799be5d2330e68d808c8ac41d4a259b9cea61da4101b83cb5dc673", + "sha256:c58d56003daf1b616336781b26d184023ea4af13ae143d9dda65e31e534940b9", + "sha256:c952975c8ba74f546ae6de2e226ab3cc3cc11ae47baf607459a6728585bb542a", + "sha256:c98232a3ac391f5faea6821b53db8db461157baa788f5d6222a193e9456e1740" + ], + "markers": "python_version >= '3.5'", + "version": "==6.0.4" + }, + "traitlets": { + "hashes": [ + "sha256:70b4c6a1d9019d7b4f6846832288f86998aa3b9207c6821f3578a6a6a467fe44", + "sha256:d023ee369ddd2763310e4c3eae1ff649689440d4ae59d7485eb4cfbbe3e359f7" + ], + "version": "==4.3.3" + }, + "wcwidth": { + "hashes": [ + "sha256:79375666b9954d4a1a10739315816324c3e73110af9d0e102d906fdb0aec009f", + "sha256:8c6b5b6ee1360b842645f336d9e5d68c55817c26d3050f46b235ef2bc650e48f" + ], + "version": "==0.2.4" + }, + "webencodings": { + "hashes": [ + "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78", + "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" + ], + "version": "==0.5.1" + } + }, + "develop": { + "appdirs": { + "hashes": [ + "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41", + "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128" + ], + "version": "==1.4.4" + }, + "appnope": { + "hashes": [ + "sha256:5b26757dc6f79a3b7dc9fab95359328d5747fcb2409d331ea66d0272b90ab2a0", + "sha256:8b995ffe925347a2138d7ac0fe77155e4311a0ea6d6da4f5128fe4b3cbe5ed71" + ], + "markers": "sys_platform == 'darwin' and platform_system == 'Darwin'", + "version": "==0.1.0" + }, + "attrs": { + "hashes": [ + "sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c", + "sha256:f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==19.3.0" + }, + "backcall": { + "hashes": [ + "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e", + "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255" + ], + "version": "==0.2.0" + }, + "black": { + "hashes": [ + "sha256:1b30e59be925fafc1ee4565e5e08abef6b03fe455102883820fe5ee2e4734e0b", + "sha256:c2edb73a08e9e0e6f65a0e6af18b059b8b1cdd5bef997d7a0b181df93dc81539" + ], + "index": "pypi", + "version": "==19.10b0" + }, + "bleach": { + "hashes": [ + "sha256:2bce3d8fab545a6528c8fa5d9f9ae8ebc85a56da365c7f85180bfe96a35ef22f", + "sha256:3c4c520fdb9db59ef139915a5db79f8b51bc2a7257ea0389f30c846883430a4b" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==3.1.5" + }, + "certifi": { + "hashes": [ + "sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3", + "sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41" + ], + "version": "==2020.6.20" + }, + "chardet": { + "hashes": [ + "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", + "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691" + ], + "version": "==3.0.4" + }, + "click": { + "hashes": [ + "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a", + "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==7.1.2" + }, + "coverage": { + "hashes": [ + "sha256:00f1d23f4336efc3b311ed0d807feb45098fc86dee1ca13b3d6768cdab187c8a", + "sha256:01333e1bd22c59713ba8a79f088b3955946e293114479bbfc2e37d522be03355", + "sha256:0cb4be7e784dcdc050fc58ef05b71aa8e89b7e6636b99967fadbdba694cf2b65", + "sha256:0e61d9803d5851849c24f78227939c701ced6704f337cad0a91e0972c51c1ee7", + "sha256:1601e480b9b99697a570cea7ef749e88123c04b92d84cedaa01e117436b4a0a9", + "sha256:2742c7515b9eb368718cd091bad1a1b44135cc72468c731302b3d641895b83d1", + "sha256:2d27a3f742c98e5c6b461ee6ef7287400a1956c11421eb574d843d9ec1f772f0", + "sha256:402e1744733df483b93abbf209283898e9f0d67470707e3c7516d84f48524f55", + "sha256:5c542d1e62eece33c306d66fe0a5c4f7f7b3c08fecc46ead86d7916684b36d6c", + "sha256:5f2294dbf7875b991c381e3d5af2bcc3494d836affa52b809c91697449d0eda6", + "sha256:6402bd2fdedabbdb63a316308142597534ea8e1895f4e7d8bf7476c5e8751fef", + "sha256:66460ab1599d3cf894bb6baee8c684788819b71a5dc1e8fa2ecc152e5d752019", + "sha256:782caea581a6e9ff75eccda79287daefd1d2631cc09d642b6ee2d6da21fc0a4e", + "sha256:79a3cfd6346ce6c13145731d39db47b7a7b859c0272f02cdb89a3bdcbae233a0", + "sha256:7a5bdad4edec57b5fb8dae7d3ee58622d626fd3a0be0dfceda162a7035885ecf", + "sha256:8fa0cbc7ecad630e5b0f4f35b0f6ad419246b02bc750de7ac66db92667996d24", + "sha256:a027ef0492ede1e03a8054e3c37b8def89a1e3c471482e9f046906ba4f2aafd2", + "sha256:a3f3654d5734a3ece152636aad89f58afc9213c6520062db3978239db122f03c", + "sha256:a82b92b04a23d3c8a581fc049228bafde988abacba397d57ce95fe95e0338ab4", + "sha256:acf3763ed01af8410fc36afea23707d4ea58ba7e86a8ee915dfb9ceff9ef69d0", + "sha256:adeb4c5b608574a3d647011af36f7586811a2c1197c861aedb548dd2453b41cd", + "sha256:b83835506dfc185a319031cf853fa4bb1b3974b1f913f5bb1a0f3d98bdcded04", + "sha256:bb28a7245de68bf29f6fb199545d072d1036a1917dca17a1e75bbb919e14ee8e", + "sha256:bf9cb9a9fd8891e7efd2d44deb24b86d647394b9705b744ff6f8261e6f29a730", + "sha256:c317eaf5ff46a34305b202e73404f55f7389ef834b8dbf4da09b9b9b37f76dd2", + "sha256:dbe8c6ae7534b5b024296464f387d57c13caa942f6d8e6e0346f27e509f0f768", + "sha256:de807ae933cfb7f0c7d9d981a053772452217df2bf38e7e6267c9cbf9545a796", + "sha256:dead2ddede4c7ba6cb3a721870f5141c97dc7d85a079edb4bd8d88c3ad5b20c7", + "sha256:dec5202bfe6f672d4511086e125db035a52b00f1648d6407cc8e526912c0353a", + "sha256:e1ea316102ea1e1770724db01998d1603ed921c54a86a2efcb03428d5417e489", + "sha256:f90bfc4ad18450c80b024036eaf91e4a246ae287701aaa88eaebebf150868052" + ], + "index": "pypi", + "version": "==5.1" + }, + "decorator": { + "hashes": [ + "sha256:41fa54c2a0cc4ba648be4fd43cff00aedf5b9465c9bf18d64325bc225f08f760", + "sha256:e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7" + ], + "version": "==4.4.2" + }, + "docutils": { + "hashes": [ + "sha256:0c5b78adfbf7762415433f5515cd5c9e762339e23369dbe8000d84a4bf4ab3af", + "sha256:c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==0.16" + }, + "flake8": { + "hashes": [ + "sha256:15e351d19611c887e482fb960eae4d44845013cc142d42896e9862f775d8cf5c", + "sha256:f04b9fcbac03b0a3e58c0ab3a0ecc462e023a9faf046d57794184028123aa208" + ], + "index": "pypi", + "version": "==3.8.3" + }, + "idna": { + "hashes": [ + "sha256:7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb", + "sha256:a068a21ceac8a4d63dbfd964670474107f541babbd2250d61922f029858365fa" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.9" + }, + "importlib-metadata": { + "hashes": [ + "sha256:0505dd08068cfec00f53a74a0ad927676d7757da81b7436a6eefe4c7cf75c545", + "sha256:15ec6c0fd909e893e3a08b3a7c76ecb149122fb14b7efe1199ddd4c7c57ea958" + ], + "index": "pypi", + "version": "==1.6.1" + }, + "ipython": { + "hashes": [ + "sha256:0ef1433879816a960cd3ae1ae1dc82c64732ca75cec8dab5a4e29783fb571d0e", + "sha256:1b85d65632211bf5d3e6f1406f3393c8c429a47d7b947b9a87812aa5bce6595c" + ], + "markers": "python_version >= '3.6'", + "version": "==7.15.0" + }, + "ipython-genutils": { + "hashes": [ + "sha256:72dd37233799e619666c9f639a9da83c34013a73e8bbc79a7a6348d93c61fab8", + "sha256:eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8" + ], + "version": "==0.2.0" + }, + "jedi": { + "hashes": [ + "sha256:1ddb0ec78059e8e27ec9eb5098360b4ea0a3dd840bedf21415ea820c21b40a22", + "sha256:807d5d4f96711a2bcfdd5dfa3b1ae6d09aa53832b182090b222b5efb81f52f63" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==0.17.1" + }, + "keyring": { + "hashes": [ + "sha256:3401234209015144a5d75701e71cb47239e552b0882313e9f51e8976f9e27843", + "sha256:c53e0e5ccde3ad34284a40ce7976b5b3a3d6de70344c3f8ee44364cc340976ec" + ], + "markers": "python_version >= '3.6'", + "version": "==21.2.1" + }, + "mccabe": { + "hashes": [ + "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42", + "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f" + ], + "version": "==0.6.1" + }, + "more-itertools": { + "hashes": [ + "sha256:68c70cc7167bdf5c7c9d8f6954a7837089c6a36bf565383919bb595efb8a17e5", + "sha256:b78134b2063dd214000685165d81c154522c3ee0a1c0d4d113c80361c234c5a2" + ], + "markers": "python_version >= '3.5'", + "version": "==8.4.0" + }, + "packaging": { + "hashes": [ + "sha256:4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8", + "sha256:998416ba6962ae7fbd6596850b80e17859a5753ba17c32284f67bfff33784181" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==20.4" + }, + "parso": { + "hashes": [ + "sha256:158c140fc04112dc45bca311633ae5033c2c2a7b732fa33d0955bad8152a8dd0", + "sha256:908e9fae2144a076d72ae4e25539143d40b8e3eafbaeae03c1bfe226f4cdf12c" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==0.7.0" + }, + "pathspec": { + "hashes": [ + "sha256:7d91249d21749788d07a2d0f94147accd8f845507400749ea19c1ec9054a12b0", + "sha256:da45173eb3a6f2a5a487efba21f050af2b41948be6ab52b6a1e3ff22bb8b7061" + ], + "version": "==0.8.0" + }, + "pexpect": { + "hashes": [ + "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937", + "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" + ], + "markers": "sys_platform != 'win32'", + "version": "==4.8.0" + }, + "pickleshare": { + "hashes": [ + "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca", + "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56" + ], + "version": "==0.7.5" + }, + "pkginfo": { + "hashes": [ + "sha256:7424f2c8511c186cd5424bbf31045b77435b37a8d604990b79d4e70d741148bb", + "sha256:a6d9e40ca61ad3ebd0b72fbadd4fba16e4c0e4df0428c041e01e06eb6ee71f32" + ], + "version": "==1.5.0.1" + }, + "pluggy": { + "hashes": [ + "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0", + "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==0.13.1" + }, + "prompt-toolkit": { + "hashes": [ + "sha256:563d1a4140b63ff9dd587bda9557cffb2fe73650205ab6f4383092fb882e7dc8", + "sha256:df7e9e63aea609b1da3a65641ceaf5bc7d05e0a04de5bd45d05dbeffbabf9e04" + ], + "markers": "python_full_version >= '3.6.1'", + "version": "==3.0.5" + }, + "ptyprocess": { + "hashes": [ + "sha256:923f299cc5ad920c68f2bc0bc98b75b9f838b93b599941a6b63ddbc2476394c0", + "sha256:d7cc528d76e76342423ca640335bd3633420dc1366f258cb31d05e865ef5ca1f" + ], + "markers": "os_name != 'nt'", + "version": "==0.6.0" + }, + "py": { + "hashes": [ + "sha256:a673fa23d7000440cc885c17dbd34fafcb7d7a6e230b29f6766400de36a33c44", + "sha256:f3b3a4c36512a4c4f024041ab51866f11761cc169670204b235f6b20523d4e6b" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.8.2" + }, + "pycodestyle": { + "hashes": [ + "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367", + "sha256:c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01dfd55085434192e" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.6.0" + }, + "pyflakes": { + "hashes": [ + "sha256:0d94e0e05a19e57a99444b6ddcf9a6eb2e5c68d3ca1e98e90707af8152c90a92", + "sha256:35b2d75ee967ea93b55750aa9edbbf72813e06a66ba54438df2cfac9e3c27fc8" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.2.0" + }, + "pygments": { + "hashes": [ + "sha256:647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44", + "sha256:ff7a40b4860b727ab48fad6360eb351cc1b33cbf9b15a0f689ca5353e9463324" + ], + "markers": "python_version >= '3.5'", + "version": "==2.6.1" + }, + "pyparsing": { + "hashes": [ + "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", + "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" + ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'", + "version": "==2.4.7" + }, + "pytest": { + "hashes": [ + "sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1", + "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8" + ], + "index": "pypi", + "version": "==5.4.3" + }, + "pytest-cov": { + "hashes": [ + "sha256:1a629dc9f48e53512fcbfda6b07de490c374b0c83c55ff7a1720b3fccff0ac87", + "sha256:6e6d18092dce6fad667cd7020deed816f858ad3b49d5b5e2b1cc1c97a4dba65c" + ], + "index": "pypi", + "version": "==2.10.0" + }, + "readme-renderer": { + "hashes": [ + "sha256:cbe9db71defedd2428a1589cdc545f9bd98e59297449f69d721ef8f1cfced68d", + "sha256:cc4957a803106e820d05d14f71033092537a22daa4f406dfbdd61177e0936376" + ], + "version": "==26.0" + }, + "regex": { + "hashes": [ + "sha256:08997a37b221a3e27d68ffb601e45abfb0093d39ee770e4257bd2f5115e8cb0a", + "sha256:112e34adf95e45158c597feea65d06a8124898bdeac975c9087fe71b572bd938", + "sha256:1700419d8a18c26ff396b3b06ace315b5f2a6e780dad387e4c48717a12a22c29", + "sha256:2f6f211633ee8d3f7706953e9d3edc7ce63a1d6aad0be5dcee1ece127eea13ae", + "sha256:52e1b4bef02f4040b2fd547357a170fc1146e60ab310cdbdd098db86e929b387", + "sha256:55b4c25cbb3b29f8d5e63aeed27b49fa0f8476b0d4e1b3171d85db891938cc3a", + "sha256:5aaa5928b039ae440d775acea11d01e42ff26e1561c0ffcd3d805750973c6baf", + "sha256:654cb773b2792e50151f0e22be0f2b6e1c3a04c5328ff1d9d59c0398d37ef610", + "sha256:690f858d9a94d903cf5cada62ce069b5d93b313d7d05456dbcd99420856562d9", + "sha256:6ad8663c17db4c5ef438141f99e291c4d4edfeaacc0ce28b5bba2b0bf273d9b5", + "sha256:89cda1a5d3e33ec9e231ece7307afc101b5217523d55ef4dc7fb2abd6de71ba3", + "sha256:92d8a043a4241a710c1cf7593f5577fbb832cf6c3a00ff3fc1ff2052aff5dd89", + "sha256:95fa7726d073c87141f7bbfb04c284901f8328e2d430eeb71b8ffdd5742a5ded", + "sha256:97712e0d0af05febd8ab63d2ef0ab2d0cd9deddf4476f7aa153f76feef4b2754", + "sha256:b2ba0f78b3ef375114856cbdaa30559914d081c416b431f2437f83ce4f8b7f2f", + "sha256:bae83f2a56ab30d5353b47f9b2a33e4aac4de9401fb582b55c42b132a8ac3868", + "sha256:c78e66a922de1c95a208e4ec02e2e5cf0bb83a36ceececc10a72841e53fbf2bd", + "sha256:cf59bbf282b627130f5ba68b7fa3abdb96372b24b66bdf72a4920e8153fc7910", + "sha256:e3cdc9423808f7e1bb9c2e0bdb1c9dc37b0607b30d646ff6faf0d4e41ee8fee3", + "sha256:e9b64e609d37438f7d6e68c2546d2cb8062f3adb27e6336bc129b51be20773ac", + "sha256:fbff901c54c22425a5b809b914a3bfaf4b9570eee0e5ce8186ac71eb2025191c" + ], + "version": "==2020.6.8" + }, + "requests": { + "hashes": [ + "sha256:b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b", + "sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==2.24.0" + }, + "requests-toolbelt": { + "hashes": [ + "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f", + "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0" + ], + "version": "==0.9.1" + }, + "setuptools-scm": { + "hashes": [ + "sha256:09c659d1d6680811c43f476a33c6d3d9872416580786e96bd29ea03e6a818e41", + "sha256:69258e2eeba5f7ce1ed7a5f109519580fa3578250f8e4d6684859f86d1b15826", + "sha256:731550a27e3901ee501c3bf99140b5436b8eeba341a9d19911cf364b8d573293", + "sha256:892e63b4983f9e30f9e8bf89ad03d2a02a47e6e5ced09b03ae6fe952ade8a579", + "sha256:a8994582e716ec690f33fec70cca0f85bd23ec974e3f783233e4879090a7faa8", + "sha256:b42c150c34d6120babf3646abd7513e032be2e230b3d2034f27404c65aa0c977", + "sha256:eaaec16b7af25c5f532b5af2332213bb6223d15cca4518f6dbc4c055641c86fd", + "sha256:efc928d6a64162c88cdc85fa4b84adfbd6dbf9f9b04319bc495eb16dcfaae00a" + ], + "index": "pypi", + "version": "==4.1.2" + }, + "six": { + "hashes": [ + "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", + "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" + ], + "index": "pypi", + "version": "==1.15.0" + }, + "toml": { + "hashes": [ + "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f", + "sha256:bda89d5935c2eac546d648028b9901107a595863cb36bae0c73ac804a9b4ce88" + ], + "index": "pypi", + "version": "==0.10.1" + }, + "tqdm": { + "hashes": [ + "sha256:07c06493f1403c1380b630ae3dcbe5ae62abcf369a93bbc052502279f189ab8c", + "sha256:cd140979c2bebd2311dfb14781d8f19bd5a9debb92dcab9f6ef899c987fcf71f" + ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1'", + "version": "==4.46.1" + }, + "traitlets": { + "hashes": [ + "sha256:70b4c6a1d9019d7b4f6846832288f86998aa3b9207c6821f3578a6a6a467fe44", + "sha256:d023ee369ddd2763310e4c3eae1ff649689440d4ae59d7485eb4cfbbe3e359f7" + ], + "version": "==4.3.3" + }, + "twine": { + "hashes": [ + "sha256:c1af8ca391e43b0a06bbc155f7f67db0bf0d19d284bfc88d1675da497a946124", + "sha256:d561a5e511f70275e5a485a6275ff61851c16ffcb3a95a602189161112d9f160" + ], + "index": "pypi", + "version": "==3.1.1" + }, + "typed-ast": { + "hashes": [ + "sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355", + "sha256:0c2c07682d61a629b68433afb159376e24e5b2fd4641d35424e462169c0a7919", + "sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa", + "sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652", + "sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75", + "sha256:4083861b0aa07990b619bd7ddc365eb7fa4b817e99cf5f8d9cf21a42780f6e01", + "sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d", + "sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1", + "sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907", + "sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c", + "sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3", + "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b", + "sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614", + "sha256:aaee9905aee35ba5905cfb3c62f3e83b3bec7b39413f0a7f19be4e547ea01ebb", + "sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b", + "sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41", + "sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6", + "sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34", + "sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe", + "sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4", + "sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7" + ], + "version": "==1.4.1" + }, + "urllib3": { + "hashes": [ + "sha256:3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527", + "sha256:88206b0eb87e6d677d424843ac5209e3fb9d0190d0ee169599165ec25e9d9115" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", + "version": "==1.25.9" + }, + "wcwidth": { + "hashes": [ + "sha256:79375666b9954d4a1a10739315816324c3e73110af9d0e102d906fdb0aec009f", + "sha256:8c6b5b6ee1360b842645f336d9e5d68c55817c26d3050f46b235ef2bc650e48f" + ], + "version": "==0.2.4" + }, + "webencodings": { + "hashes": [ + "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78", + "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" + ], + "version": "==0.5.1" + }, + "wheel": { + "hashes": [ + "sha256:8788e9155fe14f54164c1b9eb0a319d98ef02c160725587ad60f14ddc57b6f96", + "sha256:df277cb51e61359aba502208d680f90c0493adec6f0e848af94948778aed386e" + ], + "index": "pypi", + "version": "==0.34.2" + }, + "zipp": { + "hashes": [ + "sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b", + "sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96" + ], + "markers": "python_version >= '3.6'", + "version": "==3.1.0" + } + } +} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..14bcede1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,9 @@ +[build-system] +requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"] + +[tool.black] +line-length = 120 +target-version = ["py27", "py35", "py36", "py37", "py38"] + +[tool.setuptools_scm] +write_to = "rsconnect_jupyter/version.py" diff --git a/rsconnect_jupyter/__init__.py b/rsconnect_jupyter/__init__.py index 611778f2..e14a468c 100644 --- a/rsconnect_jupyter/__init__.py +++ b/rsconnect_jupyter/__init__.py @@ -19,8 +19,10 @@ from ssl import SSLError -with open(join(dirname(__file__), 'version.txt')) as f: - __version__ = f.read().strip() +try: + from rsconnect_jupyter.version import version as __version__ # noqa +except ImportError: + __version__ = "NOTSET" # noqa def _jupyter_server_extension_paths(): diff --git a/setup.cfg b/setup.cfg index a7bdf864..46de06e0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,4 +2,29 @@ universal = 1 [metadata] +author = Jonathan Curran +author_email = jonathan.curran@rstudio.com +description = Jupyter Notebook integration with RStudio Connect +license = GPL-2.0 license_file = LICENSE.md +long_description = file:README.md +long_description_content_type = text/markdown +name = rsconnect_jupyter +url = http://github.com/rstudio/rsconnect-jupyter +project_urls = + Documentation = https://docs.rstudio.com/rsconnect-jupyter + +[options] +install_requires = + rsconnect-python==1.5.0b1 + notebook + nbformat + nbconvert>=5.0 + six + ipython +setup_requires = + setuptools +packages = rsconnect_jupyter +python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* +include_package_data = true +zip_safe = false diff --git a/setup.py b/setup.py index 8cbdbbba..60684932 100644 --- a/setup.py +++ b/setup.py @@ -1,47 +1,3 @@ from setuptools import setup -import os -import sys - -def readme(): - with open('README.md') as f: - return f.read() - - -# https://github.com/ipython/ipython/blob/master/README.rst#ipython-requires-python-version-3-or-above -if sys.version_info[0] < 3 and 'bdist_wheel' not in sys.argv: - ipython_dependency = ['ipython<6'] -else: - ipython_dependency = ['ipython'] - -print('setup.py using python', sys.version_info[0]) -print('ipython_dependency:', ipython_dependency) - -with open('rsconnect_jupyter/version.txt', 'r') as f: - VERSION = f.read().strip() - -BUILD = os.environ.get('BUILD_NUMBER', '9999') - -setup(name='rsconnect_jupyter', - version='{version}.{build}'.format(version=VERSION, build=BUILD), - description='Jupyter Notebook integration with RStudio Connect', - long_description=readme(), - long_description_content_type='text/markdown', - url='http://github.com/rstudio/rsconnect-jupyter', - project_urls={ - "Documentation": "https://docs.rstudio.com/rsconnect-jupyter", - }, - author='Jonathan Curran', - author_email='jonathan.curran@rstudio.com', - license='GPL-2.0', - packages=['rsconnect_jupyter'], - install_requires=[ - 'rsconnect-python==1.4.5.*', - 'notebook', - 'nbformat', - 'nbconvert>=5.0', - 'six' - ] + ipython_dependency, - python_requires = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*', - include_package_data=True, - zip_safe=False) +setup() From 8ca73e44375408db9e2f60502828cb33ca803638 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Mon, 22 Jun 2020 12:17:25 -0400 Subject: [PATCH 2/6] Delete version.txt --- rsconnect_jupyter/version.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 rsconnect_jupyter/version.txt diff --git a/rsconnect_jupyter/version.txt b/rsconnect_jupyter/version.txt deleted file mode 100644 index 16c44da6..00000000 --- a/rsconnect_jupyter/version.txt +++ /dev/null @@ -1 +0,0 @@ -1.4.0b1 From f4c88b9480905d2ff4f3e9dc9200b518b1ebd613 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Mon, 22 Jun 2020 12:28:53 -0400 Subject: [PATCH 3/6] Run things on github actions --- .github/workflows/main.yml | 129 +++++++++++++++++++++++++++++++++++++ Makefile | 1 + 2 files changed, 130 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..8830e972 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,129 @@ +name: main +on: + push: + branches: [master] + tags: ['*'] + pull_request: + branches: [master] +jobs: + test: + strategy: + matrix: + os: [ubuntu-latest] + python-version: ['2.7', '3.5', '3.6', '3.7', '3.8'] + include: + - os: macos-latest + python-version: '3.8' + runs-on: ${{ matrix.os }} + name: test (py${{ matrix.python-version }} ${{ matrix.os }}) + steps: + - uses: actions/checkout@v2 + - run: git fetch --prune --unshallow + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - if: ${{ matrix.os != 'macos-latest' }} + uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: pip-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('Pipfile.lock') }} + restore-keys: | + pip-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('Pipfile.lock') }} + pip-${{ matrix.os }}-py${{ matrix.python-version }}- + - if: ${{ matrix.os == 'macos-latest' }} + uses: actions/cache@v1 + with: + path: ~/Library/Caches/pip + key: pip-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('Pipfile.lock') }} + restore-keys: | + pip-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('Pipfile.lock') }} + pip-${{ matrix.os }}-py${{ matrix.python-version }}- + - uses: actions/cache@v1 + with: + path: ~/.local/share/virtualenvs + key: virtualenvs-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('Pipfile.lock') }} + restore-keys: | + virtualenvs-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('Pipfile.lock') }} + virtualenvs-${{ matrix.os }}-py${{ matrix.python-version }}- + - run: pipenv install --dev + - run: pipenv run pip freeze + - run: pipenv run python setup.py --version + - run: pipenv run python -Wi setup.py test + distributions: + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: git fetch --prune --unshallow + - uses: actions/setup-python@v2 + with: + python-version: 3.8.x + - uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: pip-ubuntu-latest-py3.8-${{ hashFiles('Pipfile.lock') }} + restore-keys: | + pip-ubuntu-latest-py3.8-${{ hashFiles('Pipfile.lock') }} + pip-ubuntu-latest-py3.8- + - uses: actions/cache@v1 + with: + path: ~/.local/share/virtualenvs + key: virtualenvs-ubuntu-latest-py3.8-${{ hashFiles('Pipfile.lock') }} + restore-keys: | + virtualenvs-ubuntu-latest-py3.8-${{ hashFiles('Pipfile.lock') }} + virtualenvs-ubuntu-latest-py3.8- + - run: pip install -U pipenv pip + - run: pipenv install --dev + - run: pipenv run pip install -U 'SecretStorage>=3' + - run: make dist + id: create_dist + # - uses: actions/upload-artifact@v2 + # with: + # name: distributions + # path: dist/ + # - run: pipenv run pip install -vvv ${{ steps.create_dist.outputs.whl }} + # - run: pipenv run rsconnect version + # - run: pipenv run rsconnect --help + # - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + # id: create_release + # uses: actions/create-release@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # tag_name: ${{ github.ref }} + # release_name: Release ${{ github.ref }} + # draft: false + # prerelease: false + # - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # upload_url: ${{ steps.create_release.outputs.upload_url }} + # asset_path: ${{ steps.create_dist.outputs.whl }} + # asset_name: ${{ steps.create_dist.outputs.whl_basename }} + # asset_content_type: application/x-wheel+zip + # - uses: aws-actions/configure-aws-credentials@v1 + # with: + # aws-access-key-id: ${{ secrets.AWS_ID }} + # aws-secret-access-key: ${{ secrets.AWS_SECRET }} + # aws-region: us-east-1 + # - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + # run: make sync-latest-to-s3 + # - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + # run: make sync-to-s3 + # - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + # uses: pypa/gh-action-pypi-publish@master + # with: + # user: __token__ + # password: ${{ secrets.PYPI_TOKEN }} +# docs: + # needs: test + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v2 + # - run: make docs-build + # - uses: actions/upload-artifact@v2 + # with: + # name: docs + # path: docs/site/ diff --git a/Makefile b/Makefile index 0ff42b81..00b30fbc 100644 --- a/Makefile +++ b/Makefile @@ -57,6 +57,7 @@ dist: version-frontend # wheels don't get built if _any_ file it tries to touch has a timestamp < 1980 # (system files) so use the current timestamp as a point of reference instead SOURCE_DATE_EPOCH="$(shell date +%s)"; pipenv run python setup.py sdist bdist_wheel + @echo package: make DOCKER_IMAGE=$(IMAGE)3 PY_VERSION=3 TARGET=dist launch From 7f969cb64780e6306d40802788266ea72fdafd93 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Mon, 22 Jun 2020 12:31:13 -0400 Subject: [PATCH 4/6] One must install pipenv --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8830e972..8b97f289 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,6 +45,7 @@ jobs: restore-keys: | virtualenvs-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('Pipfile.lock') }} virtualenvs-${{ matrix.os }}-py${{ matrix.python-version }}- + - run: pip install -U -I pip pipenv - run: pipenv install --dev - run: pipenv run pip freeze - run: pipenv run python setup.py --version @@ -72,7 +73,7 @@ jobs: restore-keys: | virtualenvs-ubuntu-latest-py3.8-${{ hashFiles('Pipfile.lock') }} virtualenvs-ubuntu-latest-py3.8- - - run: pip install -U pipenv pip + - run: pip install -U -I pip pipenv - run: pipenv install --dev - run: pipenv run pip install -U 'SecretStorage>=3' - run: make dist From 29424cf55eade250e2b502181fc55462614daf0c Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Mon, 22 Jun 2020 13:36:35 -0400 Subject: [PATCH 5/6] Dist building and latest s3 syncing --- .github/workflows/main.yml | 78 +++++++++++++++++++------------------- Makefile | 26 ++++++++++--- 2 files changed, 59 insertions(+), 45 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b97f289..42fdfc27 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -78,46 +78,44 @@ jobs: - run: pipenv run pip install -U 'SecretStorage>=3' - run: make dist id: create_dist - # - uses: actions/upload-artifact@v2 - # with: - # name: distributions - # path: dist/ - # - run: pipenv run pip install -vvv ${{ steps.create_dist.outputs.whl }} - # - run: pipenv run rsconnect version - # - run: pipenv run rsconnect --help - # - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - # id: create_release - # uses: actions/create-release@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # tag_name: ${{ github.ref }} - # release_name: Release ${{ github.ref }} - # draft: false - # prerelease: false - # - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - # uses: actions/upload-release-asset@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # upload_url: ${{ steps.create_release.outputs.upload_url }} - # asset_path: ${{ steps.create_dist.outputs.whl }} - # asset_name: ${{ steps.create_dist.outputs.whl_basename }} - # asset_content_type: application/x-wheel+zip - # - uses: aws-actions/configure-aws-credentials@v1 - # with: - # aws-access-key-id: ${{ secrets.AWS_ID }} - # aws-secret-access-key: ${{ secrets.AWS_SECRET }} - # aws-region: us-east-1 - # - if: github.event_name == 'push' && github.ref == 'refs/heads/master' - # run: make sync-latest-to-s3 - # - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - # run: make sync-to-s3 - # - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - # uses: pypa/gh-action-pypi-publish@master - # with: - # user: __token__ - # password: ${{ secrets.PYPI_TOKEN }} + - uses: actions/upload-artifact@v2 + with: + name: distributions + path: dist/ + - run: pipenv run pip install -vvv ${{ steps.create_dist.outputs.whl }} + - run: pipenv run rsconnect version + - run: pipenv run rsconnect --help + - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ steps.create_dist.outputs.whl }} + asset_name: ${{ steps.create_dist.outputs.whl_basename }} + asset_content_type: application/x-wheel+zip + - uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET }} + aws-region: us-east-1 + - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + run: make sync-latest-to-s3 + - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }} # docs: # needs: test # runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 00b30fbc..81f18b78 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,15 @@ NB_UID=$(shell id -u) NB_GID=$(shell id -g) IMAGE=rstudio/rsconnect-jupyter-py -VERSION = $(shell pipenv run python setup.py --version) +VERSION := $(shell pipenv run python setup.py --version) +BDIST_WHEEL := dist/rsconnect_jupyter-$(VERSION)-py2.py3-none-any.whl +S3_PREFIX := s3://rstudio-connect-downloads/connect/rsconnect-jupyter PORT = $(shell printenv PORT || echo 9999) +# NOTE: See the `dist` target for why this exists. +SOURCE_DATE_EPOCH := $(shell date +%s) +export SOURCE_DATE_EPOCH + clean: rm -rf build/ dist/ rsconnect_jupyter.egg-info/ @@ -53,11 +59,15 @@ test-selenium: $(MAKE) -C selenium test-env-down || true ; \ exit $$EXITCODE +# NOTE: Wheels won't get built if _any_ file it tries to touch has a timestamp +# before 1980 (system files) so the $(SOURCE_DATE_EPOCH) current timestamp is +# exported as a point of reference instead. dist: version-frontend -# wheels don't get built if _any_ file it tries to touch has a timestamp < 1980 -# (system files) so use the current timestamp as a point of reference instead - SOURCE_DATE_EPOCH="$(shell date +%s)"; pipenv run python setup.py sdist bdist_wheel - @echo + pipenv run python setup.py bdist_wheel + pipenv run twine check $(BDIST_WHEEL) + rm -vf dist/*.egg + @echo "::set-output name=whl::$(BDIST_WHEEL)" + @echo "::set-output name=whl_basename::$(notdir $(BDIST_WHEEL))" package: make DOCKER_IMAGE=$(IMAGE)3 PY_VERSION=3 TARGET=dist launch @@ -164,3 +174,9 @@ dist/rsconnect-jupyter-${VERSION}.pdf: docs/README.md docs/*.gif version-frontend: printf '{"version":"%s"}\n' $(VERSION) >rsconnect_jupyter/static/version.json + +.PHONY: sync-latest-to-s3 +sync-latest-to-s3: + aws s3 cp --acl bucket-owner-full-control \ + $(BDIST_WHEEL) \ + $(S3_PREFIX)/latest/rsconnect_jupyter-latest-py2.py3-none-any.whl From be1672f6ce7eee2a2cc6a89a799d826d0fb86206 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Mon, 22 Jun 2020 13:41:18 -0400 Subject: [PATCH 6/6] Print the version of the relevant thing --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 42fdfc27..bff7fb55 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -83,8 +83,7 @@ jobs: name: distributions path: dist/ - run: pipenv run pip install -vvv ${{ steps.create_dist.outputs.whl }} - - run: pipenv run rsconnect version - - run: pipenv run rsconnect --help + - run: pipenv run python -c 'import rsconnect_jupyter;print(rsconnect_jupyter.__version__)' - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') id: create_release uses: actions/create-release@v1