Skip to content

Commit

Permalink
Merge pull request #2010 from mikedh/drop/py2
Browse files Browse the repository at this point in the history
Release Candidate: 4.0.0rc0 Dropping Python 2
  • Loading branch information
mikedh authored Sep 20, 2023
2 parents a2f89a6 + 7c1c45d commit 9380872
Show file tree
Hide file tree
Showing 174 changed files with 4,361 additions and 4,857 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- release-candidate

jobs:
formatting:
Expand All @@ -26,13 +27,10 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11"]
os: [ubuntu-20.04, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]
exclude:
# windows runners have gotten very flaky
# exclude all windows test runs except for one
- os: windows-latest
python-version: 3.6
# windows runners have gotten flaky
- os: windows-latest
python-version: 3.8
- os: windows-latest
Expand Down Expand Up @@ -63,7 +61,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
python-version: '3.11'
- name: Install publishing dependencies
run: |
python -m pip install --upgrade pip
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Formatting
run: pip install ruff
- name: Check Formatting
- name: Install
run: pip install ruff black
- name: Run Ruff
run: ruff .
# - name: Run Black
# run: black --check .

tests:
name: Run Unit Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.7", "3.11"]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
Expand Down
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ RUN trimesh-setup --install build

# copy in essential files
COPY --chown=499 trimesh/ /home/user/trimesh
COPY --chown=499 setup.py /home/user/
COPY --chown=499 pyproject.toml /home/user/

# switch to non-root user
USER user

# install trimesh into .local
# then delete any included test directories
# and remove Cython after all the building is complete
RUN pip install /home/user[all] && \
RUN pip install --user /home/user[easy] && \
find /home/user/.local -type d -name tests -prune -exec rm -rf {} \; && \
pip uninstall -y cython

Expand Down Expand Up @@ -58,7 +58,6 @@ FROM output AS tests
COPY --chown=499 tests ./tests/
COPY --chown=499 trimesh ./trimesh/
COPY --chown=499 models ./models/
COPY --chown=499 setup.py .
COPY --chown=499 pyproject.toml .

# codecov looks at the git history
Expand All @@ -69,7 +68,7 @@ RUN trimesh-setup --install=test,gltf_validator,llvmpipe,binvox
USER user

# install things like pytest
RUN pip install -e .[all,easy,recommends,test]
RUN pip install -e .[all,easy,recommend,test]

# run pytest wrapped with xvfb for simple viewer tests
RUN xvfb-run pytest --cov=trimesh \
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Michael Dawson-Haggerty
Copyright (c) 2023 Michael Dawson-Haggerty

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
[![trimesh](https://trimsh.org/images/logotype-a.svg)](http://trimsh.org)
[![trimesh](https://trimesh.org/images/logotype-a.svg)](http://trimesh.org)

-----------
[![Github Actions](https://github.com/mikedh/trimesh/workflows/Release%20Trimesh/badge.svg)](https://github.com/mikedh/trimesh/actions) [![PyPI version](https://badge.fury.io/py/trimesh.svg)](https://badge.fury.io/py/trimesh) [![codecov](https://codecov.io/gh/mikedh/trimesh/branch/main/graph/badge.svg?token=4PVRQXyl2h)](https://codecov.io/gh/mikedh/trimesh) [![Docker Image Version (latest by date)](https://img.shields.io/docker/v/trimesh/trimesh?label=docker&sort=semver)](https://hub.docker.com/r/trimesh/trimesh/tags)
[![Github Actions](https://github.com/mikedh/trimesh/workflows/Release%20Trimesh/badge.svg)](https://github.com/mikedh/trimesh/actions) [![codecov](https://codecov.io/gh/mikedh/trimesh/branch/main/graph/badge.svg?token=4PVRQXyl2h)](https://codecov.io/gh/mikedh/trimesh) [![Docker Image Version (latest by date)](https://img.shields.io/docker/v/trimesh/trimesh?label=docker&sort=semver)](https://hub.docker.com/r/trimesh/trimesh/tags) [![PyPI version](https://badge.fury.io/py/trimesh.svg)](https://badge.fury.io/py/trimesh)



Trimesh is a pure Python (2.7-3.5+) library for loading and using [triangular meshes](https://en.wikipedia.org/wiki/Triangle_mesh) with an emphasis on watertight surfaces. The goal of the library is to provide a full featured and well tested Trimesh object which allows for easy manipulation and analysis, in the style of the Polygon object in the [Shapely library](https://github.com/Toblerity/Shapely).
| :warning: WARNING |
|---------------------------|
| `trimesh >= 4.0.0` on `main` makes minimum Python 3.7 and is in pre-release |
| Testing with `pip install --pre trimesh` would be much appreciated! |
| Projects that support Python<3.7 should update requirement to `trimesh<4` |


Trimesh is a pure Python 3.7+ library for loading and using [triangular meshes](https://en.wikipedia.org/wiki/Triangle_mesh) with an emphasis on watertight surfaces. The goal of the library is to provide a full featured and well tested Trimesh object which allows for easy manipulation and analysis, in the style of the Polygon object in the [Shapely library](https://github.com/Toblerity/Shapely).

The API is mostly stable, but this should not be relied on and is not guaranteed: install a specific version if you plan on deploying something using trimesh.

Expand Down
8 changes: 0 additions & 8 deletions codecov.yml

This file was deleted.

Loading

0 comments on commit 9380872

Please sign in to comment.