Skip to content

Commit

Permalink
Publish workflow testing
Browse files Browse the repository at this point in the history
  • Loading branch information
harskish committed Feb 12, 2024
1 parent f9f0704 commit 3f953cf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:

- name: Check metadata
run: pipx run twine check dist/*

- name: Print whl contents
run: unzip -l dist/pyviewer-*.whl

upload_pypi:
needs: [dist]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
build/
dist/
*.ini
*.whl
7 changes: 5 additions & 2 deletions pyviewer/gl_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def __init__(self, title, inifile=None, swap_interval=0, hidden=False):

font = self.get_default_font()

# MPLUSRounded1c-Medium.tff: no content for sizes >35
# MPLUSRounded1c-Medium.ttf: no content for sizes >35
# Apple M1, WSL have have low texture count limits
font_sizes = range(8, 36, 1) if 'win32' in platform else range(8, 36, 2)
font_sizes = [int(s) for s in font_sizes]
Expand All @@ -355,7 +355,10 @@ def __init__(self, title, inifile=None, swap_interval=0, hidden=False):
self.set_ui_scale(self.ui_scale)

def get_default_font(self):
return str(Path(__file__).parent / 'MPLUSRounded1c-Medium.ttf')
font = Path(__file__).parent / 'MPLUSRounded1c-Medium.ttf'
assert font.is_file(), f'Font file missing: "{font.resolve()}"'
print("Found font:", font)
return str(font)

def push_context(self):
if has_pycuda:
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
print("WARNING: 'python setup.py develop' won't install \
dependencies correctly, please use 'pip install -e .' instead.")

# Workflow:
# Version bump workflow:
# Increment version number (together with other changes)
# git commit
# git tag -a "vX.X.X" -m "vX.X.X" (only annotated tags show up in GitHub)
# git push --follow-tags

# Test package_data changes with:
# `rm -r build\ && pip wheel . && unzip -l pyviewer-*.whl`
setup(name='pyviewer',
version='1.3.9',
description='Interactyive python viewers',
Expand Down

0 comments on commit 3f953cf

Please sign in to comment.