From 24a197f760eedf203aa6816c688110918212340d Mon Sep 17 00:00:00 2001 From: Michael Pilosov Date: Sat, 26 Nov 2022 21:54:50 -0700 Subject: [PATCH] packaging, readme --- Makefile | 8 ++++++++ README.md | 34 ++++++++++++++++++++++++++++++++++ setup.py | 3 ++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3848f01 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +build: + rm -rf build/ dist/ *.egg-info/ + python -m build --sdist --wheel -n + +publish: build + twine upload dist/* + +.PHONY: build publish \ No newline at end of file diff --git a/README.md b/README.md index cc8ba7b..f55dd6e 100644 --- a/README.md +++ b/README.md @@ -11,3 +11,37 @@ - When players cannot play their strategy anymore, they leave the game, meaning they can end the simulation with some remaining money (e.g. $100 to play a $40 strategy that you lose twice in a row will leave you with $20 remaining). - When using `generate_players`, all players will have the same number of minimum games and budget. + + +# how to use + +``` +pip install pyroulette +``` + +```python +from pyroulette import generate_players, play_roulette + +players = generate_players( + number_of_players=10, + minimum_number_of_games=10, + budget=100, +) + +results = play_roulette( + players=players, + number_of_games=1000, +) + +for player in results: + print(player) +``` + + +# uploading to pypi + +``` +pip install build +python -m build --sdist --wheel -n +twine upload dist/* +``` diff --git a/setup.py b/setup.py index bbe78fe..86d7703 100644 --- a/setup.py +++ b/setup.py @@ -9,9 +9,10 @@ with open(BASEDIR.joinpath("README.md"), "r") as fp: setup( name="pyroulette", - version="0.0.1rc0", + version="0.0.1rc1", description="A package for exploring roulette strategies.", long_description=LONG_DESCRIPTION, + long_description_content_type='text/markdown', author="Mathematical Michael", author_email="consistentbayes@gmail.com", url="https://github.com/mathematicalmichael/pyroulette",