这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/pypi_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflows 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

name: Pypi Release

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine pypandoc
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.pypi_username }}
TWINE_PASSWORD: ${{ secrets.pypi_password }}
RELEASE: 1
run: |
python setup.py sdist bdist_wheel
twine upload dist/* --verbose
2 changes: 1 addition & 1 deletion .github/workflows/sphix_build_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
# https://github.com/marketplace/actions/github-pages
- name: Deploy
if: success()
uses: crazy-max/ghaction-github-pages@master
uses: crazy-max/ghaction-github-pages@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
3 changes: 2 additions & 1 deletion experiments/segmentation/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ def test(args):
outname = os.path.splitext(impath)[0] + '.png'
mask.save(os.path.join(outdir, outname))

print( 'pixAcc: %.4f, mIoU: %.4f' % (pixAcc, mIoU))
if args.eval:
print( 'pixAcc: %.4f, mIoU: %.4f' % (pixAcc, mIoU))

class ReturnFirstClosure(object):
def __init__(self, data):
Expand Down
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@

version = '1.2.0'
try:
from datetime import date
today = date.today()
day = today.strftime("b%Y%m%d")
version += day
if not os.getenv('RELEASE'):
from datetime import date
today = date.today()
day = today.strftime("b%Y%m%d")
version += day
except Exception:
pass

Expand Down