Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
javierluraschi committed Mar 13, 2024
0 parents commit 814b26b
Show file tree
Hide file tree
Showing 4 changed files with 135 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Python

# https://raw.githubusercontent.com/messense/crfs-rs/main/.github/workflows/Python.yml

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/ioflow
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@9bf09145c3560e451e8d8e87b42ccb3fef5b692d # v36.3.0
with:
since_last_remote_commit: true
files: |
setup.py
- uses: actions/setup-node@v2
with:
node-version: '18'
- run: npm install
working-directory: ioflow/frontend
- run: npm run build
working-directory: ioflow/frontend
- run: sed -i 's/_RELEASE = False/_RELEASE = True/' __init__.py
working-directory: ioflow
- run: cat __init__.py
working-directory: ioflow
- run: python setup.py sdist bdist_wheel
- name: Publish package distributions to PyPI
if: steps.changed-files.outputs.any_changed == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
69 changes: 69 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
########################################################################
# Python - https://github.com/github/gitignore/blob/master/Python.gitignore
########################################################################
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
build/
dist/
eggs/
.eggs/
*.egg-info/
*.egg

# Unit test / coverage reports
.coverage
.coverage\.*
.pytest_cache/
.mypy_cache/
test-reports

# Test fixtures
cffi_bin

# Pyenv Stuff
.python-version

########################################################################
# OSX - https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
########################################################################
.DS_Store
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

########################################################################
# node - https://github.com/github/gitignore/blob/master/Node.gitignore
########################################################################
# Logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Dependency directories
node_modules/

# Coverage directory used by tools like istanbul
coverage/

# Lockfiles
yarn.lock
package-lock.json

########################################################################
# JetBrains
########################################################################
.idea

########################################################################
# VSCode
########################################################################
.vscode/
g
14 changes: 14 additions & 0 deletions ioflow/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import sys

_RELEASE = False

argvidx = 1

def input(name):
global argvidx
value = sys.argv[argvidx]
argvidx = argvidx + 1
return value

def output(name, value):
return
11 changes: 11 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from setuptools import setup

setup(name='ioflow',
version='0.1',
description='Define inputs and outputs',
url='http://github.com/hal9ai/ioflow',
author='Javier Luraschi',
author_email='[email protected]',
license='MIT',
packages=['ioflow'],
zip_safe=False)

0 comments on commit 814b26b

Please sign in to comment.