Skip to content

Commit

Permalink
Updated to v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bshoshany committed Sep 4, 2024
1 parent f1fce4c commit 793cd74
Show file tree
Hide file tree
Showing 15 changed files with 14,006 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
__pycache__
.ipynb_checkpoints
.OGRePy-env
temp
17 changes: 17 additions & 0 deletions .vscode/launch.json
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"
}
50 changes: 50 additions & 0 deletions .vscode/settings.json
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"
]
}
53 changes: 53 additions & 0 deletions .vscode/tasks.json
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"
}
19 changes: 19 additions & 0 deletions CHANGELOG.md
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.
32 changes: 32 additions & 0 deletions OGRePy/__init__.py
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()
Loading

0 comments on commit 793cd74

Please sign in to comment.