Skip to content

Commit

Permalink
Merge branch 'master' into test_on_sage_9.8
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton authored Jul 22, 2023
2 parents 7dc6c84 + 2137d3d commit ef4122f
Show file tree
Hide file tree
Showing 224 changed files with 7,293 additions and 4,599 deletions.
29 changes: 29 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
cirrus_wheels_macos_arm64_task:
name: Build macOS arm64 wheels.
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-xcode:latest
env:
CIBW_ARCHS_MACOS: arm64
CIBW_SKIP: pp* cp38*
CIBW_BEFORE_BUILD: >
pip install cython FXrays low_index sphinx sphinx_rtd_theme &&
pip install --pre --extra-index-url https://test.pypi.org/simple cypari &&
pip install git+https://github.com/3-manifolds/PLink &&
pip install git+https://github.com/3-manifolds/snappy_manifolds &&
pip install git+https://github.com/3-manifolds/Spherogram
CIBW_BEFORE_TEST: >
pip install cython low_index &&
pip install --pre --extra-index-url https://test.pypi.org/simple cypari &&
pip install git+https://github.com/3-manifolds/PLink &&
pip install git+https://github.com/3-manifolds/snappy_manifolds &&
pip install git+https://github.com/3-manifolds/Spherogram
CIBW_TEST_COMMAND: python -m snappy.test --skip-modern-opengl
install_pre_requirements_script:
- brew install python3
- python3 --version
install_cibuildwheel_script:
- python3 -m pip install cibuildwheel
run_cibuildwheel_script:
- python3 -m cibuildwheel --output-dir wheelhouse
wheels_artifacts:
path: "wheelhouse/*"
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint
on:
push: { branches: [ "master" ] }
pull_request: { branches: [ "master" ] }

jobs:
codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
shell: bash -l {0}
run: |
sudo apt-get install -y codespell
sudo apt-get install -y pycodestyle
- name: Run codespell
shell: bash -l {0}
run: codespell -L ans,arithmetics,inout,trough,compresser,rime,ba python
- name: Run pycodestyle
shell: bash -l {0}
# We currently only check for some warnings. We should enable & fix more of them.
run: |
pycodestyle --select=E111,E21,E221,E222,E225,E227,E228,E241,E251,E262,E265,E271,E272,E30,E401,E701,E702,E703,E704,E711,E713,E714,E721,W2,W3,W6 python/
pycodestyle --filename=*.pyx --select=W2 cython/
env:
MAKEFLAGS: -j2
22 changes: 11 additions & 11 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
os: [ubuntu-20.04]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.8'
python-version: '3.9'

