From d9224cd6fc6a95d4fe149cbdd1836c96c6e75bdb Mon Sep 17 00:00:00 2001 From: Sepand Haghighi Date: Fri, 9 Sep 2022 22:04:56 +0430 Subject: [PATCH] Anaconda workflow (#148) * fix : anaconda workflow added #137 * fix : version_check script updated #137 * fix : publish.yaml renamed to publish_pypi.yaml #137 * doc : anaconda badge added to README.md #137 * doc : CHANGELOG updated * fix : meta.yaml version fixed * fix : autopep8 * fix : autopep8 E721 ignored --- .github/workflows/publish_conda.yaml | 18 +++++++++ .../{publish.yml => publish_pypi.yml} | 0 CHANGELOG.md | 5 +-- README.md | 6 +++ autopep8.bat | 2 +- autopep8.sh | 2 +- otherfiles/meta.yaml | 37 +++++++++++++++++++ otherfiles/version_check.py | 5 ++- 8 files changed, 69 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/publish_conda.yaml rename .github/workflows/{publish.yml => publish_pypi.yml} (100%) create mode 100644 otherfiles/meta.yaml diff --git a/.github/workflows/publish_conda.yaml b/.github/workflows/publish_conda.yaml new file mode 100644 index 0000000..97751a8 --- /dev/null +++ b/.github/workflows/publish_conda.yaml @@ -0,0 +1,18 @@ +name: publish_conda + +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - '*' # Push events to matching v*, i.e. v1.0, v20.15.10 + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: publish-to-conda + uses: sepandhaghighi/conda-package-publish-action@v1.2 + with: + subDir: 'otherfiles' + AnacondaToken: ${{ secrets.ANACONDA_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish_pypi.yml similarity index 100% rename from .github/workflows/publish.yml rename to .github/workflows/publish_pypi.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index be03536..be8c0e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] -### Addded -- `Point Color` section to `demo.ipynb` -- `Point Color` section to `README.md` +### Added +- Anaconda workflow ### Changed - `README.md` updated - `demo.ipynb` updated diff --git a/README.md b/README.md index c6fc096..dc0532e 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ PyPI version + Samila-Colab @@ -102,6 +103,11 @@ Samila is a generative art generator written in Python, Samila let's you create - Run `easy_install --upgrade samila` (Need root access) +### Conda + +- Check [Conda Managing Package](https://conda.io) +- `conda install -c sepandhaghighi samila` (Need root access) + ## Usage diff --git a/autopep8.bat b/autopep8.bat index 24dc840..7029efb 100644 --- a/autopep8.bat +++ b/autopep8.bat @@ -1,2 +1,2 @@ -python -m autopep8 samila --recursive --aggressive --aggressive --in-place --pep8-passes 2000 --verbose +python -m autopep8 samila --recursive --aggressive --aggressive --in-place --pep8-passes 2000 --verbose --ignore=E721 python -m autopep8 setup.py --recursive --aggressive --aggressive --in-place --pep8-passes 2000 --verbose diff --git a/autopep8.sh b/autopep8.sh index 9b77a9c..5b2f3c6 100644 --- a/autopep8.sh +++ b/autopep8.sh @@ -1,3 +1,3 @@ #!/bin/sh -python -m autopep8 samila --recursive --aggressive --aggressive --in-place --pep8-passes 2000 --verbose +python -m autopep8 samila --recursive --aggressive --aggressive --in-place --pep8-passes 2000 --verbose --ignore=E721 python -m autopep8 setup.py --recursive --aggressive --aggressive --in-place --pep8-passes 2000 --verbose diff --git a/otherfiles/meta.yaml b/otherfiles/meta.yaml new file mode 100644 index 0000000..0c23bd2 --- /dev/null +++ b/otherfiles/meta.yaml @@ -0,0 +1,37 @@ +{% set name = "samila" %} +{% set version = "0.8" %} + +package: + name: {{ name|lower }} + version: {{ version }} +source: + git_url: https://github.com/sepandhaghighi/samila + git_rev: v{{ version }} +build: + noarch: python + number: 0 + script: {{ PYTHON }} -m pip install . -vv +requirements: + host: + - pip + - setuptools + - python >=3.5 + run: + - art >=1.8 + - matplotlib >=3.0.0 + - requests >=2.20.0 + - python >=3.5 +about: + home: https://github.com/sepandhaghighi/samila + license: MIT + license_family: MIT + summary: Generative Art Generator + description: | + Samila is a generative art generator written in Python, Samila let's you create arts based on many thousand points. The position of every single point is calculated by a formula, which has random parameters. Because of the random numbers, every image looks different. + + Website: https://www.samila.site + + Repo: https://github.com/sepandhaghighi/samila +extra: + recipe-maintainers: + - sepandhaghighi diff --git a/otherfiles/version_check.py b/otherfiles/version_check.py index 66ca7a4..dc7d585 100644 --- a/otherfiles/version_check.py +++ b/otherfiles/version_check.py @@ -19,9 +19,12 @@ CHANGELOG_ITEMS = [ "https://github.com/sepandhaghighi/samila/compare/v{0}...dev", "[{0}]:"] PARAMS_ITEMS = ['SAMILA_VERSION = "{0}"'] + +META_ITEMS = ['% set version = "{0}" %'] + FILES = { "setup.py": SETUP_ITEMS, "README.md": README_ITEMS, "CHANGELOG.md": CHANGELOG_ITEMS, os.path.join( - "samila", "params.py"): PARAMS_ITEMS} + "samila", "params.py"): PARAMS_ITEMS, os.path.join("otherfiles", "meta.yaml"): META_ITEMS} TEST_NUMBER = len(FILES.keys())