Skip to content

Commit

Permalink
Remove returns dependency (#46)
Browse files Browse the repository at this point in the history
* removes returns from  get_client and create

* removes returns from list_files

* removes returns from list_buckets

* removes returns from delete, delete_file, get(bucket) and upload_file

* removes rest of returns dependencies

* change from deprecated download_as_string -> download_as_bytes

* Fix tests

* bump dependencies

* add 3.9 and 3.10 to python versions

* removes unused class variable

* Bumps storage-bucket version and also creates changelog.md
  • Loading branch information
thomasborgen authored Dec 16, 2021
1 parent 076356c commit df25971
Show file tree
Hide file tree
Showing 21 changed files with 1,023 additions and 1,097 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: ['3.6', '3.7', '3.8', '3.9']

steps:
- uses: actions/checkout@v2
Expand All @@ -18,25 +18,22 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Create gcloud key file
run: echo ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }} > key.json
run: openssl base64 -d -A <<< '${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}' -out key.json

- name: Install poetry
run: |
curl -sSL \
"https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py" | python
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
- name: Set up cache
uses: actions/cache@v1
with:
path: .venv
key: venv-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: |
source "$HOME/.poetry/env"
poetry config virtualenvs.in-project true
poetry install
- name: Run tests
run: |
source "$HOME/.poetry/env"
poetry run poetry check
poetry run pip check
poetry run flake8 .
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Changelog

| Change | Bumps |
| - | - |
| Breaking | major |
| New Feature | minor |
| otherwise | patch |

## Latest Changes

## 2.0.0 - Return to life before `returns`

This change has been on my mind a while. Using Returns library and especially wanting to use its latest releases creates a dependency hell since every release is breaking. We don't really need it so until its mature enough, lets stop using it.

### Breaking changes

* Remove `returns` dependency
* One can no longer use `.map`, `.bind`, `.failure` etc after calling the Callable objects like `DeleteFile()().bind(...)`.
* Instead use the normal snake_case functions like: `delete_file()`

### Fixes

* Test workflows in github are now working again after some key changes.
Loading

0 comments on commit df25971

Please sign in to comment.