diff --git a/DEPLOY.md b/DEPLOY.md new file mode 100644 index 0000000..0cd9cd7 --- /dev/null +++ b/DEPLOY.md @@ -0,0 +1,19 @@ +# How to deploy new package version + +## 1. Tag new version +* Update [`pyproject.toml`](./pyproject.toml) with new version +* Merge work to main branch +* Create [new release on GitHub](https://github.com/Max-Derner/colour_fx/releases/new) + +## 2. Create new distribution +* Run `python3 -m build` +**N.B.** Never run build unless you are sure you have changed the version in `pyproject.toml` + +## 3. Upload to [test PyPI](https://test.pypi.org/) +* `python3 -m twine upload --repository testpypi dist/*` + +## 4. Test download +* `python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps colour_fx` + +## 4. Upload to [PyPI](https://pypi.org) +* `twine upload dist/*` \ No newline at end of file diff --git a/README.md b/README.md index 8be001b..fb51a27 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Testing and linting](https://github.com/Max-Derner/colour_effects/actions/workflows/python-testing.yml/badge.svg?branch=main)](https://github.com/Max-Derner/colour_effects/actions/workflows/python-testing.yml) -![promo image](./README_IMGS/promo_img.png) +![promo image](https://github.com/Max-Derner/colour_fx/blob/main/README_IMGS/promo_img.png?raw=true) This a project to develop a Python PyPI package that not just handles colour text output but can also apply colour effects such as gradients to your text. @@ -46,7 +46,7 @@ RESET = compile_ansi_code() print(F"HELLO, {blinking_red_on_yellow}WORLD{RESET}!") ``` -![Colour example output](./README_IMGS/Colour-example-output.gif) +![Colour example output](https://github.com/Max-Derner/colour_fx/blob/main/README_IMGS/Colour-example-output.gif?raw=true) ## 8 bit examples @@ -72,7 +72,7 @@ RESET = compile_ansi_code() print(F"HELLO, {red_on_yellow}WORLD{RESET}!") ``` #### output -![SipleColour example output](./README_IMGS/SimpleColour-example-output.png) +![SipleColour example output](https://github.com/Max-Derner/colour_fx/blob/main//README_IMGS/SimpleColour-example-output.png?raw=true) ### `Grey` ```python @@ -121,7 +121,7 @@ print( ) ``` #### output -![Grey example output](./README_IMGS/Grey-example-output.png) +![Grey example output](https://github.com/Max-Derner/colour_fx/blob/main/README_IMGS/Grey-example-output.png?raw=true) ### `RGB` ```python @@ -157,7 +157,7 @@ print(F"{s[0]}HE{s[1]}LL{s[2]}O,{s[3]} WO{s[4]}RL{s[5]}D!{RESET}") ``` #### output -![RGB output](./README_IMGS/RGB-example-output.png) +![RGB output](https://github.com/Max-Derner/colour_fx/blob/main/README_IMGS/RGB-example-output.png?raw=true) # Getting advanced @@ -204,7 +204,7 @@ output_text = apply_ansi_field( print(output_text) ``` #### output -![vertical gradient example output](./README_IMGS/vertical-gradient-example-output.png) +![vertical gradient example output](https://github.com/Max-Derner/colour_fx/blob/main/README_IMGS/vertical-gradient-example-output.png?raw=true) # Working on this? diff --git a/dev-requirements.txt b/dev-requirements.txt index c370226..169df85 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,3 +1,5 @@ pytest~=8.3 flake8~=7.1 -pytest-cov~=6.0 \ No newline at end of file +pytest-cov~=6.0 +build~=1.2 +twine~=5.1 \ No newline at end of file diff --git a/dist/colour_fx-1.0.1-py3-none-any.whl b/dist/colour_fx-1.0.1-py3-none-any.whl new file mode 100644 index 0000000..8a2dfd1 Binary files /dev/null and b/dist/colour_fx-1.0.1-py3-none-any.whl differ diff --git a/dist/colour_fx-1.0.1.tar.gz b/dist/colour_fx-1.0.1.tar.gz new file mode 100644 index 0000000..2aa1da9 Binary files /dev/null and b/dist/colour_fx-1.0.1.tar.gz differ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8d5c6d6 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,22 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "colour_fx" +version = "1.0.1" +authors = [ + { name="Max Derner", email="max.derner@gmail.com" }, +] +description = "Colour handling through 4 bit and 8 bit ANSI escape sequences. Powerful effects like gradients for blocks of text such as figlet banners." +readme = "README.md" +requires-python = ">=3.9" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] + +[project.urls] +Homepage = "https://github.com/Max-Derner/colour_fx" +Issues = "https://github.com/Max-Derner/colour_fx/issues" \ No newline at end of file