-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
14,006 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
__pycache__ | ||
.ipynb_checkpoints | ||
.OGRePy-env | ||
temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"console": "integratedTerminal", | ||
"cwd": "${fileDirname}", | ||
"env": { | ||
"PYTHONPATH": "${workspaceFolder}" | ||
}, | ||
"justMyCode": true, | ||
"name": "Python: Current File", | ||
"program": "${file}", | ||
"request": "launch", | ||
"type": "debugpy" | ||
} | ||
], | ||
"version": "0.2.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"cSpell.words": [ | ||
"alcubierre", | ||
"applyfunc", | ||
"baraksh", | ||
"bject", | ||
"christoffel", | ||
"civita", | ||
"covector", | ||
"ddot", | ||
"dsolve", | ||
"dunder", | ||
"eneral", | ||
"flrw", | ||
"getipython", | ||
"interactiveshell", | ||
"ipykernel", | ||
"ipynb", | ||
"jupyterlab", | ||
"Lagrangians", | ||
"lativity", | ||
"logcombine", | ||
"longrightarrow", | ||
"mathbf", | ||
"mathrm", | ||
"nabla", | ||
"nserc", | ||
"ogrepy", | ||
"permutedims", | ||
"powsimp", | ||
"pyenv", | ||
"pylance", | ||
"pylint", | ||
"pyproject", | ||
"pyright", | ||
"rdict", | ||
"redeclaration", | ||
"rgpin", | ||
"ricci", | ||
"riemannian", | ||
"schwarzschild", | ||
"sympy", | ||
"tensorcontraction", | ||
"tensorproduct", | ||
"traceback", | ||
"unhashable", | ||
"venv", | ||
"wogan" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"tasks": [ | ||
{ | ||
"args": [], | ||
"command": "tasks/update_packages.ps1", | ||
"detail": "Update Python packages in the current environment.", | ||
"group": "test", | ||
"label": "Upgrade packages", | ||
"presentation": { | ||
"clear": false, | ||
"echo": true, | ||
"focus": true, | ||
"panel": "shared", | ||
"reveal": "always", | ||
"showReuseMessage": true | ||
}, | ||
"type": "shell" | ||
}, | ||
{ | ||
"args": [], | ||
"command": "tasks/cleanup.ps1", | ||
"detail": "Clean up cache folders.", | ||
"group": "test", | ||
"label": "Clean up", | ||
"presentation": { | ||
"clear": false, | ||
"echo": true, | ||
"focus": true, | ||
"panel": "shared", | ||
"reveal": "always", | ||
"showReuseMessage": true | ||
}, | ||
"type": "shell" | ||
}, | ||
{ | ||
"args": [], | ||
"command": "tasks/compile_docs.ps1", | ||
"detail": "Compile the Markdown documentation to a Jupyter notebook.", | ||
"group": "test", | ||
"label": "Compile docs", | ||
"presentation": { | ||
"clear": false, | ||
"echo": true, | ||
"focus": true, | ||
"panel": "shared", | ||
"reveal": "always", | ||
"showReuseMessage": true | ||
}, | ||
"type": "shell" | ||
}, | ||
], | ||
"version": "2.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# OGRePy: An Object-Oriented General Relativity Package for Python | ||
|
||
By **Barak Shoshany**\ | ||
Email: <[email protected]>\ | ||
Website: <https://baraksh.com/>\ | ||
GitHub: <https://github.com/bshoshany> | ||
|
||
GitHub repository: <https://github.com/bshoshany/OGRePy>\ | ||
PyPi project: <https://pypi.org/project/OGRePy/> | ||
|
||
* [Version history](#version-history) | ||
* [v1.0.1 (2024-09-04)](#v101-2024-09-04) | ||
|
||
## Version history | ||
|
||
### v1.0.1 (2024-09-04) | ||
|
||
* Initial release. | ||
* 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
r""" | ||
# OGRePy: An Object-Oriented General Relativity Package for Python | ||
By **Barak Shoshany**\ | ||
Email: <[email protected]>\ | ||
Website: <https://baraksh.com/>\ | ||
GitHub: <https://github.com/bshoshany> | ||
GitHub repository: <https://github.com/bshoshany/OGRePy>\ | ||
PyPi project: <https://pypi.org/project/OGRePy/> | ||
Based on the Mathematica package [OGRe](https://github.com/bshoshany/OGRe) by Barak Shoshany. | ||
Copyright (c) 2024 [Barak Shoshany](https://baraksh.com/). Licensed under the [MIT license](https://github.com/bshoshany/OGRePy/blob/master/LICENSE.txt). | ||
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. | ||
""" | ||
|
||
# Import SymPy (for convenience, so we don't have to import it to the notebook separately). | ||
import sympy as s | ||
|
||
# Import all public OGRePy objects. | ||
from ._core import Coordinates, CovariantD, Metric, OGRePyError, PartialD, Tensor, __version__, calc, diag, doc, func, info, options, release_date, sym, syms, welcome | ||
|
||
# The names that will be exported if using `from OGRePy import *`. Contains exactly all the names imported above. | ||
__all__: list[str] = ["s", "Coordinates", "CovariantD", "Metric", "OGRePyError", "PartialD", "Tensor", "__version__", "calc", "diag", "doc", "func", "info", "options", "release_date", "sym", "syms", "welcome"] | ||
|
||
# Display the welcome message, but not if `OGREPY_DISABLE_WELCOME = True` was defined in the notebook before importing the package. | ||
import __main__ | ||
|
||
if __main__.__dict__.get("OGREPY_DISABLE_WELCOME", False) is not True: | ||
welcome() |
Oops, something went wrong.