Skip to content

Commit 5fdd5a0

Browse files
cpsievertwch
andauthored
Initial release (v0.2.1) (#266)
* Bump version to 0.2.1 * Clean up README * Add pypi deploy workflow steps; remove project URLs * Add a long_description that points to the README * Temporarily bump version * Make sure deploy only runs once, and require build to pass Co-authored-by: Winston Chang <[email protected]>
1 parent 3f348f1 commit 5fdd5a0

File tree

4 files changed

+49
-37
lines changed

4 files changed

+49
-37
lines changed

.github/workflows/pytest.yaml

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Run tests
22

3-
on: [push]
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: ["main", "rc-*"]
7+
pull_request:
8+
release:
9+
types: [published]
410

511
jobs:
612
build:
@@ -93,3 +99,40 @@ jobs:
9399
if: steps.install.outcome == 'success' && (success() || failure())
94100
run: |
95101
make lint
102+
103+
deploy:
104+
name: "Deploy to PyPI"
105+
runs-on: ubuntu-latest
106+
if: github.event_name == 'release'
107+
needs: [build]
108+
steps:
109+
- uses: actions/checkout@v2
110+
- name: "Set up Python 3.8"
111+
uses: actions/setup-python@v2
112+
with:
113+
python-version: "3.8"
114+
- name: Install dependencies
115+
run: |
116+
python -m pip install --upgrade pip
117+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
118+
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
119+
- name: "Build Package"
120+
run: |
121+
make dist
122+
123+
# test deploy ----
124+
- name: "Test Deploy to PyPI"
125+
uses: pypa/gh-action-pypi-publish@release/v1
126+
if: startsWith(github.event.release.name, 'TEST')
127+
with:
128+
user: __token__
129+
password: ${{ secrets.PYPI_TEST_API_TOKEN }}
130+
repository_url: https://test.pypi.org/legacy/
131+
132+
## prod deploy ----
133+
- name: "Deploy to PyPI"
134+
uses: pypa/gh-action-pypi-publish@master
135+
if: startsWith(github.event.release.name, 'shiny')
136+
with:
137+
user: __token__
138+
password: ${{ secrets.PYPI_API_TOKEN }}

README.md

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,12 @@
11
Shiny for Python
22
================
33

4-
This repository contains an implementation of Shiny for Python. It works with Python 3.7 and above.
4+
See the [Shiny for Python website](https://shiny.rstudio.com/py/).
55

6-
## Usage
7-
8-
First clone the [py-htmltools](https://github.com/rstudio/py-htmltools) repository and install the package:
9-
10-
```sh
11-
git clone https://github.com/rstudio/py-htmltools.git
12-
cd py-htmltools
13-
pip install -r requirements.txt
14-
pip install -e .
15-
```
16-
17-
(Note: `pip install -e .` will make the package load from the dev directory on disk; then whenever you update the code, it will immediately be available to Python without having to reinstall. If you want to install these packages the normal way, use `make install` instead.)
18-
19-
Next, clone this repository and install it:
20-
21-
```sh
22-
git clone https://github.com/rstudio/py-shiny.git
23-
cd py-shiny
24-
pip install -r requirements.txt
25-
pip install -e .
26-
```
27-
28-
To run an example app:
29-
30-
```sh
31-
shiny run examples/inputs/
32-
```
33-
34-
Then visit the app by pointing a web browser to http://localhost:8000/.
356

367
## Development
378

38-
If you want to do development, run:
9+
If you want to do development on Shiny for Python:
3910

4011
```sh
4112
pip install -r requirements-dev.txt

setup.cfg

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ author = Winston Chang
55
author_email = [email protected]
66
url = https://github.com/rstudio/py-shiny
77
description = A web development framework for Python.
8+
long_description = file: README.md
9+
long_description_content_type = text/markdown
810
license = MIT
911
license_file = LICENSE
1012
platforms = any
@@ -17,10 +19,6 @@ classifiers =
1719
Programming Language :: Python :: 3.8
1820
Programming Language :: Python :: 3.9
1921
Programming Language :: Python :: 3.10
20-
project_urls =
21-
Bug Tracker = https://github.com/rstudio/py-shiny/issues
22-
Documentation = https://shiny.rstudio.com/py/
23-
Source Code = https://github.com/rstudio/py-shiny
2422

2523

2624

shiny/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""A package for building reactive web applications."""
22

3-
__version__ = "0.2.0.9015"
3+
__version__ = "0.2.1"
44

55
from ._shinyenv import is_pyodide as _is_pyodide
66

0 commit comments

Comments
 (0)