Skip to content

Commit 607aff1

Browse files
authored
Merge pull request #113 from RamanujanMachine/feature/deployment
Feature/deployment
2 parents e59f9b9 + b724552 commit 607aff1

15 files changed

Lines changed: 107 additions & 99 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
python-version: ["3.12"]
20+
python-version: ["3.11", "3.12"]
2121

2222
steps:
2323
- uses: actions/checkout@v3
@@ -29,7 +29,7 @@ jobs:
2929
run: |
3030
python -m pip install --upgrade pip
3131
python -m pip install flake8 pytest
32-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
32+
pip install .[dev]
3333
- name: Lint with flake8
3434
run: |
3535
# stop the build if there are Python syntax errors or undefined names

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
*.egg-info
55
build
66
__pycache__
7+
dist/
8+
build/

CITATION.cff

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1-
# This CITATION.cff file was generated with cffinit.
2-
# Visit https://bit.ly/cffinit to generate yours today!
3-
41
cff-version: 1.2.0
5-
title: Ramanujan Tools
2+
title: ramanujantools
63
message: >-
74
If you use this software, please cite it using the
85
metadata from this file.
96
type: software
7+
version: 0.0.1
8+
date-released: 2025-06-20
109
authors:
11-
- name: Ramanujan Machine Research Group
10+
- name: Ramanujan Machine Group
11+
affiliation: Technion – Israel Institute of Technology
1212
repository-code: 'https://github.com/RamanujanMachine/ramanujantools'
1313
url: 'https://www.ramanujanmachine.com/'
14-
abstract: Tools used to study polynomial continued fractions and conservative matrix fields.
14+
abstract: Official symbolic and numeric research tools developed by the Ramanujan Machine team
1515
keywords:
1616
- Ramanujan Machine
17-
- Polynomial continued fractions
18-
- Conservative matrix fields
17+
- polynomial continued fractions
18+
- conservative matrix fields
19+
- diophantine approximations
20+
- linear recurrences
21+
- p-recursive sequences
22+
- irrationality measure

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025-present Ramanujan Machine Group
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
1-
# Ramanujan Tools
1+
# ramanujantools
22

3-
The official and up-to-date research tools of the Ramanujan Machine research group.
3+
Official symbolic and numeric research tools developed by the Ramanujan Machine research group.
4+
5+
## About
6+
7+
`ramanujantools` is a research focused python library that provides symbolic and numeric tools for exploring Polynomial Continued Fractions (PCFs), Linear Recurrences and Conservative Matrix Fields (CMFs). These can be used to discover new conjectures converging sequences to constants of interest such as *e*, *π*, *G* (Catalan's constant), *γ* (Euler's constant), *δ* (Gompertz constant) and integer values of the Riemann Zeta function *ζ(s)*.
48

59
## Installation
610

7-
```commandline
8-
pip install git+https://github.com/RamanujanMachine/ramanujantools.git
11+
```bash
12+
pip install ramanujantools
913
```
1014

11-
## The code
15+
## Contributing
16+
Contributions are welcome! Please open issues or pull requests on GitHub.
1217

13-
### Overview
18+
## Citation
1419

15-
The most relevant pieces of code of this library are:
20+
If you use this package in your research, please cite it using the metadata in [`CITATION.cff`](./CITATION.cff), or refer to the citation instructions on our [GitHub repository](https://github.com/RamanujanMachine/ramanujantools).
1621

17-
- `Matrix` which inherits `sympy.Matrix` and adds the walk method,
18-
which allows us to walk alongside a trajectory
19-
- `PCF` (Polynomial Continued Fraction) which can calculate the limit of a PCF
20-
- `CMF` (Conservative Matrix Field) which is made of multiple instances of `Matrix`
21-
and methods such as walk and limit
22-
- `FFbar` which contains the conditions and logic for ffbar construction of CMFs
23-
- The `known_cmfs` module which contains most of our known CMFs
24-
- CMF to PCF transformation functions
22+
## License
2523

26-
### Example: calculating the limit of zeta3 CMF alongside the diagonal
24+
This project is licensed under the terms of the [MIT License](./LICENSE).
2725

28-
```python
29-
from ramanujantools.cmf import known_cmfs
26+
## Links
3027

