Skip to content

Commit

Permalink
Create python-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Bak committed Oct 18, 2022
1 parent 2783c0f commit 902c810
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 10 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Publish LSystemRenderer to PyPi

on:
release:
types: [published]

permissions:
contents: read

jobs:
build-n-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest

steps:
- name: Ls1
run: ls

- name: Checkout source
uses: actions/checkout@v2

- name: Ls2
run: ls

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"

- name: Build source and wheel distributions
run: |
python -m pip install --upgrade build twine
python setup.py sdist
twine check --strict dist/*
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.LSYSTEM_RENDERER_API_TOKEN }}
6 changes: 2 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
include .gitignore
include LICENCE

include *.py
include *.md

recursive-include conf *.yaml
recursive-include conf *.py
recursive-include conf *
recursive-include lsystem *
14 changes: 10 additions & 4 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ An L-system or Lindenmayer system is a parallel rewriting system and a type of f

# Installation

You can download and install the latest release using pip.
```bash
pip install LSystemRenderer
```
You can download and install the latest release as follows:

1. Open a terminal
2. Run `git clone https://github.com/A-Bak/l-system`
3. Switch to the directory `cd l-system`
4. Run `python setup.py install`
5. Done

## Usage

Expand All @@ -32,6 +35,9 @@ Where `LSYSTEM_NAME` is the name of the L-System configuration file. There are s
|10.|[squared_squares]()|
|11.|[stochastic_plant_edge_rewriting]()|

NOTE: if you want to create your own L-System configuration files add them to the
`conf/lsystem` directory.


### Plant Edge Rewriting 1
![Plant Edge Rewriting 1](./resources/plant_edge_rewriting_1.gif)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setuptools.setup(
name="LSystemRenderer",
version="0.0.3",
version="0.0.9",
author="A-Bak",
author_email="adam.bak.work@gmail.com",
description="Display images generated by L-Systems.",
Expand All @@ -18,7 +18,7 @@
keywords="l-system generative-art image-generation grammar renderer",
url="https://github.com/A-Bak/l-system",
packages=setuptools.find_packages(),
data_files=[("conf", glob.glob("conf/*/*.*"))],
include_package_data=True,
python_requires=">=3.6",
install_requires=required,
classifiers=[
Expand Down

0 comments on commit 902c810

Please # to comment.