- name: Install cibuildwheel
run: |
Expand All @@ -30,21 +30,21 @@ jobs:
CIBW_SKIP: cp27-* cp35-* *-manylinux_i686 *musllinux* pp*
CIBW_BEFORE_ALL_LINUX: yum install -y tk mesa-libGLU-devel
CIBW_BEFORE_BUILD: >
pip install cython sphinx FXrays &&
pip install --index-url https://test.pypi.org/simple cypari &&
pip install cython FXrays low_index sphinx sphinx_rtd_theme &&
pip install --pre --extra-index-url https://test.pypi.org/simple cypari &&
pip install git+https://github.com/3-manifolds/PLink &&
pip install git+https://github.com/3-manifolds/snappy_manifolds &&
pip install git+https://github.com/3-manifolds/Spherogram &&
pip install git+https://github.com/3-manifolds/low_index
pip install git+https://github.com/3-manifolds/Spherogram
CIBW_BEFORE_TEST: >
pip install cython &&
pip install cython low_index &&
pip install --pre --extra-index-url https://test.pypi.org/simple cypari &&
pip install git+https://github.com/3-manifolds/PLink &&
pip install git+https://github.com/3-manifolds/snappy_manifolds &&
pip install git+https://github.com/3-manifolds/Spherogram &&
pip install git+https://github.com/3-manifolds/low_index
pip install git+https://github.com/3-manifolds/Spherogram
CIBW_REPAIR_WHEEL_COMMAND_LINUX: auditwheel repair --strip -w {dest_dir} {wheel}
CIBW_TEST_COMMAND: python -m snappy.test --skip-modern-opengl

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: snappy_linux_wheels
path: ./wheelhouse/*.whl
28 changes: 14 additions & 14 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
os: [macos-11]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.8'
python-version: '3.9'

- name: Install cibuildwheel
run: |
Expand All @@ -27,23 +27,23 @@ jobs:
python -m cibuildwheel --output-dir wheelhouse
env:
# Skip Python 2.7, 3.5, 3.11, 32 bit Linux, and PyPy
CIBW_SKIP: cp27-* cp35-* pp*
CIBW_ARCHS_MACOS: "x86_64"
CIBW_BEFORE_BUILD: >
pip install cython sphinx FXrays &&
pip install --index-url https://test.pypi.org/simple cypari &&
CIBW_SKIP: cp27-* cp35-* cp36-* cp37-* pp*
CIBW_ARCHS_MACOS: x86_64 universal2
CIBW_BEFORE_BUILD: >
pip install cython FXrays low_index sphinx sphinx_rtd_theme &&
pip install --pre --extra-index-url https://test.pypi.org/simple cypari &&
pip install git+https://github.com/3-manifolds/PLink &&
pip install git+https://github.com/3-manifolds/snappy_manifolds &&
pip install git+https://github.com/3-manifolds/Spherogram &&
pip install git+https://github.com/3-manifolds/low_index
pip install git+https://github.com/3-manifolds/Spherogram
CIBW_BEFORE_TEST: >
pip install cython &&
pip install cython low_index &&
pip install --pre --extra-index-url https://test.pypi.org/simple cypari &&
pip install git+https://github.com/3-manifolds/PLink &&
pip install git+https://github.com/3-manifolds/snappy_manifolds &&
pip install git+https://github.com/3-manifolds/Spherogram &&
pip install git+https://github.com/3-manifolds/low_index
pip install git+https://github.com/3-manifolds/Spherogram
CIBW_TEST_COMMAND: python -m snappy.test --skip-modern-opengl

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: snappy_macos_wheels
path: ./wheelhouse/*.whl
49 changes: 49 additions & 0 deletions .github/workflows/macos_older_pythons.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: macOS Older Python Wheels

on: [push, pull_request]

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11]

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.9'

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
# Skip Python 2.7, 3.5, 3.11, 32 bit Linux, and PyPy
CIBW_SKIP: cp27-* cp35-* cp38-* cp39-* cp310-* cp311-* pp*
CIBW_ARCHS_MACOS: x86_64
CIBW_BEFORE_BUILD: >
pip install cython FXrays low_index sphinx sphinx_rtd_theme &&
pip install --pre --extra-index-url https://test.pypi.org/simple cypari &&
pip install git+https://github.com/3-manifolds/PLink &&
pip install git+https://github.com/3-manifolds/snappy_manifolds &&
pip install git+https://github.com/3-manifolds/Spherogram
CIBW_BEFORE_TEST: >
pip install cython low_index &&
pip install --pre --extra-index-url https://test.pypi.org/simple cypari &&
pip install git+https://github.com/3-manifolds/PLink &&
pip install git+https://github.com/3-manifolds/snappy_manifolds &&
pip install git+https://github.com/3-manifolds/Spherogram
CIBW_TEST_COMMAND: python -m snappy.test --skip-modern-opengl

- uses: actions/upload-artifact@v3
with:
name: snappy_macos_older_wheels
path: ./wheelhouse/*.whl
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ jobs:
runs-on: ubuntu-jammy
strategy:
matrix:
version: [9.3, 9.4, 9.5, 9.6, 9.7, 9.8]

version: [9.3, 9.4, 9.5, 9.6, 9.7, 9.8, 10.0]
container:
image: ghcr.io/sagemath/sage/sage-ubuntu-jammy-standard-with-targets:${{ matrix.version }}
options: --user root
Expand Down Expand Up @@ -42,7 +41,7 @@ jobs:
- name: Install snappy
run: |
cd /__w/SnapPy/SnapPy
sage -pip install wheel FXrays
sage -pip install wheel FXrays sphinx_rtd_theme
sage -python setup.py pip_install
- name: Do the tests
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
os: [windows-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.8'
python-version: '3.9'

- name: Install cibuildwheel
run: |
Expand All @@ -29,20 +29,20 @@ jobs:
# Skip Python 2.7, 3.5, 3.11, and PyPy
CIBW_SKIP: cp27-* cp35-* pp*
CIBW_BEFORE_BUILD: >
pip install cython sphinx FXrays &&
pip install --index-url https://test.pypi.org/simple cypari &&
pip install cython FXrays low_index sphinx sphinx_rtd_theme &&
pip install --pre --extra-index-url https://test.pypi.org/simple cypari &&
pip install git+https://github.com/3-manifolds/PLink &&
pip install git+https://github.com/3-manifolds/snappy_manifolds &&
pip install git+https://github.com/3-manifolds/Spherogram &&
pip install git+https://github.com/3-manifolds/low_index
pip install git+https://github.com/3-manifolds/Spherogram
CIBW_BEFORE_TEST: >
pip install cython &&
pip install cython low_index &&
pip install --pre --extra-index-url https://test.pypi.org/simple cypari &&
pip install git+https://github.com/3-manifolds/PLink &&
pip install git+https://github.com/3-manifolds/snappy_manifolds &&
pip install git+https://github.com/3-manifolds/Spherogram &&
pip install git+https://github.com/3-manifolds/low_index
pip install git+https://github.com/3-manifolds/Spherogram
CIBW_TEST_COMMAND: python -m snappy.test --skip-modern-opengl

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: snappy_windows_wheels
path: ./wheelhouse/*.whl
59 changes: 30 additions & 29 deletions cython/SnapPy.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ cdef extern from "triangulation.h":
c_TetShape *shape[2]
c_VertexCrossSections *cross_section
EdgeClass *edge_class[6]

ctypedef struct c_Triangulation "Triangulation":
c_Tetrahedron tet_list_begin
c_Tetrahedron tet_list_end
Expand Down Expand Up @@ -568,6 +568,7 @@ cdef extern from "SnapPea.h":
extern Boolean cusp_is_fillable(c_Triangulation *manifold, int cusp_index) except *
extern Boolean is_closed_manifold(c_Triangulation *manifold) except *
extern c_GroupPresentation *fundamental_group(c_Triangulation *manifold, Boolean simplify_presentation, Boolean fillings_may_affect_generators, Boolean minimize_number_of_generators, Boolean try_hard_to_shorten_relators) except *
extern c_GroupPresentation *compute_unsimplified_presentation(c_Triangulation *manifold) except *
extern int fg_get_num_generators(c_GroupPresentation *group) except *
extern int fg_get_num_orig_gens(c_GroupPresentation *group) except *
extern Boolean fg_integer_fillings(c_GroupPresentation *group) except *
Expand Down Expand Up @@ -747,7 +748,7 @@ cdef extern from "addl_code.h":
extern void free_cusp_equation(int* equation)
extern c_Triangulation* triangulate_link_complement_from_file(char* file_name, char *path) except *
extern c_Triangulation* fibered_manifold_associated_to_braid(int numStrands, int braidLength, int* word) except *
extern void set_tet_shapes(c_Triangulation* manifold, Complex* filled_shapes, Complex* complete_shapes)
extern void set_tet_shapes(c_Triangulation* manifold, Complex* filled_shapes, Complex* complete_shapes)
extern void set_target_holonomy(c_Triangulation* manifold, int theCuspIndex, Complex theTarget, int theRecomputeFlag)
extern c_Triangulation* DT2Triangulation(char* c_link_record)
extern void choose_gen_tetrahedron_info(c_Triangulation* manifold, int tet_index, int *generator_path, int *face0_gen, int *face1_gen, int *face2_gen, int *face3_gen, Complex *corner0, Complex *corner1, Complex *corner2, Complex *corner3, int *neighbor0_idx, int *neighbor1_idx, int *neighbor2_idx, int *neighbor3_idx, int *perm0, int *perm1, int *perm2, int *perm3)
Expand All @@ -760,43 +761,43 @@ cdef extern from "isomorphism_signature.h":
extern c_Triangulation* triangulation_from_isomorphism_signature(char *isoSig)

cdef extern from "ptolemy_types.h":
ctypedef char* Two_identified_variables[2]
ctypedef char* Two_identified_variables[2]

ctypedef struct Identification_of_variables:
int num_identifications
Two_identified_variables *variables
int *signs
int *powers

ctypedef struct Identification_of_variables:
int num_identifications
Two_identified_variables *variables
int *signs
int *powers
extern void free_identification_of_variables(Identification_of_variables id)

extern void free_identification_of_variables(Identification_of_variables id)

ctypedef struct Integer_matrix_with_explanations:
int **entries
int num_rows
int num_cols
char **explain_row
char **explain_column
ctypedef struct Integer_matrix_with_explanations:
int **entries
int num_rows
int num_cols
char **explain_row
char **explain_column

extern void free_integer_matrix_with_explanations(Integer_matrix_with_explanations m)
extern void free_integer_matrix_with_explanations(Integer_matrix_with_explanations m)

extern int number_of_edges(c_Triangulation *manifold)
extern int number_of_edges(c_Triangulation *manifold)

cdef extern from "change_peripheral_curves_nonorientable.h":
extern c_FuncResult change_peripheral_curves_nonorientable( c_Triangulation *manifold, MatrixInt22 change_matrices[])
extern c_FuncResult change_peripheral_curves_nonorientable( c_Triangulation *manifold, MatrixInt22 change_matrices[])

cdef extern from "gluing_equations_pgl.h":
extern void get_edge_gluing_equations_pgl(c_Triangulation *manifold, Integer_matrix_with_explanations *m, int N)
extern void get_face_gluing_equations_pgl(c_Triangulation *manifold, Integer_matrix_with_explanations *m, int N)
extern void get_internal_gluing_equations_pgl(c_Triangulation *manifold, Integer_matrix_with_explanations *m, int N)
extern void get_cusp_equations_pgl(c_Triangulation *manifold, Integer_matrix_with_explanations *m, int N, int cusp_num, int m, int l)
extern void get_edge_gluing_equations_pgl(c_Triangulation *manifold, Integer_matrix_with_explanations *m, int N)
extern void get_face_gluing_equations_pgl(c_Triangulation *manifold, Integer_matrix_with_explanations *m, int N)
extern void get_internal_gluing_equations_pgl(c_Triangulation *manifold, Integer_matrix_with_explanations *m, int N)
extern void get_cusp_equations_pgl(c_Triangulation *manifold, Integer_matrix_with_explanations *m, int N, int cusp_num, int m, int l)

cdef extern from "ptolemy_equations.h":
extern void get_ptolemy_equations_identified_coordinates(c_Triangulation *manifold, Identification_of_variables *id, int N, int* obstruction_class)
extern void get_ptolemy_equations_identified_face_classes(c_Triangulation *manifold, Identification_of_variables *id)
extern void get_ptolemy_equations_action_by_decoration_change(c_Triangulation *manifold, int N, Integer_matrix_with_explanations *m)
extern void get_ptolemy_equations_boundary_map_3(c_Triangulation *manifold, Integer_matrix_with_explanations *m)
extern void get_ptolemy_equations_boundary_map_2(c_Triangulation *manifold, Integer_matrix_with_explanations *m)
extern void get_ptolemy_equations_boundary_map_1(c_Triangulation *manifold, Integer_matrix_with_explanations *m)
extern void get_ptolemy_equations_identified_coordinates(c_Triangulation *manifold, Identification_of_variables *id, int N, int* obstruction_class)
extern void get_ptolemy_equations_identified_face_classes(c_Triangulation *manifold, Identification_of_variables *id)
extern void get_ptolemy_equations_action_by_decoration_change(c_Triangulation *manifold, int N, Integer_matrix_with_explanations *m)
extern void get_ptolemy_equations_boundary_map_3(c_Triangulation *manifold, Integer_matrix_with_explanations *m)
extern void get_ptolemy_equations_boundary_map_2(c_Triangulation *manifold, Integer_matrix_with_explanations *m)
extern void get_ptolemy_equations_boundary_map_1(c_Triangulation *manifold, Integer_matrix_with_explanations *m)

cdef extern from "inline.h":
pass
1 change: 1 addition & 0 deletions cython/core/abelian_group.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ cdef class PresentationMatrix():
A sparse representation of the presentation matrix of an abelian group.
"""
cdef rows, cols, _row_support, _col_support, _entries, _units, dead_columns

def __init__(self, rows, cols):
self.rows = rows
self.cols = cols
Expand Down
Loading

0 comments on commit ef4122f

Please sign in to comment.