Skip to content

Commit 80273e6

Browse files
committed
Roll first version of the package
1 parent 44d341b commit 80273e6

File tree

8 files changed

+557
-1
lines changed

8 files changed

+557
-1
lines changed

.github/workflows/publish.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Publish Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
cache: pip
23+
cache-dependency-path: python/pyproject.toml
24+
- name: Install dependencies
25+
run: |
26+
cd python/
27+
pip install '.[test]'
28+
- name: Run tests
29+
run: |
30+
pytest
31+
deploy:
32+
runs-on: ubuntu-latest
33+
needs: [test]
34+
environment: release
35+
permissions:
36+
id-token: write
37+
steps:
38+
- uses: actions/checkout@v4
39+
- name: Set up Python
40+
uses: actions/setup-python@v5
41+
with:
42+
python-version: "3.12"
43+
cache: pip
44+
cache-dependency-path: python/pyproject.toml
45+
- name: Install dependencies
46+
run: |
47+
pip install setuptools wheel build
48+
- name: Build
49+
run: |
50+
cd python
51+
python -m build
52+
- name: Publish
53+
uses: pypa/gh-action-pypi-publish@release/v1
54+

.github/workflows/test.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
cache: pip
21+
cache-dependency-path: pyproject.toml
22+
- name: Install dependencies
23+
run: |
24+
pip install '.[test]'
25+
- name: Run tests
26+
run: |
27+
pytest
28+

python/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# MIT License
2+
3+
Copyright (c) 2024 countdown authors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

python/README.md

+42-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,47 @@
11
# countdown for Python
22

3+
[![PyPI](https://img.shields.io/pypi/v/countdown.svg)](https://pypi.org/project/countdown/)
4+
[![Tests](https://github.com/gadenbuie/countdown/actions/workflows/test.yml/badge.svg)](https://github.com/gadenbuie/countdown/actions/workflows/test.yml)
5+
[![Changelog](https://img.shields.io/github/v/release/gadenbuie/countdown?include_prereleases&label=changelog)](https://github.com/gadenbuie/countdown/releases)
6+
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/gadenbuie/countdown/blob/main/LICENSE)
7+
8+
A simple countdown timer for slides and HTML documents written in 'Jupyter' or 'Quarto'. Integrates fully into 'Shiny for Python' apps. Countdown to something amazing.
9+
10+
## Coming Soon (TM)
11+
312
We're currently working toward implementing a Python package for countdown.
413
This will likely come over the next couple of months.
514

6-
In the interim, we suggest viewing the [`Quarto`](../quarto) or [`R`](../r/) extensions.
15+
In the interim, we suggest viewing the [`Quarto`](../quarto) or [`R`](../r/) extensions.
16+
17+
<!--
18+
## Installation
19+
20+
Install this library using `pip`:
21+
22+
```bash
23+
pip install countdown
24+
```
25+
26+
## Usage
27+
28+
Usage instructions go here.
29+
30+
-->
31+
32+
## Development
33+
34+
To contribute to this library, first checkout the code. Then create a new virtual environment:
35+
```bash
36+
cd countdown
37+
python -m venv venv
38+
source venv/bin/activate
39+
```
40+
Now install the dependencies and test dependencies:
41+
```bash
42+
pip install -e '.[test]'
43+
```
44+
To run the tests:
45+
```bash
46+
pytest
47+
```

0 commit comments

Comments
 (0)