Skip to content

Commit

Permalink
Enable installing tome via pip (dbolya#14)
Browse files Browse the repository at this point in the history
* Update README.md

* publish v0.1

* release v0.1

* enable to install via pip

* minor fix

---------

Co-authored-by: Makoto Shing <[email protected]>
  • Loading branch information
mkshing and Makoto Shing authored Apr 2, 2023
1 parent 342a1c4 commit 87bcbbf
Show file tree
Hide file tree
Showing 3 changed files with 162 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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: Upload Python Package

on:
release:
types: [published]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
125 changes: 123 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,124 @@
build/
# Mac
.DS_Store

tags
*.onnx
node_modules/
*.swp

# Byte-compiled / optimized / DLL files
__pycache__/
tomesd.egg-info/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
dotenv/local.env
dotenv/secrets.env
dotenv/locals/
work

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# Pycharm project setting
.idea

# mkdocs documentation
/site

# mypy
.mypy_cache/

#proxy test
/test_proxy
.dmypy.json

3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
description="Token Merging for Stable Diffusion",
install_requires=["torch"],
packages=find_packages(exclude=("examples", "build")),
license = 'MIT',
long_description=open("README.md", "r", encoding="utf-8").read(),
long_description_content_type="text/markdown",
)

0 comments on commit 87bcbbf

Please sign in to comment.