Skip to content

Commit

Permalink
Merge pull request #53 from justindujardin/fix/pylance-imports
Browse files Browse the repository at this point in the history
Better Auto Imports, Types, and Tests
  • Loading branch information
justindujardin authored Apr 22, 2021
2 parents 3e53f21 + e61fb01 commit 1afd9a4
Show file tree
Hide file tree
Showing 38 changed files with 2,907 additions and 2,498 deletions.
10 changes: 10 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[run]
omit =
# omit tests
*/_tests/*


[report]
exclude_lines =
pragma: no cover
if __name__ == .__main__.:
52 changes: 52 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.6, 3.9]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: sh tools/setup.sh
- name: Lint Codebase
run: sh tools/lint.sh
- name: Build Wheel
run: sh tools/build.sh
- name: Test Wheel
env:
GCS_CREDENTIALS: ${{ secrets.GCS_CREDENTIALS }}
run: rm -rf ./pathy/ && sh tools/test_package.sh
- name: Report Code Coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: sh tools/codecov.sh

deploy:
runs-on: ubuntu-latest
needs: "build"
if: github.ref == 'refs/heads/master'
steps:
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: "12"
- name: Deploy
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sh tools/deploy.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ sdist/
wheels/
*.egg-info/
*.egg
.test-env/

# Unit test / coverage reports
htmlcov/
Expand Down
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ include README.md
include LICENSE
include pathy/py.typed
include requirements.txt
include pathy/tests/fixtures/*
include pathy/_tests/fixtures/*
18 changes: 0 additions & 18 deletions Makefile

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pathy: a Path interface for local and cloud bucket storage

[![Build status](https://travis-ci.com/justindujardin/pathy.svg?branch=master)](https://travis-ci.com/justindujardin/pathy)
[![Build](https://github.com/justindujardin/pathy/actions/workflows/python-package.yml/badge.svg)](https://github.com/justindujardin/pathy/actions/workflows/python-package.yml)
[![codecov](https://codecov.io/gh/justindujardin/pathy/branch/master/graph/badge.svg)](https://codecov.io/gh/justindujardin/pathy)
[![Pypi version](https://badgen.net/pypi/v/pathy)](https://pypi.org/project/pathy/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
Expand Down Expand Up @@ -304,7 +304,7 @@ Determine if this path points to the same location as other_path.
## stat <kbd>method</kbd>

```python (doc)
Pathy.stat(self: 'Pathy') -> pathy.base.BlobStat
Pathy.stat(self: 'Pathy') -> pathy.BlobStat
```

Returns information about this bucket path.
Expand Down Expand Up @@ -353,7 +353,7 @@ Stat for a bucket item
```python (doc)
use_fs(
root: Optional[str, pathlib.Path, bool] = None,
) -> Optional[pathy.file.BucketClientFS]
) -> Optional[pathy.BucketClientFS]
```

Use a path in the local file-system to store blobs and buckets.
Expand All @@ -364,7 +364,7 @@ applications.
# get_fs_client <kbd>function</kbd>

```python (doc)
get_fs_client() -> Optional[pathy.file.BucketClientFS]
get_fs_client() -> Optional[pathy.BucketClientFS]
```

Get the file-system client (or None)
Expand Down
Loading

0 comments on commit 1afd9a4

Please sign in to comment.