Skip to content

Commit 3db066d

Browse files
committed
Updated to v1.1.0
1 parent 793cd74 commit 3db066d

18 files changed

+22600
-7778
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
__pycache__
22
.ipynb_checkpoints
33
.OGRePy-env
4-
temp
4+
misc/temp

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@
1717
"ipykernel",
1818
"ipynb",
1919
"jupyterlab",
20+
"jupytext",
2021
"Lagrangians",
2122
"lativity",
2223
"logcombine",
2324
"longrightarrow",
2425
"mathbf",
2526
"mathrm",
2627
"nabla",
28+
"nbconvert",
2729
"nserc",
2830
"ogrepy",
2931
"permutedims",

.vscode/tasks.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
"type": "shell"
1818
},
1919
{
20-
"args": [],
21-
"command": "tasks/cleanup.ps1",
20+
"args": [
21+
"tasks/cleanup.py"
22+
],
23+
"command": "${command:python.interpreterPath}",
2224
"detail": "Clean up cache folders.",
2325
"group": "test",
2426
"label": "Clean up",
@@ -33,9 +35,11 @@
3335
"type": "shell"
3436
},
3537
{
36-
"args": [],
37-
"command": "tasks/compile_docs.ps1",
38-
"detail": "Compile the Markdown documentation to a Jupyter notebook.",
38+
"args": [
39+
"tasks/compile_docs.py"
40+
],
41+
"command": "${command:python.interpreterPath}",
42+
"detail": "Compile the Markdown documentation.",
3943
"group": "test",
4044
"label": "Compile docs",
4145
"presentation": {

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,23 @@ GitHub repository: <https://github.com/bshoshany/OGRePy>\
99
PyPi project: <https://pypi.org/project/OGRePy/>
1010

1111
* [Version history](#version-history)
12+
* [v1.1.0 (2024-09-08)](#v110-2024-09-08)
1213
* [v1.0.1 (2024-09-04)](#v101-2024-09-04)
1314

1415
## Version history
1516

17+
### v1.1.0 (2024-09-08)
18+
19+
* Bug fixes:
20+
* Fixed a bug where tensor contraction failed when generating a symbol for the new tensor. See [#1](https://github.com/bshoshany/OGRePy/issues/1).
21+
* Fixed math in documentation (apparently Jupyter and GitHub have very different rules with regards to displaying math).
22+
* New features:
23+
* The documentation is now available in HTML format ([`OGRePy_Documentation.html`](https://github.com/bshoshany/OGRePy/blob/master/docs/OGRePy_Documentation.html)) and PDF format ([`OGRePy_Documentation.pdf`](https://github.com/bshoshany/OGRePy/blob/master/docs/OGRePy_Documentation.pdf)) in addition to Jupyter Notebook format ([`OGRePy_Documentation.ipynb`](https://github.com/bshoshany/OGRePy/blob/master/docs/OGRePy_Documentation.ipynb)).
24+
* Added links to open the documentation in any of these three formats to the welcome message. Note that the documentation is bundled with the package, so this will work offline as well.
25+
* The welcome message can now be disabled either by defining `OGREPY_DISABLE_WELCOME = True` in the notebook or by setting the environment variable `OGREPY_DISABLE_WELCOME` to `True` (which allows you to disable it permanently). This must be done before importing the package.
26+
* The package now automatically checks for updates from [PyPI](https://pypi.org/project/OGRePy/) when it is imported. This can be disabled by defining `OGREPY_DISABLE_UPDATE_CHECK = True` in the notebook, or setting the environment variable `OGREPY_DISABLE_UPDATE_CHECK` to `True`, before importing the package. In that case, you can still check for updates manually if you wish, using `T.update_check()`. However, note that this check is performed asynchronously, so it does not increase the load time of the package, and you can continue working while the check is being performed. If the welcome message is disabled, the startup update check is performed in "quiet mode", meaning that it only notifies you if a new version is available, but not if you are running the latest version.
27+
* Changing the curve parameter now applies retroactively to any tensors previously calculated. Behind the scenes, the curve parameter is stored only as a placeholder, which is replaced dynamically with the user's chosen symbol when the components are displayed with `show()` or `list()` or extracted with `components()`.
28+
1629
### v1.0.1 (2024-09-04)
1730

1831
* Initial release.

OGRePy/__init__.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
r"""
22
# OGRePy: An Object-Oriented General Relativity Package for Python
3+
v1.1.0 (2024-09-08)
34
45
By **Barak Shoshany**\
56
@@ -20,13 +21,7 @@
2021
import sympy as s
2122

2223
# 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+
from ._core import Coordinates, CovariantD, Metric, OGRePyError, PartialD, Tensor, __version__, calc, diag, doc, func, info, options, release_date, sym, syms, update_check, welcome
2425

2526
# 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()
27+
__all__: list[str] = ["s", "Coordinates", "CovariantD", "Metric", "OGRePyError", "PartialD", "Tensor", "__version__", "calc", "diag", "doc", "func", "info", "options", "release_date", "sym", "syms", "update_check", "welcome"]

0 commit comments

Comments
 (0)