diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..3fdec19 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,16 @@ +name: Publish package to PyPI +on: + push: + tags: + - "*.*.*" +jobs: + build: + runs-on: ubuntu-latest + environment: PyPI + steps: + - uses: actions/checkout@v3 + - name: Build and publish to pypi + uses: JRubics/poetry-publish@v1.15 + with: + pypi_token: ${{ secrets.PYPI_API_TOKEN }} + ignore_dev_requirements: "yes" diff --git a/.gitignore b/.gitignore index 9373c58..346591a 100644 --- a/.gitignore +++ b/.gitignore @@ -161,3 +161,5 @@ cython_debug/ # option (not recommended) you can uncomment the following to ignore the entire idea folder. .idea/ /tests/output/*.* +/pytest.xml +/pytest-coverage.txt diff --git a/demo.ipynb b/demo.ipynb index 7d57fe6..3fdfd6a 100644 --- a/demo.ipynb +++ b/demo.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "0590e9d3-e978-43de-b17d-695b93105143", "metadata": {}, "outputs": [], @@ -12,44 +12,10 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "id": "10374bb7-ed85-47b2-87bf-964436f54786", "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/bjornandre/Library/Caches/pypoetry/virtualenvs/dapla-toolbelt-iCf-zdcD-py3.10/lib/python3.10/site-packages/google/auth/_default.py:83: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a \"quota exceeded\" or \"API not enabled\" error. We recommend you rerun `gcloud auth application-default login` and make sure a quota project is added. Or you can use service accounts instead. For more information about service accounts, see https://cloud.google.com/docs/authentication/\n", - " warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)\n" - ] - }, - { - "data": { - "text/plain": [ - "['/airline',\n", - " '/dnscensus2013',\n", - " '/github-data',\n", - " '/iris',\n", - " '/nyc-taxi',\n", - " '/nyc-taxi/2015.parquet',\n", - " '/nyc-taxi/csv',\n", - " '/nyc-taxi/csv/2014',\n", - " '/nyc-taxi/csv/2015',\n", - " '/nyc-taxi/csv/2016',\n", - " '/nyc-taxi/nyc.parquet',\n", - " '/nyc-taxi/taxi.parquet',\n", - " '/orc',\n", - " '/packages',\n", - " '/projects-data',\n", - " '/projects-data/tensorboard']" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# Show contents of folder recursively\n", "dp.show('gs://anaconda-public-data')" @@ -57,32 +23,10 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "4d987875-af1b-4c0d-9a6e-2ad16bc3b223", "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/bjornandre/Library/Caches/pypoetry/virtualenvs/dapla-toolbelt-iCf-zdcD-py3.10/lib/python3.10/site-packages/google/auth/_default.py:83: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a \"quota exceeded\" or \"API not enabled\" error. We recommend you rerun `gcloud auth application-default login` and make sure a quota project is added. Or you can use service accounts instead. For more information about service accounts, see https://cloud.google.com/docs/authentication/\n", - " warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)\n" - ] - }, - { - "data": { - "text/plain": [ - "[{'Size': 4636,\n", - " 'Name': '/iris/iris.csv',\n", - " 'Created': '2017-04-05T21:51:42.503Z',\n", - " 'Updated': '2017-04-05T21:51:42.503Z'}]" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# Show file or folder detalis\n", "dp.details('gs://anaconda-public-data/iris/iris.csv')" @@ -90,162 +34,10 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "id": "c3ce598a-031c-4b40-92a0-36cd44cfd0d9", "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/bjornandre/Library/Caches/pypoetry/virtualenvs/dapla-toolbelt-iCf-zdcD-py3.10/lib/python3.10/site-packages/google/auth/_default.py:83: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a \"quota exceeded\" or \"API not enabled\" error. We recommend you rerun `gcloud auth application-default login` and make sure a quota project is added. Or you can use service accounts instead. For more information about service accounts, see https://cloud.google.com/docs/authentication/\n", - " warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - " | petal_length | \n", - "sepal_length | \n", - "petal_width | \n", - "sepal_width | \n", - "species | \n", - "
---|---|---|---|---|---|
0 | \n", - "5.1 | \n", - "3.5 | \n", - "1.4 | \n", - "0.2 | \n", - "Iris-setosa | \n", - "
1 | \n", - "4.9 | \n", - "3.0 | \n", - "1.4 | \n", - "0.2 | \n", - "Iris-setosa | \n", - "
2 | \n", - "4.7 | \n", - "3.2 | \n", - "1.3 | \n", - "0.2 | \n", - "Iris-setosa | \n", - "
3 | \n", - "4.6 | \n", - "3.1 | \n", - "1.5 | \n", - "0.2 | \n", - "Iris-setosa | \n", - "
4 | \n", - "5.0 | \n", - "3.6 | \n", - "1.4 | \n", - "0.2 | \n", - "Iris-setosa | \n", - "
... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "
146 | \n", - "6.7 | \n", - "3.0 | \n", - "5.2 | \n", - "2.3 | \n", - "Iris-virginica | \n", - "
147 | \n", - "6.3 | \n", - "2.5 | \n", - "5.0 | \n", - "1.9 | \n", - "Iris-virginica | \n", - "
148 | \n", - "6.5 | \n", - "3.0 | \n", - "5.2 | \n", - "2.0 | \n", - "Iris-virginica | \n", - "
149 | \n", - "6.2 | \n", - "3.4 | \n", - "5.4 | \n", - "2.3 | \n", - "Iris-virginica | \n", - "
150 | \n", - "5.9 | \n", - "3.0 | \n", - "5.1 | \n", - "1.8 | \n", - "Iris-virginica | \n", - "
151 rows × 5 columns
\n", - "