From 4a592bd94e5d3c16369f2d79bc2f5db20d99dfa5 Mon Sep 17 00:00:00 2001 From: Philipp Wiesner Date: Mon, 12 Nov 2018 10:25:25 +0100 Subject: [PATCH] Travis pypi deployment (#2) Implemented deploy step for releasing 0.2.0 --- .travis.yml | 10 +++++++++- CHANGELOG.rst | 9 +++++++++ README.rst | 8 +++++++- fs_gcsfs/__init__.py | 5 +++-- fs_gcsfs/_version.py | 1 + setup.cfg | 2 +- setup.py | 10 +++++++--- 7 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 fs_gcsfs/_version.py diff --git a/.travis.yml b/.travis.yml index 5acf647..b6a88cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ sudo: false language: python + python: - "3.5" - - "3.6" install: - pip install pipenv @@ -12,5 +12,13 @@ script: - flake8 # - pytest --cov=fs_gcsfs --cov-branch --cov-report=xml TODO: Find a way to run the tests without accessing an actual bucket +deploy: + provider: pypi + user: othoz + password: + secure: cjuKT6NBmpvaMUQBHNASnP/J4YQoHtBU3OoW8rmvPbWz/fsllaXYv0IZSv+A2Y3pTa7um/jGDezn7s37hPpmvBKCF5UDqEjkEd+rTEdXgZMB0KY2JU2xSfVeyTH0CxQWQWpL6BXs1+lCtJv50ckNGm9WjhkhQSub+UpvAg3CkFlb8t+aZWXKqF7+PSW+pCtQbzcXJqBfNOYa0gB/F4IKj7O52zWlAiO609fvF0vvC+eyY1wB2IKejvKedRes9pxq04r9YatsXP3ynFesfrLEbccz7NEb6Ek0fNx0Cfjnci8vsnRV2SST/gzacp4n6J8e/3l07ZG4LwFbIq1U3D/29ZCZeNA/ahD/wzu3hIqAmYcND8hGyh5kYbWGDRqguFzBGWvsJDxXc6dHFb4dQu7j3Iol4NYy2TZSPvnGnMYX9yqM9sAS3QU12aJBuzl0ItY1s978orI9edLJJmEHVx2hypOtGNZmuTFxfTb1yVY0ivzEOFDOaFMo9ntn+wbf+nCbdjfbP0IlYsTxdt6Fx/6oDdA5kgEczh06k9KxSGutXQMNOT9sjH98Rrkg8Teyhn9Ky7Rn4SXtEjp1KFmDSB/luXyKdG4oAhLa+yeEdTa3mpwqtL+W49BT453WZ3nGsuqqhFCtChIRg98IWLztX+dPzRa7PxxN2ms3BscablB7JjM= + on: + tags: true + after_success: - python-codacy-coverage -r coverage.xml diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a2f4148..cb9b4d0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -20,9 +20,18 @@ Possible types of changes are: Unreleased ---------- + +0.2.0 - 09.11.2018 +------------------ + Changed ''''''' - Open-sourced GCSFS by moving it to GitHub +- Removed ``project`` and ``credentials`` properties from ``GCSFS``. + Instead, one can now optionally pass a ``client`` of type + `google.cloud.storage.Client `_. +- ``GCSFS.getinfo()`` does not magically fix missing directory markers anymore. + Instead, there is a new method ``GCSFS.fix_storage()`` which can be explicitly called to check and fix the entire filesystem. 0.1.6 - 30.10.2018 diff --git a/README.rst b/README.rst index 1911ad5..b5db1aa 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ GCSFS ===== -A Python filesystem abstraction of Google Clod Storage (GCS) implemented as a `PyFilesystem2 `_ extension. +A Python filesystem abstraction of Google Cloud Storage (GCS) implemented as a `PyFilesystem2 `_ extension. .. image:: https://img.shields.io/pypi/v/fs-gcsfs.svg @@ -13,6 +13,12 @@ A Python filesystem abstraction of Google Clod Storage (GCS) implemented as a `P .. image:: https://travis-ci.org/Othoz/gcsfs.svg?branch=master :target: https://travis-ci.org/Othoz/gcsfs +.. image:: https://api.codacy.com/project/badge/Coverage/6377a6e321cd4ccf94dfd6f09456d9ce + :target: https://www.codacy.com/app/Othoz/gcsfs?utm_source=github.com&utm_medium=referral&utm_content=Othoz/gcsfs&utm_campaign=Badge_Coverage + +.. image:: https://api.codacy.com/project/badge/Grade/6377a6e321cd4ccf94dfd6f09456d9ce + :target: https://www.codacy.com/app/Othoz/gcsfs?utm_source=github.com&utm_medium=referral&utm_content=Othoz/gcsfs&utm_campaign=Badge_Grade + .. image:: https://img.shields.io/github/license/Othoz/gcsfs.svg :target: https://github.com/PyFilesystem/pyfilesystem2/blob/master/LICENSE diff --git a/fs_gcsfs/__init__.py b/fs_gcsfs/__init__.py index bae4d67..7d49d48 100644 --- a/fs_gcsfs/__init__.py +++ b/fs_gcsfs/__init__.py @@ -1,3 +1,4 @@ -from ._gcsfs import GCSFS +# flake8: noqa -__all__ = ["GCSFS"] +from ._gcsfs import GCSFS +from ._version import __version__ diff --git a/fs_gcsfs/_version.py b/fs_gcsfs/_version.py new file mode 100644 index 0000000..d3ec452 --- /dev/null +++ b/fs_gcsfs/_version.py @@ -0,0 +1 @@ +__version__ = "0.2.0" diff --git a/setup.cfg b/setup.cfg index 5add43b..ae92555 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [flake8] show_source = True max-line-length = 160 -exclude = .git,__pycache__ +exclude = .git,__pycache__,docs ignore = E402 [coverage:run] diff --git a/setup.py b/setup.py index 393dc1b..3e99deb 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,9 @@ import os from setuptools import setup +version_namespace = {} +with open("fs_gcsfs/_version.py") as f: + exec(f.read(), version_namespace) # nosec # pylint: disable=exec-used here = os.path.abspath(os.path.dirname(__file__)) @@ -11,8 +14,9 @@ if __name__ == "__main__": setup( name="fs-gcsfs", - version="0.1.6", + version=version_namespace["__version__"], author="Othoz GmbH", + author_email="wiesner@othoz.com", description="A PyFilesystem interface to Google Cloud Storage", long_description=long_description, long_description_content_type="text/x-rst", @@ -30,7 +34,7 @@ "gs = fs_gcsfs.opener:GCSFSOpener", ] }, - classifiers=( + classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", @@ -42,5 +46,5 @@ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation", "Topic :: System :: Filesystems", - ), + ], )