-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update pre-commit, add python versions (#508)
* Update pre-commit, add python versions * Skip fuse test for some python versions
- Loading branch information
Showing
25 changed files
with
233 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,49 +2,55 @@ name: CI | |
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
defaults: | ||
run: | ||
shell: bash -l -eo pipefail {0} | ||
|
||
jobs: | ||
test: | ||
name: Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9"] | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Conda Environment | ||
uses: conda-incubator/setup-miniconda@v2 | ||
uses: mamba-org/provision-with-micromamba@main | ||
with: | ||
auto-update-conda: true | ||
miniconda-version: latest | ||
activate-environment: test | ||
python-version: ${{ matrix.python-version }} | ||
cache-downloads: true | ||
environment-file: environment_gcsfs.yaml | ||
environment-name: gcsfs_test | ||
extra-specs: | | ||
python=${{ matrix.python-version }} | ||
- name: Install dependencies | ||
shell: bash -l {0} | ||
- name: Conda info | ||
run: | | ||
conda install -c conda-forge pytest ujson requests decorator google-auth aiohttp google-auth-oauthlib google-cloud-core google-api-core google-api-python-client -y | ||
pip install git+https://github.com/fsspec/filesystem_spec --no-deps | ||
conda list | ||
conda --version | ||
- name: Install | ||
shell: bash -l {0} | ||
run: pip install .[crc] | ||
- name: Install libfuse | ||
run: (sudo apt-get install -y fuse || echo "Error installing fuse.") | ||
|
||
- name: Run Tests | ||
shell: bash -l {0} | ||
- name: Run tests | ||
run: | | ||
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/gcsfs/tests/fake-secret.json | ||
py.test -vv gcsfs | ||
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/gcsfs/tests/fake-secret.json | ||
pytest -vv \ | ||
--log-format="%(asctime)s %(levelname)s %(message)s" \ | ||
--log-date-format="%H:%M:%S" \ | ||
gcsfs/ | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- uses: pre-commit/[email protected] | ||
- uses: actions/[email protected] | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
- uses: pre-commit/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
exclude: versioneer.py | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.4.0 | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- repo: https://github.com/ambv/black | ||
rev: 22.3.0 | ||
- id: requirements-txt-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/psf/black | ||
rev: 22.10.0 | ||
hooks: | ||
- id: black | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.8.4 | ||
- id: black | ||
args: | ||
- --target-version=py37 | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
files: gcsfs/ | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black", "--filter-files"] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.2.3 | ||
hooks: | ||
- id: pyupgrade | ||
args: | ||
- --py37-plus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
numpydoc | ||
docutils<0.18 | ||
numpydoc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: gcsfs_test | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- aiohttp | ||
- crcmod | ||
- decorator | ||
- fsspec | ||
- fusepy<3 | ||
- google-api-core | ||
- google-api-python-client | ||
- google-auth | ||
- google-auth-oauthlib | ||
- google-cloud-core | ||
- libfuse<3 | ||
- pytest | ||
- pytest-timeout | ||
- requests | ||
- ujson | ||
- pip: | ||
- git+https://github.com/fsspec/filesystem_spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.