Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor for demonstration #2

Merged
merged 88 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
5547fc4
Remove extras/
janbridley Jul 8, 2024
81b1a98
Remove pipfile
janbridley Jul 8, 2024
ce35689
Remove test notebook
janbridley Jul 8, 2024
3fedfed
Add .pre-commit-config.yaml
janbridley Jul 8, 2024
6004e0a
Lint files
janbridley Jul 8, 2024
890a856
Fix type or
janbridley Jul 8, 2024
ea9b66e
Update .gitignore
janbridley Jul 8, 2024
16ae71c
Fix type or
janbridley Jul 8, 2024
bbeeaaa
Add pyproject.toml
janbridley Jul 8, 2024
1b696c0
Update README.rst
janbridley Jul 8, 2024
d567e33
Add example image
janbridley Jul 8, 2024
6e600d3
Fix example image
janbridley Jul 8, 2024
d98bb23
Update README.md
janbridley Jul 8, 2024
d72409c
Update README.md
janbridley Jul 8, 2024
55e0bd1
Add svgs
janbridley Jul 8, 2024
15b0376
Update README.md
janbridley Jul 8, 2024
253f3ff
Update images in README.md
janbridley Jul 8, 2024
0eb84fb
Fix install
janbridley Jul 10, 2024
590e9ed
Normalize camera distance for preset views
janbridley Jul 10, 2024
24250b8
Update doc svgs
janbridley Oct 11, 2024
383aff8
Lint README.md
janbridley Oct 11, 2024
4828580
Decouple coxeter
janbridley Oct 11, 2024
b1b59ff
Clean up code
janbridley Oct 11, 2024
ba95094
Update type annotation
janbridley Oct 11, 2024
6350cbe
Fix example
janbridley Oct 11, 2024
49e2f7a
Update fill color for example
janbridley Oct 12, 2024
b7ac6c3
Clean up main file
janbridley Oct 12, 2024
2275ae3
Update example to render doc images
janbridley Oct 12, 2024
0a03548
Fix type annotation in svg3d
janbridley Oct 12, 2024
62b26de
Enable one-line if statements
janbridley Oct 12, 2024
17e1362
Add test for array padding
janbridley Oct 12, 2024
0c6b411
Update pre-commit config
janbridley Oct 12, 2024
602507e
Reenable E701
janbridley Oct 12, 2024
77f1b86
Add extensive test for view matrix
janbridley Oct 12, 2024
0518d53
Filter unreasonable arrays
janbridley Oct 12, 2024
c9e2039
Fix hypothesis flakiness
janbridley Oct 12, 2024
ac608ee
Disable too_low health check
janbridley Oct 13, 2024
36ac388
Test projection matrix
janbridley Oct 13, 2024
1a40725
Update README.md
janbridley Oct 13, 2024
1cb64b4
Update readme examples and code
janbridley Oct 13, 2024
5a9a33b
Replace ISOMETRIC view with exact matrix
janbridley Oct 13, 2024
7784dae
Test isometric view
janbridley Oct 13, 2024
a014ae3
Update trimetric
janbridley Oct 13, 2024
1d94054
Rerender example images
janbridley Oct 13, 2024
d5d8451
CLean up view class
janbridley Oct 13, 2024
9c29f21
Refactor to standard directory-based layour
janbridley Oct 13, 2024
b886645
Fix organization
janbridley Oct 13, 2024
8a66dcb
Update examples to use shaders
janbridley Oct 13, 2024
efc9f05
Correct isometric matrix
janbridley Oct 13, 2024
bcfe2ba
Fix isometric view
janbridley Oct 13, 2024
c6e5a68
Format code block
janbridley Oct 13, 2024
c988774
Update README to note shader
janbridley Oct 13, 2024
ce55b4b
Remove unused doc file
janbridley Oct 13, 2024
f6b473a
Update README.md
janbridley Oct 13, 2024
2eb6345
Update README.md
janbridley Oct 13, 2024
d81690a
Update README.md
janbridley Oct 13, 2024
8bfa6cb
Update README.md
janbridley Oct 13, 2024
43bf8da
Add teapot to README
janbridley Oct 13, 2024
eeb0631
Update teapot image
janbridley Oct 13, 2024
8ba4ada
Update README.md
janbridley Oct 13, 2024
cd8f3ca
Add stanford bunny example
janbridley Oct 14, 2024
66ad97b
Cache calculation of normals
janbridley Oct 14, 2024
53b14d3
Replace missing cache step
janbridley Oct 14, 2024
9576e6c
lfs-track svg
janbridley Oct 14, 2024
d128dbf
Update gitignore
janbridley Oct 14, 2024
1b50ba2
Add name to license
janbridley Oct 14, 2024
3ae7546
Add CI
janbridley Oct 14, 2024
b6bd8ff
Remove py3.9 from CI
janbridley Oct 14, 2024
afe73a7
Update macos runner config
janbridley Oct 14, 2024
cedc61c
Properly configure requirements files
janbridley Oct 14, 2024
df6e147
Remove unnecessary gitattributes
janbridley Oct 14, 2024
c51ed02
Add oloid example to README.md
janbridley Oct 14, 2024
91b8057
Fix link
janbridley Oct 14, 2024
8dbabdd
Add example to README.md
janbridley Oct 14, 2024
7159a05
Update README.md
janbridley Oct 14, 2024
7283343
Add citations to README header
janbridley Oct 14, 2024
93696c3
Add final examples to README.md
janbridley Oct 15, 2024
db7b0e6
Fix image formatting
janbridley Oct 15, 2024
a6bcb3b
Center div
janbridley Oct 15, 2024
88aa2ad
Update README.md
janbridley Oct 15, 2024
db9f6c9
Update README.md
janbridley Oct 15, 2024
d4b3b66
Add from_vertices_and_faces method
janbridley Oct 15, 2024
3a261c6
Update README example 2
janbridley Oct 15, 2024
7cfa76d
Fix readme rendered image
janbridley Oct 15, 2024
5b72419
Improve example2
janbridley Oct 15, 2024
7b9c9db
Fix sentence fragment
janbridley Oct 15, 2024
3916279
Fix line wrapping
janbridley Oct 15, 2024
2f2aef7
Standardize example code
janbridley Oct 15, 2024
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
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
target-branch: main
schedule:
interval: "monthly"
time: "07:00"
timezone: "EST5EDT"
pull-request-branch-name:
separator: "-"
open-pull-requests-limit: 2
reviewers:
- janbridley
groups:
actions-version:
applies-to: version-updates
patterns:
- '*'
actions-security:
applies-to: security-updates
patterns:
- '*'
# Do not update pipfiles with dependabot - TODO: create custom action
1 change: 1 addition & 0 deletions .github/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
setuptools
47 changes: 47 additions & 0 deletions .github/requirements3.10.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This file was autogenerated by uv via the following command:
# uv pip compile --python-version 3.10 requirements.txt tests/requirements.txt .github/requirements.txt
attrs==24.2.0
# via hypothesis
coxeter==0.9.0
# via -r tests/requirements.txt
exceptiongroup==1.2.2
# via
# hypothesis
# pytest
hypothesis==6.115.0
# via -r tests/requirements.txt
iniconfig==2.0.0
# via pytest
multipledispatch==1.0.0
# via pyrr
numpy==2.1.2
# via
# -r requirements.txt
# coxeter
# pyrr
# rowan
# scipy
packaging==24.1
# via pytest
pluggy==1.5.0
# via pytest
pyrr==0.10.3
# via -r tests/requirements.txt
pytest==8.3.3
# via -r tests/requirements.txt
rowan==1.3.0.post1
# via
# -r tests/requirements.txt
# coxeter
scipy==1.14.1
# via coxeter
setuptools==75.1.0
# via -r .github/requirements.txt
sortedcontainers==2.4.0
# via hypothesis
svgwrite==1.4.3
# via -r requirements.txt
tomli==2.0.2
# via pytest
tqdm==4.66.5
# via -r requirements.txt
41 changes: 41 additions & 0 deletions .github/requirements3.11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This file was autogenerated by uv via the following command:
# uv pip compile --python-version 3.11 requirements.txt tests/requirements.txt .github/requirements.txt
attrs==24.2.0
# via hypothesis
coxeter==0.9.0
# via -r tests/requirements.txt
hypothesis==6.115.0
# via -r tests/requirements.txt
iniconfig==2.0.0
# via pytest
multipledispatch==1.0.0
# via pyrr
numpy==2.1.2
# via
# -r requirements.txt
# coxeter
# pyrr
# rowan
# scipy
packaging==24.1
# via pytest
pluggy==1.5.0
# via pytest
pyrr==0.10.3
# via -r tests/requirements.txt
pytest==8.3.3
# via -r tests/requirements.txt
rowan==1.3.0.post1
# via
# -r tests/requirements.txt
# coxeter
scipy==1.14.1
# via coxeter
setuptools==75.1.0
# via -r .github/requirements.txt
sortedcontainers==2.4.0
# via hypothesis
svgwrite==1.4.3
# via -r requirements.txt
tqdm==4.66.5
# via -r requirements.txt
41 changes: 41 additions & 0 deletions .github/requirements3.12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This file was autogenerated by uv via the following command:
# uv pip compile --python-version 3.12 requirements.txt tests/requirements.txt .github/requirements.txt
attrs==24.2.0
# via hypothesis
coxeter==0.9.0
# via -r tests/requirements.txt
hypothesis==6.115.0
# via -r tests/requirements.txt
iniconfig==2.0.0
# via pytest
multipledispatch==1.0.0
# via pyrr
numpy==2.1.2
# via
# -r requirements.txt
# coxeter
# pyrr
# rowan
# scipy
packaging==24.1
# via pytest
pluggy==1.5.0
# via pytest
pyrr==0.10.3
# via -r tests/requirements.txt
pytest==8.3.3
# via -r tests/requirements.txt
rowan==1.3.0.post1
# via
# -r tests/requirements.txt
# coxeter
scipy==1.14.1
# via coxeter
setuptools==75.1.0
# via -r .github/requirements.txt
sortedcontainers==2.4.0
# via hypothesis
svgwrite==1.4.3
# via -r requirements.txt
tqdm==4.66.5
# via -r requirements.txt
41 changes: 41 additions & 0 deletions .github/requirements3.13.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This file was autogenerated by uv via the following command:
# uv pip compile --python-version 3.13 requirements.txt tests/requirements.txt .github/requirements.txt
attrs==24.2.0
# via hypothesis
coxeter==0.9.0
# via -r tests/requirements.txt
hypothesis==6.115.0
# via -r tests/requirements.txt
iniconfig==2.0.0
# via pytest
multipledispatch==1.0.0
# via pyrr
numpy==2.1.2
# via
# -r requirements.txt
# coxeter
# pyrr
# rowan
# scipy
packaging==24.1
# via pytest
pluggy==1.5.0
# via pytest
pyrr==0.10.3
# via -r tests/requirements.txt
pytest==8.3.3
# via -r tests/requirements.txt
rowan==1.3.0.post1
# via
# -r tests/requirements.txt
# coxeter
scipy==1.14.1
# via coxeter
setuptools==75.1.0
# via -r .github/requirements.txt
sortedcontainers==2.4.0
# via hypothesis
svgwrite==1.4.3
# via -r requirements.txt
tqdm==4.66.5
# via -r requirements.txt
47 changes: 47 additions & 0 deletions .github/requirements3.9.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This file was autogenerated by uv via the following command:
# uv pip compile --python-version 3.9 requirements.txt tests/requirements.txt .github/requirements.txt
attrs==24.2.0
# via hypothesis
coxeter==0.9.0
# via -r tests/requirements.txt
exceptiongroup==1.2.2
# via
# hypothesis
# pytest
hypothesis==6.115.0
# via -r tests/requirements.txt
iniconfig==2.0.0
# via pytest
multipledispatch==1.0.0
# via pyrr
numpy==2.0.2
# via
# -r requirements.txt
# coxeter
# pyrr
# rowan
# scipy
packaging==24.1
# via pytest
pluggy==1.5.0
# via pytest
pyrr==0.10.3
# via -r tests/requirements.txt
pytest==8.3.3
# via -r tests/requirements.txt
rowan==1.3.0.post1
# via
# -r tests/requirements.txt
# coxeter
scipy==1.13.1
# via coxeter
setuptools==75.1.0
# via -r .github/requirements.txt
sortedcontainers==2.4.0
# via hypothesis
svgwrite==1.4.3
# via -r requirements.txt
tomli==2.0.2
# via pytest
tqdm==4.66.5
# via -r requirements.txt
5 changes: 5 additions & 0 deletions .github/update-pipfiles.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

