Skip to content

Commit 5ca162a

Browse files
authored
Merge pull request #99 from rstudio/ci-deploy-pypi
Ci deploy pypi
2 parents c4f75b5 + 28dd170 commit 5ca162a

File tree

6 files changed

+58
-8
lines changed

6 files changed

+58
-8
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,25 @@ jobs:
159159
with:
160160
github_token: ${{ secrets.GITHUB_TOKEN }}
161161
publish_dir: docs-html
162+
163+
release-pypi:
164+
name: "Release to pypi"
165+
runs-on: ubuntu-latest
166+
if: github.event_name == 'release'
167+
needs: [build-docs, tests, test-rsconnect]
168+
steps:
169+
- uses: actions/checkout@v2
170+
- uses: actions/setup-python@v2
171+
with:
172+
python-version: "3.10"
173+
- name: "Build Package"
174+
run: |
175+
python -m pip install build wheel
176+
python -m build --sdist --wheel
177+
178+
- name: "Deploy to Test PyPI"
179+
uses: pypa/gh-action-pypi-publish@release/v1
180+
with:
181+
user: __token__
182+
password: ${{ secrets.PYPI_API_TOKEN }}
183+
repository_url: https://pypi.org/legacy/

MANIFEST.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
include pins/data/*.csv
1+
prune .*
2+
prune docs

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,25 @@
22

33
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/machow/pins-python/HEAD)
44

5-
## Install
5+
The pins package publishes data, models, and other python objects, making it
6+
easy to share them across projects and with your colleagues. You can pin
7+
objects to a variety of pin *boards*, including folders (to share on a
8+
networked drive or with services like DropBox), RStudio Connect, and Amazon
9+
S3.
10+
Pins can be automatically versioned, making it straightforward to track changes,
11+
re-run analyses on historical data, and undo mistakes.
12+
13+
## Installation
614

715
```shell
8-
python -m pip install git+https://github.com/machow/pins-python
16+
python -m pip install pins
917
```
1018

11-
## Develop
19+
## Usage
20+
21+
See the [documentation](https://rstudio.github.io/pins-python) for getting started.
22+
23+
## Development
1224

1325
### Install pins with dev dependencies
1426

docs/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ The pins package publishes data, models, and other R objects, making it easy to
2424
You can pin objects to a variety of pin *boards*, including folders (to share on a networked drive or with services like DropBox), RStudio Connect, Amazon S3, Azure storage and ~Microsoft 365 (OneDrive and SharePoint)~.
2525
Pins can be automatically versioned, making it straightforward to track changes, re-run analyses on historical data, and undo mistakes.
2626

27-
## 🚧 Installation
27+
## Installation
2828

2929
To try out the development version of pins you'll need to install from GitHub:
3030

3131
```shell
32-
python -m pip install git+https://github.com/machow/pins-python
32+
python -m pip install pins
3333
```
3434

3535
## Usage
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import pandas as pd
2+
3+
from importlib_resources import files
4+
5+
from pins import board_folder
6+
7+
OLD_BOARD = files("pins") / "tests" / "pins-old-types"
8+
DST_DF = pd.DataFrame({"a": [1, 2], "b": ["x", "y"]})
9+
10+
11+
def test_compat_old_types_load_table():
12+
board = board_folder(OLD_BOARD)
13+
src_df = board.pin_read("a-table")
14+
15+
assert isinstance(src_df, pd.DataFrame)
16+
assert src_df.equals(DST_DF)

setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[metadata]
22
name = pins
3-
version = file: VERSION
4-
description = Publish data sets, models, and other R objects, making it easy to share them across projects and with your colleagues.
3+
description = Publish data sets, models, and other python objects, making it easy to share them across projects and with your colleagues.
54
long_description = file: README.md
65
long_description_content_type = text/markdown
76
url = https://github.com/machow/pins-python

0 commit comments

Comments
 (0)