Skip to content

Commit 793cd74

Browse files
committed
Updated to v1.0.1
1 parent f1fce4c commit 793cd74

15 files changed

+14006
-3
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
__pycache__
2+
.ipynb_checkpoints
3+
.OGRePy-env
4+
temp

.vscode/launch.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"configurations": [
3+
{
4+
"console": "integratedTerminal",
5+
"cwd": "${fileDirname}",
6+
"env": {
7+
"PYTHONPATH": "${workspaceFolder}"
8+
},
9+
"justMyCode": true,
10+
"name": "Python: Current File",
11+
"program": "${file}",
12+
"request": "launch",
13+
"type": "debugpy"
14+
}
15+
],
16+
"version": "0.2.0"
17+
}

.vscode/settings.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"cSpell.words": [
3+
"alcubierre",
4+
"applyfunc",
5+
"baraksh",
6+
"bject",
7+
"christoffel",
8+
"civita",
9+
"covector",
10+
"ddot",
11+
"dsolve",
12+
"dunder",
13+
"eneral",
14+
"flrw",
15+
"getipython",
16+
"interactiveshell",
17+
"ipykernel",
18+
"ipynb",
19+
"jupyterlab",
20+
"Lagrangians",
21+
"lativity",
22+
"logcombine",
23+
"longrightarrow",
24+
"mathbf",
25+
"mathrm",
26+
"nabla",
27+
"nserc",
28+
"ogrepy",
29+
"permutedims",
30+
"powsimp",
31+
"pyenv",
32+
"pylance",
33+
"pylint",
34+
"pyproject",
35+
"pyright",
36+
"rdict",
37+
"redeclaration",
38+
"rgpin",
39+
"ricci",
40+
"riemannian",
41+
"schwarzschild",
42+
"sympy",
43+
"tensorcontraction",
44+
"tensorproduct",
45+
"traceback",
46+
"unhashable",
47+
"venv",
48+
"wogan"
49+
]
50+
}

.vscode/tasks.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"tasks": [
3+
{
4+
"args": [],
5+
"command": "tasks/update_packages.ps1",
6+
"detail": "Update Python packages in the current environment.",
7+
"group": "test",
8+
"label": "Upgrade packages",
9+
"presentation": {
10+
"clear": false,
11+
"echo": true,
12+
"focus": true,
13+
"panel": "shared",
14+
"reveal": "always",
15+
"showReuseMessage": true
16+
},
17+
"type": "shell"
18+
},
19+
{
20+
"args": [],
21+
"command": "tasks/cleanup.ps1",
22+
"detail": "Clean up cache folders.",
23+
"group": "test",
24+
"label": "Clean up",
25+
"presentation": {
26+
"clear": false,
27+
"echo": true,
28+
"focus": true,
29+
"panel": "shared",
30+
"reveal": "always",
31+
"showReuseMessage": true
32+
},
33+
"type": "shell"
34+
},
35+
{
36+
"args": [],
37+
"command": "tasks/compile_docs.ps1",
38+
"detail": "Compile the Markdown documentation to a Jupyter notebook.",
39+
"group": "test",
40+
"label": "Compile docs",
41+
"presentation": {
42+
"clear": false,
43+
"echo": true,
44+
"focus": true,
45+
"panel": "shared",
46+
"reveal": "always",
47+
"showReuseMessage": true
48+
},
49+
"type": "shell"
50+
},
51+
],
52+
"version": "2.0.0"
53+
}

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# OGRePy: An Object-Oriented General Relativity Package for Python
2+
3+
By **Barak Shoshany**\
4+
5+
Website: <https://baraksh.com/>\
6+
GitHub: <https://github.com/bshoshany>
7+
8+
GitHub repository: <https://github.com/bshoshany/OGRePy>\
9+
PyPi project: <https://pypi.org/project/OGRePy/>
10+
11+
* [Version history](#version-history)
12+
* [v1.0.1 (2024-09-04)](#v101-2024-09-04)
13+
14+
## Version history
15+
16+
### v1.0.1 (2024-09-04)
17+
18+
* Initial release.
19+
* OGRePy is a Python port of my Mathematica package [OGRe](https://github.com/bshoshany/OGRe). Most features have already been fully ported, with a few remaining ones, such as importing/exporting tensors and parallelization, left for subsequent releases in the near future.

OGRePy/__init__.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
r"""
2+
# OGRePy: An Object-Oriented General Relativity Package for Python
3+
4+
By **Barak Shoshany**\
5+
6+
Website: <https://baraksh.com/>\
7+
GitHub: <https://github.com/bshoshany>
8+
9+
GitHub repository: <https://github.com/bshoshany/OGRePy>\
10+
PyPi project: <https://pypi.org/project/OGRePy/>
11+
12+
Based on the Mathematica package [OGRe](https://github.com/bshoshany/OGRe) by Barak Shoshany.
13+
14+
Copyright (c) 2024 [Barak Shoshany](https://baraksh.com/). Licensed under the [MIT license](https://github.com/bshoshany/OGRePy/blob/master/LICENSE.txt).
15+
16+
If you use this package in published software or research, please provide a link to [the GitHub repository](https://github.com/bshoshany/OGRePy) in the source code and documentation.
17+
"""
18+
19+
# Import SymPy (for convenience, so we don't have to import it to the notebook separately).
20+
import sympy as s
21+
22+
# Import all public OGRePy objects.
23+
from ._core import Coordinates, CovariantD, Metric, OGRePyError, PartialD, Tensor, __version__, calc, diag, doc, func, info, options, release_date, sym, syms, welcome
24+
25+
# The names that will be exported if using `from OGRePy import *`. Contains exactly all the names imported above.
26+
__all__: list[str] = ["s", "Coordinates", "CovariantD", "Metric", "OGRePyError", "PartialD", "Tensor", "__version__", "calc", "diag", "doc", "func", "info", "options", "release_date", "sym", "syms", "welcome"]
27+
28+
# Display the welcome message, but not if `OGREPY_DISABLE_WELCOME = True` was defined in the notebook before importing the package.
29+
import __main__
30+
31+
if __main__.__dict__.get("OGREPY_DISABLE_WELCOME", False) is not True:
32+
welcome()

0 commit comments

Comments
 (0)