for v in "3.9" "3.10" "3.11" "3.12" "3.13"; do
uv pip compile --python-version $v requirements.txt tests/requirements.txt .github/requirements.txt > .github/requirements$v.txt
done
50 changes: 50 additions & 0 deletions .github/workflows/run-pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Run Unit Tests

on:
# trigger on pull requests
pull_request:

# trigger on all commits to main
push:
branches:
- 'main'

# trigger on request
workflow_dispatch:
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
test:
name: test (${{ matrix.os }}, ${{ matrix.python }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
python: ['3.10', '3.11', '3.12', '3.13']
include:
# Other tests
- os: 'macos-latest'
python: '3.10'
- os: 'macos-latest'
python: '3.13'
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.2.1
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ matrix.python }}
- name: Set up Python environment
uses: glotzerlab/workflows/setup-uv@3573ddaebf3290e00bfb150b82a46412192a61d3
with:
# only-binary: ":none:"
lockfile: ".github/requirements${{ matrix.python }}.txt"
- name: Install package
run: |
python --version
uv pip install . --no-build-isolation --no-deps --system -v
- name: Test with pytest
run: |
python -m pytest
24 changes: 20 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
*.svg
*.png
*.pxd
__pycache__
# Packaging and distribution
*.egg
*.egg-info*
*.whl
dist
build

# Compiled files
__pycache__/
*.pyc
*.out

# Development tooling
.hypothesis/
.ipynb_checkpoints/
.pytest_cache/
.ruff_cache/

# Example files (not distributed for copyright reasons)
*.obj
26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ci:
autoupdate_schedule: quarterly

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.4.0'
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-builtin-literals
- id: check-executables-have-shebangs
- id: check-json
- id: check-yaml
- id: debug-statements
- id: requirements-txt-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.8
hooks:
# Run the linter.
- id: ruff
types_or: [ python, pyi, jupyter ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi, jupyter ]
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
MIT License

Copyright (c) 2024 Jenna Bradley
Copyright (c) 2018 Philip Rideout

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
15 changes: 0 additions & 15 deletions Pipfile

This file was deleted.

Loading