Skip to content

Commit

Permalink
Replace textual demo with posting
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharsadhwani committed Jun 19, 2024
1 parent cb34a60 commit 16fb9ab
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 25 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build-cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ jobs:
packaged ./aliens.sh 'pip install pygame' 'python -m pygame.examples.aliens'
tar czf $ALIENS_NAME ./aliens.sh
# textual: requires no source
TEXTUAL_NAME="textual-${{ matrix.target }}.tar.gz"
TEXTUAL_PATH=${PWD}/${TEXTUAL_NAME}
packaged ./textual.sh 'pip install textual' 'python -m textual'
tar czf $TEXTUAL_NAME ./textual.sh
# posting: requires no source
POSTING_NAME="posting-${{ matrix.target }}.tar.gz"
POSTING_PATH=${PWD}/${POSTING_NAME}
packaged ./posting.sh 'pip install posting' 'posting'
tar czf $POSTING_NAME ./posting.sh
# IPython: requires no source
IPYTHON_NAME="ipython-${{ matrix.target }}.tar.gz"
Expand All @@ -84,8 +84,8 @@ jobs:
echo Setting paths in output
echo ::set-output name=ALIENS_NAME::"${ALIENS_NAME}"
echo ::set-output name=ALIENS_PATH::"${ALIENS_PATH}"
echo ::set-output name=TEXTUAL_NAME::"${TEXTUAL_NAME}"
echo ::set-output name=TEXTUAL_PATH::"${TEXTUAL_PATH}"
echo ::set-output name=POSTING_NAME::"${POSTING_NAME}"
echo ::set-output name=POSTING_PATH::"${POSTING_PATH}"
echo ::set-output name=IPYTHON_NAME::"${IPYTHON_NAME}"
echo ::set-output name=IPYTHON_PATH::"${IPYTHON_PATH}"
echo ::set-output name=MANDELBROT_NAME::"${MANDELBROT_NAME}"
Expand All @@ -99,11 +99,11 @@ jobs:
name: ${{ steps.build.outputs.ALIENS_NAME }}
path: ${{ steps.build.outputs.ALIENS_PATH }}

- name: Upload textual
- name: Upload posting
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build.outputs.TEXTUAL_NAME }}
path: ${{ steps.build.outputs.TEXTUAL_PATH }}
name: ${{ steps.build.outputs.POSTING_NAME }}
path: ${{ steps.build.outputs.POSTING_PATH }}

- name: Upload IPython
uses: actions/upload-artifact@v4
Expand All @@ -130,7 +130,7 @@ jobs:
draft: true
files: |
${{ steps.build.outputs.ALIENS_PATH }}
${{ steps.build.outputs.TEXTUAL_PATH }}
${{ steps.build.outputs.POSTING_PATH }}
${{ steps.build.outputs.IPYTHON_PATH }}
${{ steps.build.outputs.MANDELBROT_PATH }}
${{ steps.build.outputs.MINESWEEPER_PATH }}
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ jobs:
packaged ./aliens.sh 'pip install pygame' 'python -m pygame.examples.aliens'
tar czf $ALIENS_NAME ./aliens.sh
# textual: requires no source
TEXTUAL_NAME="textual-${{ matrix.target }}.tar.gz"
TEXTUAL_PATH=${PWD}/${TEXTUAL_NAME}
packaged ./textual.sh 'pip install textual' 'python -m textual'
tar czf $TEXTUAL_NAME ./textual.sh
# posting: requires no source
POSTING_NAME="posting-${{ matrix.target }}.tar.gz"
POSTING_PATH=${PWD}/${POSTING_NAME}
packaged ./posting.sh 'pip install posting' 'posting'
tar czf $POSTING_NAME ./posting.sh
# IPython: requires no source
IPYTHON_NAME="ipython-${{ matrix.target }}.tar.gz"
Expand All @@ -88,8 +88,8 @@ jobs:
# Setup output paths for upload
echo "ALIENS_NAME=${ALIENS_NAME}" >> $GITHUB_OUTPUT
echo "ALIENS_PATH=${ALIENS_PATH}" >> $GITHUB_OUTPUT
echo "TEXTUAL_NAME=${TEXTUAL_NAME}" >> $GITHUB_OUTPUT
echo "TEXTUAL_PATH=${TEXTUAL_PATH}" >> $GITHUB_OUTPUT
echo "POSTING_NAME=${POSTING_NAME}" >> $GITHUB_OUTPUT
echo "POSTING_PATH=${POSTING_PATH}" >> $GITHUB_OUTPUT
echo "IPYTHON_NAME=${IPYTHON_NAME}" >> $GITHUB_OUTPUT
echo "IPYTHON_PATH=${IPYTHON_PATH}" >> $GITHUB_OUTPUT
echo "MANDELBROT_NAME=${MANDELBROT_NAME}" >> $GITHUB_OUTPUT
Expand All @@ -103,11 +103,11 @@ jobs:
name: ${{ steps.build.outputs.ALIENS_NAME }}
path: ${{ steps.build.outputs.ALIENS_PATH }}

- name: Upload textual
- name: Upload posting
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build.outputs.TEXTUAL_NAME }}
path: ${{ steps.build.outputs.TEXTUAL_PATH }}
name: ${{ steps.build.outputs.POSTING_NAME }}
path: ${{ steps.build.outputs.POSTING_PATH }}

- name: Upload IPython
uses: actions/upload-artifact@v4
Expand All @@ -134,7 +134,7 @@ jobs:
draft: true
files: |
${{ steps.build.outputs.ALIENS_PATH }}
${{ steps.build.outputs.TEXTUAL_PATH }}
${{ steps.build.outputs.POSTING_PATH }}
${{ steps.build.outputs.IPYTHON_PATH }}
${{ steps.build.outputs.MANDELBROT_PATH }}
${{ steps.build.outputs.MINESWEEPER_PATH }}
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,20 @@ without `pyproject.toml` would be:
packaged minesweeper.sh 'pip install .' 'python -m minesweeper' ./example/minesweeper
```

### Textual (TUI) Demo
### Posting (TUI based API testing app)

Posting is a Postman alternative that runs entirely in the terminal. A perfect
candidate to build an executable out of!

Since the dependencies themselves contain all the source code needed, you can
skip the last argument. With this, no other files will be packaged other than
what is produced in the build step.

```bash
packaged ./textual.sh 'pip install textual' 'python -m textual'
packaged ./posting.sh 'pip install posting' 'posting'
```

This will simply package the `textual` library's own demo into a single file.
This will simply package the `posting` app into a single file.

### Aliens (pygame)

Expand Down

0 comments on commit 16fb9ab

Please sign in to comment.