Skip to content

Commit

Permalink
add partial minimal package example
Browse files Browse the repository at this point in the history
  • Loading branch information
lkeegan committed Jan 11, 2024
1 parent 69b1b18 commit 6cc21de
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 0 deletions.
9 changes: 9 additions & 0 deletions calculate-minimal/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "calculate"
version = "0.0.1"
#dependencies = ["numpy", "click"]
#requires-python = ">=3.8"
Empty file.
5 changes: 5 additions & 0 deletions calculate-minimal/src/calculate/stats.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import random


def flip_coin():
return random.choice(["Heads", "Tails"])
11 changes: 11 additions & 0 deletions calculate/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "calculate"
version = "0.0.1"
dependencies = ["click"]

[project.scripts]
coinflip = "calculate.stats:flip_coin"
Empty file.
7 changes: 7 additions & 0 deletions calculate/src/calculate/stats.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import random
import click


@click.command()
def flip_coin():
return random.choice(["Heads", "Tails"])

0 comments on commit 6cc21de

Please sign in to comment.