Skip to content

Commit

Permalink
Merge pull request #2 from janbridley/admin/cleanup
Browse files Browse the repository at this point in the history
Refactor project for demonstration and future development
  • Loading branch information
janbridley authored Oct 15, 2024
2 parents 8c2a59e + 2f2aef7 commit 33bed6c
Show file tree
Hide file tree
Showing 46 changed files with 71,349 additions and 2,121 deletions.
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

0 comments on commit 33bed6c

Please sign in to comment.