From 8e89ee0834dc2086e8112f181151d21996496074 Mon Sep 17 00:00:00 2001 From: Maksim Shushkevich <83134047+meshushkevich@users.noreply.github.com> Date: Sun, 13 Oct 2024 17:55:35 +0300 Subject: [PATCH 1/4] Create python-publish.yml --- .github/workflows/python-publish.yml | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..40f69c1 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,40 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#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: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.12' + - name: Install dependencies + run: | + pip install poetry + poetry shell + poetry install + - name: Build package + run: poetry build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} From 4cb7c0e0d8eb4b3fcf30cd22bea57e2e1d0130cf Mon Sep 17 00:00:00 2001 From: Maksim Shushkevich <83134047+meshushkevich@users.noreply.github.com> Date: Sun, 13 Oct 2024 17:58:05 +0300 Subject: [PATCH 2/4] Create pylint.yml --- .github/workflows/pylint.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000..0fb348e --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,25 @@ +name: Pylint + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.12"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install poetry + poetry shell + poetry add pylint + poetry install + - name: Analysing the code with pylint + run: | + pylint $(git ls-files '*.py') From 11065e8471a120223d776d2f2dc773fe8ec5bd68 Mon Sep 17 00:00:00 2001 From: Maksim Shushkevich Date: Wed, 16 Oct 2024 10:42:28 +0300 Subject: [PATCH 3/4] Update Actions --- .../{python-publish.yml => publish.yml} | 4 +++ .github/workflows/pylint.yml | 3 ++ .github/workflows/pypi.yml | 35 ------------------- nodeflow/__init__.py | 4 +++ 4 files changed, 11 insertions(+), 35 deletions(-) rename .github/workflows/{python-publish.yml => publish.yml} (99%) delete mode 100644 .github/workflows/pypi.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/publish.yml similarity index 99% rename from .github/workflows/python-publish.yml rename to .github/workflows/publish.yml index 40f69c1..53b61a4 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/publish.yml @@ -22,17 +22,21 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up Python uses: actions/setup-python@v3 with: python-version: '3.12' + - name: Install dependencies run: | pip install poetry poetry shell poetry install + - name: Build package run: poetry build + - name: Publish package uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 with: diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 0fb348e..f610793 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -10,16 +10,19 @@ jobs: python-version: ["3.12"] steps: - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} + - name: Install dependencies run: | pip install poetry poetry shell poetry add pylint poetry install + - name: Analysing the code with pylint run: | pylint $(git ls-files '*.py') diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml deleted file mode 100644 index 39bcd63..0000000 --- a/.github/workflows/pypi.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Upload package to PyPI - -on: - release: - types: [created] - -jobs: - publish: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4.2.0 - - - name: Set up Python - uses: actions/setup-python@v5.1.0 - with: - python-version: '3.12' - - - name: Install Poetry - run: pip install poetry - - - name: Install dependencies - run: poetry install - - - name: Build package - run: poetry build - - - name: Show Secret - run: echo "${{ secrets.PYPI_TOKEN }}" - - - name: Publish to PyPI - env: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - run: poetry publish -u __token__ -p "$PYPI_TOKEN" diff --git a/nodeflow/__init__.py b/nodeflow/__init__.py index e69de29..64a797c 100644 --- a/nodeflow/__init__.py +++ b/nodeflow/__init__.py @@ -0,0 +1,4 @@ +from nodeflow.adapters import * +from nodeflow.converter import * +from nodeflow.manager import * +from nodeflow.node import * From 29b25ccb176831a4f93d7f5a4b083ece67fdcef9 Mon Sep 17 00:00:00 2001 From: Maksim Shushkevich Date: Wed, 16 Oct 2024 10:46:49 +0300 Subject: [PATCH 4/4] Remove pylint.yml --- .github/workflows/pylint.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml deleted file mode 100644 index f610793..0000000 --- a/.github/workflows/pylint.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Pylint - -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.12"] - steps: - - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - pip install poetry - poetry shell - poetry add pylint - poetry install - - - name: Analysing the code with pylint - run: | - pylint $(git ls-files '*.py')