hilbert-modular-group 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hilbert_modular_group-0.1.4/.dockerignore +16 -0
- hilbert_modular_group-0.1.4/.github/workflows/docker-image.yml +32 -0
- hilbert_modular_group-0.1.4/.github/workflows/publish.yml +81 -0
- hilbert_modular_group-0.1.4/.github/workflows/test-publish.yml +85 -0
- hilbert_modular_group-0.1.4/.gitignore +10 -0
- hilbert_modular_group-0.1.4/.pre-commit-config.yaml +31 -0
- hilbert_modular_group-0.1.4/.relint.yaml +17 -0
- hilbert_modular_group-0.1.4/CHANGELOG.md +25 -0
- hilbert_modular_group-0.1.4/Dockerfile +23 -0
- hilbert_modular_group-0.1.4/Dockerfile.passagemath +40 -0
- hilbert_modular_group-0.1.4/LICENSE +674 -0
- hilbert_modular_group-0.1.4/MANIFEST.in +9 -0
- hilbert_modular_group-0.1.4/Makefile +110 -0
- hilbert_modular_group-0.1.4/PKG-INFO +296 -0
- hilbert_modular_group-0.1.4/README.md +263 -0
- hilbert_modular_group-0.1.4/_doctest_environment.py +5 -0
- hilbert_modular_group-0.1.4/entrypoint-passagemath.sh +29 -0
- hilbert_modular_group-0.1.4/entrypoint.sh +45 -0
- hilbert_modular_group-0.1.4/examples/ExamplesK1.ipynb +582 -0
- hilbert_modular_group-0.1.4/examples/ExamplesK2.ipynb +890 -0
- hilbert_modular_group-0.1.4/examples/ExamplesK3.ipynb +533 -0
- hilbert_modular_group-0.1.4/examples/ExamplesK4.ipynb +255 -0
- hilbert_modular_group-0.1.4/pyproject.toml +99 -0
- hilbert_modular_group-0.1.4/setup.cfg +4 -0
- hilbert_modular_group-0.1.4/setup.py +76 -0
- hilbert_modular_group-0.1.4/src/hilbert_modgroup/__init__.py +6 -0
- hilbert_modular_group-0.1.4/src/hilbert_modgroup/all.py +9 -0
- hilbert_modular_group-0.1.4/src/hilbert_modgroup/hilbert_modular_group_class.py +987 -0
- hilbert_modular_group-0.1.4/src/hilbert_modgroup/hilbert_modular_group_element.pyx +621 -0
- hilbert_modular_group-0.1.4/src/hilbert_modgroup/plot.py +401 -0
- hilbert_modular_group-0.1.4/src/hilbert_modgroup/pullback.py +2265 -0
- hilbert_modular_group-0.1.4/src/hilbert_modgroup/pullback_cython.pyx +410 -0
- hilbert_modular_group-0.1.4/src/hilbert_modgroup/upper_half_plane.pxd +59 -0
- hilbert_modular_group-0.1.4/src/hilbert_modgroup/upper_half_plane.pyx +1828 -0
- hilbert_modular_group-0.1.4/src/hilbert_modgroup/utils.py +66 -0
- hilbert_modular_group-0.1.4/src/hilbert_modgroup/version.py +34 -0
- hilbert_modular_group-0.1.4/src/hilbert_modular_group.egg-info/PKG-INFO +296 -0
- hilbert_modular_group-0.1.4/src/hilbert_modular_group.egg-info/SOURCES.txt +40 -0
- hilbert_modular_group-0.1.4/src/hilbert_modular_group.egg-info/dependency_links.txt +1 -0
- hilbert_modular_group-0.1.4/src/hilbert_modular_group.egg-info/requires.txt +13 -0
- hilbert_modular_group-0.1.4/src/hilbert_modular_group.egg-info/top_level.txt +1 -0
- hilbert_modular_group-0.1.4/tox.ini +92 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Docker Image CI with tox
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- develop
|
|
8
|
+
push:
|
|
9
|
+
branches:
|
|
10
|
+
- main
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Get current date
|
|
18
|
+
id: date
|
|
19
|
+
run: echo "date=$(date +'%s')" >> $GITHUB_OUTPUT
|
|
20
|
+
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
with:
|
|
23
|
+
fetch-depth: 0
|
|
24
|
+
|
|
25
|
+
- name: Build the Docker image
|
|
26
|
+
run: docker build . --file Dockerfile.passagemath --tag hilbertmodgroup:${{ steps.date.outputs.date }}
|
|
27
|
+
|
|
28
|
+
- name: Run doctests
|
|
29
|
+
run: docker run --rm hilbertmodgroup:${{ steps.date.outputs.date }} test
|
|
30
|
+
|
|
31
|
+
- name: Run linting checks
|
|
32
|
+
run: docker run --rm hilbertmodgroup:${{ steps.date.outputs.date }} lint
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
tox-checks:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Get current date
|
|
13
|
+
id: date
|
|
14
|
+
run: echo "date=$(date +'%s')" >> $GITHUB_OUTPUT
|
|
15
|
+
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
|
|
20
|
+
- name: Build the Docker image
|
|
21
|
+
run: docker build . --file Dockerfile.passagemath --tag hilbertmodgroup:${{ steps.date.outputs.date }}
|
|
22
|
+
|
|
23
|
+
- name: Run doctests
|
|
24
|
+
run: docker run --rm hilbertmodgroup:${{ steps.date.outputs.date }} test
|
|
25
|
+
|
|
26
|
+
- name: Run linting checks
|
|
27
|
+
run: docker run --rm hilbertmodgroup:${{ steps.date.outputs.date }} lint
|
|
28
|
+
|
|
29
|
+
build:
|
|
30
|
+
needs: tox-checks
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
with:
|
|
35
|
+
fetch-depth: 0
|
|
36
|
+
|
|
37
|
+
- name: Install system dependencies
|
|
38
|
+
run: |
|
|
39
|
+
sudo apt-get update
|
|
40
|
+
sudo apt-get install -y libgmp-dev libmpfr-dev libmpc-dev libflint-dev libntl-dev
|
|
41
|
+
|
|
42
|
+
- name: Set up Python
|
|
43
|
+
uses: actions/setup-python@v5
|
|
44
|
+
with:
|
|
45
|
+
python-version: "3.12"
|
|
46
|
+
|
|
47
|
+
- name: Install build dependencies
|
|
48
|
+
run: |
|
|
49
|
+
python -m pip install --upgrade pip
|
|
50
|
+
pip install build twine
|
|
51
|
+
|
|
52
|
+
- name: Build package (sdist only)
|
|
53
|
+
run: python -m build --sdist
|
|
54
|
+
|
|
55
|
+
- name: Check package
|
|
56
|
+
run: twine check dist/*
|
|
57
|
+
|
|
58
|
+
- name: Upload build artifacts
|
|
59
|
+
uses: actions/upload-artifact@v4
|
|
60
|
+
with:
|
|
61
|
+
name: dist
|
|
62
|
+
path: dist/
|
|
63
|
+
|
|
64
|
+
publish:
|
|
65
|
+
needs: build
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
environment:
|
|
68
|
+
name: pypi
|
|
69
|
+
url: https://pypi.org/project/hilbert-modular-group/
|
|
70
|
+
permissions:
|
|
71
|
+
id-token: write
|
|
72
|
+
|
|
73
|
+
steps:
|
|
74
|
+
- name: Download build artifacts
|
|
75
|
+
uses: actions/download-artifact@v4
|
|
76
|
+
with:
|
|
77
|
+
name: dist
|
|
78
|
+
path: dist/
|
|
79
|
+
|
|
80
|
+
- name: Publish to PyPI
|
|
81
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
name: Publish to TestPyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- develop
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
tox-checks:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Get current date
|
|
14
|
+
id: date
|
|
15
|
+
run: echo "date=$(date +'%s')" >> $GITHUB_OUTPUT
|
|
16
|
+
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
|
|
21
|
+
- name: Build the Docker image
|
|
22
|
+
run: docker build . --file Dockerfile.passagemath --tag hilbertmodgroup:${{ steps.date.outputs.date }}
|
|
23
|
+
|
|
24
|
+
- name: Run doctests
|
|
25
|
+
run: docker run --rm hilbertmodgroup:${{ steps.date.outputs.date }} test
|
|
26
|
+
|
|
27
|
+
- name: Run linting checks
|
|
28
|
+
run: docker run --rm hilbertmodgroup:${{ steps.date.outputs.date }} lint
|
|
29
|
+
|
|
30
|
+
build:
|
|
31
|
+
needs: tox-checks
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v4
|
|
35
|
+
with:
|
|
36
|
+
fetch-depth: 0
|
|
37
|
+
|
|
38
|
+
- name: Install system dependencies
|
|
39
|
+
run: |
|
|
40
|
+
sudo apt-get update
|
|
41
|
+
sudo apt-get install -y libgmp-dev libmpfr-dev libmpc-dev libflint-dev libntl-dev
|
|
42
|
+
|
|
43
|
+
- name: Set up Python
|
|
44
|
+
uses: actions/setup-python@v5
|
|
45
|
+
with:
|
|
46
|
+
python-version: "3.12"
|
|
47
|
+
|
|
48
|
+
- name: Install build dependencies
|
|
49
|
+
run: |
|
|
50
|
+
python -m pip install --upgrade pip
|
|
51
|
+
pip install build twine
|
|
52
|
+
|
|
53
|
+
- name: Build package (sdist only)
|
|
54
|
+
run: python -m build --sdist
|
|
55
|
+
|
|
56
|
+
- name: Check package
|
|
57
|
+
run: twine check dist/*
|
|
58
|
+
|
|
59
|
+
- name: Upload build artifacts
|
|
60
|
+
uses: actions/upload-artifact@v4
|
|
61
|
+
with:
|
|
62
|
+
name: dist
|
|
63
|
+
path: dist/
|
|
64
|
+
|
|
65
|
+
publish:
|
|
66
|
+
needs: build
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
environment:
|
|
69
|
+
name: testpypi
|
|
70
|
+
url: https://test.pypi.org/project/hilbert-modular-group/
|
|
71
|
+
permissions:
|
|
72
|
+
id-token: write
|
|
73
|
+
|
|
74
|
+
steps:
|
|
75
|
+
- name: Download build artifacts
|
|
76
|
+
uses: actions/download-artifact@v4
|
|
77
|
+
with:
|
|
78
|
+
name: dist
|
|
79
|
+
path: dist/
|
|
80
|
+
|
|
81
|
+
- name: Publish to TestPyPI
|
|
82
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
83
|
+
with:
|
|
84
|
+
repository-url: https://test.pypi.org/legacy/
|
|
85
|
+
skip-existing: true
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# See https://pre-commit.com for more information
|
|
2
|
+
# See https://pre-commit.com/hooks.html for more hooks
|
|
3
|
+
repos:
|
|
4
|
+
# Ruff for linting and formatting
|
|
5
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
6
|
+
rev: v0.8.6
|
|
7
|
+
hooks:
|
|
8
|
+
- id: ruff
|
|
9
|
+
args: [--fix, --exit-non-zero-on-fix]
|
|
10
|
+
types_or: [python, pyi]
|
|
11
|
+
- id: ruff-format
|
|
12
|
+
types_or: [python, pyi]
|
|
13
|
+
|
|
14
|
+
# Conventional commit message validation
|
|
15
|
+
- repo: https://github.com/compilerla/conventional-pre-commit
|
|
16
|
+
rev: v3.6.0
|
|
17
|
+
hooks:
|
|
18
|
+
- id: conventional-pre-commit
|
|
19
|
+
stages: [commit-msg]
|
|
20
|
+
args:
|
|
21
|
+
- feat
|
|
22
|
+
- fix
|
|
23
|
+
- docs
|
|
24
|
+
- style
|
|
25
|
+
- refactor
|
|
26
|
+
- perf
|
|
27
|
+
- test
|
|
28
|
+
- build
|
|
29
|
+
- ci
|
|
30
|
+
- chore
|
|
31
|
+
- revert
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Patterns taken from the Sagemath source.
|
|
2
|
+
- name: 'python3: Python3 incompatible code'
|
|
3
|
+
hint: |
|
|
4
|
+
# ifilter, imap, izip # __metaclass__
|
|
5
|
+
Hint: # update raise statements # except Exception, var
|
|
6
|
+
Hint: # cmp # sagenb
|
|
7
|
+
Hint: # next # six is no longer allowed
|
|
8
|
+
pattern: '(import.*ifilter|import.*imap|import.*izip|^\s*raise\s*[A-Za-z]*Error\s*,|[\s,\(]cmp\s*=|[^_a-z]cmp\(|\.next\(\)|__metaclass__|except\s*[A-Za-z]\s*,|sagenb|import six|from six import)'
|
|
9
|
+
filePattern: .*[.](py|pyx|rst)
|
|
10
|
+
|
|
11
|
+
- name: 'blocks: wrong syntax for blocks (INPUT, OUTPUT, EXAMPLES, NOTE, etc.)'
|
|
12
|
+
hint: |
|
|
13
|
+
# the correct syntax is .. SEEALSO::
|
|
14
|
+
Hint: # TESTS and EXAMPLES should be plural, NOTE singular
|
|
15
|
+
Hint: # no :: after INPUT, OUTPUT, REFERENCE blocks
|
|
16
|
+
Hint: # no " :" at the end of lines
|
|
17
|
+
pattern: '(\.\.SEE|SEE ALSO|SEEALSO:($|[^:])|^\s*TEST:|^\s*EXAMPLE:|^\s*NOTES:|^\s*[A-Z]*PUT::|^\s*REFERENCES?::$)'
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v0.1.0
|
|
4
|
+
- First release version.
|
|
5
|
+
|
|
6
|
+
## v0.0.3
|
|
7
|
+
- Updated coercion and pickling for extension types.
|
|
8
|
+
- Allow points on the boundary in the UpperHalfPlaneProduct class
|
|
9
|
+
- Added random_element function to the Hilbert modular group class
|
|
10
|
+
- Updated example Jupyter notebooks.
|
|
11
|
+
- Fixes suggested by pyflakes.
|
|
12
|
+
- Updated README.md
|
|
13
|
+
|
|
14
|
+
## v0.0.2
|
|
15
|
+
- Added Changelog (this file)
|
|
16
|
+
- Improved handling of arguments in make and Docker.
|
|
17
|
+
- Updated README.md with examples
|
|
18
|
+
-
|
|
19
|
+
## v0.0.1
|
|
20
|
+
- Updated docker commands
|
|
21
|
+
- Added gitHub actions
|
|
22
|
+
- Added tox environments
|
|
23
|
+
|
|
24
|
+
## v0.0.0
|
|
25
|
+
- Initial release
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
ARG REMOTE_SRC=1
|
|
2
|
+
ARG GIT_BRANCH=develop
|
|
3
|
+
ARG BUILDPLATFORM=linux/amd64
|
|
4
|
+
FROM --platform=${BUILDPLATFORM} sagemath/sagemath:10.5 AS base
|
|
5
|
+
RUN sudo apt-get update
|
|
6
|
+
RUN sudo dpkg --configure -a
|
|
7
|
+
RUN sudo apt-get -f -y install git
|
|
8
|
+
|
|
9
|
+
FROM base AS use-git-1
|
|
10
|
+
RUN git clone https://github.com/fredstro/hilbertmodgroup.git
|
|
11
|
+
WORKDIR "/home/sage/hilbertmodgroup"
|
|
12
|
+
RUN git config pull.rebase false && git checkout ${GIT_BRANCH}
|
|
13
|
+
|
|
14
|
+
FROM base AS use-git-0
|
|
15
|
+
ARG GIT_BRANCH=''
|
|
16
|
+
COPY --chown=sage . hilbertmodgroup
|
|
17
|
+
WORKDIR "/home/sage/hilbertmodgroup"
|
|
18
|
+
|
|
19
|
+
FROM use-git-${REMOTE_SRC} AS final
|
|
20
|
+
RUN sudo apt-get -y install make
|
|
21
|
+
COPY entrypoint.sh /entrypoint.sh
|
|
22
|
+
ENTRYPOINT ["/entrypoint.sh"]
|
|
23
|
+
CMD ["run"]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
ARG PYTHON_VERSION=3.12
|
|
2
|
+
FROM python:${PYTHON_VERSION}-slim-bookworm
|
|
3
|
+
|
|
4
|
+
# Install system dependencies for building Cython extensions
|
|
5
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
6
|
+
build-essential \
|
|
7
|
+
git \
|
|
8
|
+
libgmp-dev \
|
|
9
|
+
libmpfr-dev \
|
|
10
|
+
libmpc-dev \
|
|
11
|
+
libflint-dev \
|
|
12
|
+
libntl-dev \
|
|
13
|
+
libcdd-tools \
|
|
14
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
15
|
+
|
|
16
|
+
# Create non-root user
|
|
17
|
+
RUN useradd -m -s /bin/bash sage
|
|
18
|
+
USER sage
|
|
19
|
+
WORKDIR /home/sage
|
|
20
|
+
|
|
21
|
+
# Upgrade pip and install build tools
|
|
22
|
+
RUN pip install --user --upgrade pip setuptools wheel
|
|
23
|
+
|
|
24
|
+
# Copy the project
|
|
25
|
+
COPY --chown=sage . hilbertmodgroup
|
|
26
|
+
WORKDIR /home/sage/hilbertmodgroup
|
|
27
|
+
|
|
28
|
+
# Install the package with passagemath dependencies
|
|
29
|
+
RUN pip install --user -e ".[passagemath]"
|
|
30
|
+
|
|
31
|
+
# Install tox for testing
|
|
32
|
+
RUN pip install --user tox
|
|
33
|
+
|
|
34
|
+
# Add local bin to PATH
|
|
35
|
+
ENV PATH="/home/sage/.local/bin:${PATH}"
|
|
36
|
+
|
|
37
|
+
# Default command runs passagemath tests
|
|
38
|
+
COPY --chown=sage --chmod=755 entrypoint-passagemath.sh /entrypoint.sh
|
|
39
|
+
ENTRYPOINT ["/entrypoint.sh"]
|
|
40
|
+
CMD ["test"]
|