Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial work for release #142

Merged
merged 4 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 42 additions & 17 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,52 @@ on:
push:
tags: v[0-9]+.[0-9]+.[0-9]+

workflow_dispatch:



jobs:
build:
name: Build distribution
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install pypa/build
run: python3 -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/

# TODO: Add logic to do github release too here

publish:
name: Publish to TestPyPI
runs-on: ubuntu-latest
environment:
# name: pypi
name: testpypi
url: https://pypi.org/project/pyscript
permissions:
id-token: ${{ secrets.PYPI_TOKEN }}

steps:
- name: Check out repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Set up python 3.9
uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4
- name: Download all the dists
uses: actions/download-artifacts@v3
with:
python-version: 3.9
- name: Install Poetry
uses: snok/[email protected]
name: python-package-distributions
path: dist/
- name: Publish release to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# This is for testing
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install package dependencies
run: poetry install --no-dev
- name: Build package
run: poetry build
- name: Publish package
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish
repository-url: https://test.pypi.org/legacy/
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,24 @@ A command-line interface for [PyScript](https://pyscript.net).

Quickly wrap Python scripts into a HTML template, pre-configured with [PyScript](https://pyscript.net).

<img src="https://user-images.githubusercontent.com/11037737/166966219-9440c3cc-e911-4730-882c-2ab9fa47147f.gif" style="width: 100%; max-width: 680px;" />
```bash
❯ pyscript

Usage: pyscript [OPTIONS] COMMAND [ARGS]...

Command Line Interface for PyScript.

╭─ Options ──────────────────────────────────────────────────────────────────────────────────────╮
│ --version Show project version and exit. │
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────╮
│ create Create a new pyscript project with the passed in name, creating a new directory in the │
│ current directory. Alternatively, use `--wrap` so as to embed a python file instead. │
│ run Creates a local server to run the app on the path and port specified. │
╰────────────────────────────────────────────────────────────────────────────────────────────────╯

```

## Installation

Expand Down
24 changes: 22 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,20 @@ requires = ["setuptools", "setuptools-scm"]
authors = [
{name = "Matt Kramer", email = "[email protected]"},
{name = "Fabio Pliger", email = "[email protected]"},
{name = "Nicholas Tollervey", email = "[email protected]"}
{name = "Nicholas Tollervey", email = "[email protected]"},
{name = "Fabio Rosado", email = "[email protected]"}
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Pre-processors"
]
dependencies = [
'importlib-metadata; python_version<"3.8"',
Expand All @@ -19,11 +32,12 @@ dependencies = [
"requests<=2.31.0"
]
description = "Command Line Interface for PyScript"
keywords = ["pyscript", "cli", "pyodide", "micropython", "pyscript-cli"]
license = {text = "Apache-2.0"}
name = "pyscript"
readme = "README.md"
requires-python = ">=3.9"
version = "0.2.5"
version = "0.3.0"

[project.optional-dependencies]
dev = [
Expand All @@ -43,3 +57,9 @@ docs = [

[project.scripts]
pyscript = "pyscript.cli:app"

[project.urls]
Documentation = "https://docs.pyscript.net"
Examples = "https://pyscript.com/@examples"
Homepage = "https://pyscript.net"
Repository = "https://github.com/pyscript/pyscript-cli"
Loading