31-
known_cmfs.zeta3().limit([1,1], 100).as_float()
32-
```
28+
- Website: [https://www.ramanujanmachine.com](https://www.ramanujanmachine.com)
29+
- Repository: [https://github.com/RamanujanMachine/ramanujantools](https://github.com/RamanujanMachine/ramanujantools)
30+
- Citation file: [`CITATION.cff`](./CITATION.cff)

pyproject.toml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "ramanujantools"
7+
version = "0.0.1"
8+
description = "Official symbolic and numeric research tools developed by the Ramanujan Machine team"
9+
readme = "README.md"
10+
requires-python = ">=3.11"
11+
license = { file = "LICENSE" }
12+
13+
authors = [
14+
{ name = "Ramanujan Machine Group", email = "ramanujan.machine@gmail.com" }
15+
]
16+
17+
dependencies = [
18+
"tqdm>=4.65.0",
19+
"multimethod>=1.10",
20+
"numpy>=2.0.0",
21+
"mpmath>=1.3.0",
22+
"sympy>=1.11.0",
23+
"gmpy2>=2.2.0",
24+
"python-flint>=0.7.0",
25+
]
26+
27+
[project.optional-dependencies]
28+
dev = ["pytest>=8.2.0"]
29+
30+
[tool.pytest.ini_options]
31+
python_files = "*_test.py"
32+
testpaths = ["ramanujantools"]
33+
[project.urls]
34+
35+
Homepage = "https://www.ramanujanmachine.com/"
36+
Repository = "https://github.com/RamanujanMachine/ramanujantools"
37+

ramanujantools/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
from .linear_recurrence import LinearRecurrence
66
from .simplify_object import simplify
77

8-
from . import pcf
9-
from . import cmf
8+
__version__ = "0.0.1"
109

1110
__all__ = [
1211
"Position",
@@ -15,6 +14,4 @@
1514
"GenericPolynomial",
1615
"LinearRecurrence",
1716
"simplify",
18-
"pcf",
19-
"cmf",
2017
]

ramanujantools/cmf/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
from .cmf import CMF
22

3-
from . import ffbar, known_cmfs
4-
5-
__all__ = ["CMF", "ffbar", "known_cmfs"]
3+
__all__ = ["CMF"]

ramanujantools/cmf/cmf_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
from ramanujantools import Position, Matrix, simplify
77
from ramanujantools.cmf import CMF, known_cmfs
88

9+
c0, c1, c2, c3 = sp.symbols("c:4")
10+
911

1012
def test_N():
1113
cmf = known_cmfs.hypergeometric_derived_2F1()
@@ -40,15 +42,15 @@ def test_assert_conserving():
4042
def test_symbols():
4143
cmf = known_cmfs.cmf1()
4244
expected_axes = {x, y}
43-
expected_parameters = {known_cmfs.c0, known_cmfs.c1, known_cmfs.c2, known_cmfs.c3}
45+
expected_parameters = {c0, c1, c2, c3}
4446
assert expected_axes == cmf.axes()
4547
assert expected_parameters == cmf.parameters()
4648
assert set().union(expected_axes, expected_parameters) == cmf.free_symbols()
4749

4850

4951
def test_subs():
5052
cmf = known_cmfs.var_root_cmf()
51-
substitution = Position({known_cmfs.c0: 1, known_cmfs.c1: 2 * known_cmfs.c1 - 3})
53+
substitution = Position({c0: 1, c1: 2 * c1 - 3})
5254
assert cmf.subs(substitution) == CMF(
5355
{axis: matrix.subs(substitution) for axis, matrix in cmf.matrices.items()}
5456
)

ramanujantools/cmf/ffbar/ffbar_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
import sympy as sp
12
from sympy.abc import x, y
23

34
from ramanujantools import Matrix, Position
45
from ramanujantools.cmf import CMF, known_cmfs
5-
from ramanujantools.cmf.known_cmfs import c0, c1, c2, c3
66
from ramanujantools.cmf.ffbar import FFbar
77

8+
c0, c1, c2, c3 = sp.symbols("c:4")
9+
810

911
def test_linear_condition():
1012
assert FFbar.linear_condition(x + y, x - y) == 0

0 commit comments

Comments
 (0)