Skip to content

Commit

Permalink
Updated to v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bshoshany committed Sep 16, 2024
1 parent 3db066d commit b45f28a
Show file tree
Hide file tree
Showing 15 changed files with 2,540 additions and 1,849 deletions.
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"cSpell.words": [
"alcubierre",
"applyfunc",
"archiveprefix",
"baraksh",
"bibtex",
"bject",
"christoffel",
"civita",
Expand All @@ -11,6 +13,7 @@
"dsolve",
"dunder",
"eneral",
"eprint",
"flrw",
"getipython",
"interactiveshell",
Expand All @@ -33,6 +36,7 @@
"pyenv",
"pylance",
"pylint",
"Pyodide",
"pyproject",
"pyright",
"rdict",
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,25 @@ GitHub repository: <https://github.com/bshoshany/OGRePy>\
PyPi project: <https://pypi.org/project/OGRePy/>

* [Version history](#version-history)
* [v1.2.0 (2024-09-15)](#v120-2024-09-15)
* [v1.1.0 (2024-09-08)](#v110-2024-09-08)
* [v1.0.1 (2024-09-04)](#v101-2024-09-04)

## Version history

### v1.2.0 (2024-09-15)

* New features:
* Tensor objects can now be compared using the `T.compare()` function. Two tensors are considered equal if their components are the same, and they are associated with the same metric.
* OGRePy now correctly displays Markdown and TeX output in JupyterLite.
* Tensor components in OGRePy are now **immutable**, meaning that they are specified once and for all and cannot be changed. This is done for consistency and simplicity. This means that `permute()` now returns a new tensor with its indices permuted instead of modifying the original tensor. Similarly, `simplify()` now returns a new tensor with its components simplified of simplifying the original tensor.
* Citing the package:
* This package now has an [arXiv paper](https://arxiv.org/abs/2409.03803)! If you use this package in published research, please cite it as follows:
* Barak Shoshany, *"OGRePy: An Object-Oriented General Relativity Package for Python"*, [doi:10.48550/arXiv.2409.03803](https://doi.org/10.48550/arXiv.2409.03803), [arXiv:2409.03803](https://arxiv.org/abs/2409.03803) (September 2024)
* Added a `CITATION.cff` file (in YAML format) to the GitHub repository. This should add [an option to get a citation in different formats](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files) directly from GitHub repository by clicking on "cite this repository" on the sidebar to the right.
* Added a `CITATION.bib` file (in BibTeX format) to the GitHub repository. You can use it to easily cite this package in your papers.
* For your convenience, the citing information can always be obtained by executing the function `T.cite()`.

### v1.1.0 (2024-09-08)

* Bug fixes:
Expand Down
8 changes: 8 additions & 0 deletions CITATION.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@article{Shoshany2024_OGRePy,
archiveprefix = {arXiv},
author = {Barak Shoshany},
doi = {10.48550/arXiv.2409.03803},
eprint = {2409.03803},
title = {{OGRePy: An Object-Oriented General Relativity Package for Python}},
year = {2024}
}
23 changes: 23 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
authors:
- email: [email protected]
family-names: Shoshany
given-names: Barak
orcid: https://orcid.org/0000-0003-2222-127X
cff-version: 1.2.0
doi: 10.48550/arXiv.2409.03803
license: MIT
message: If you use this package in published research, please cite it as follows.
preferred-citation:
authors:
- family-names: Shoshany
given-names: Barak
doi: 10.48550/arXiv.2409.03803
journal: arXiv
title: 'OGRePy: An Object-Oriented General Relativity Package for Python'
type: article
url: https://arxiv.org/abs/2409.03803
year: 2024
repository-code: https://github.com/bshoshany/OGRePy
title: 'OGRePy: An Object-Oriented General Relativity Package for Python'
type: software
url: https://github.com/bshoshany/OGRePy
27 changes: 23 additions & 4 deletions OGRePy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
r"""
# OGRePy: An Object-Oriented General Relativity Package for Python
v1.1.0 (2024-09-08)
v1.2.0 (2024-09-15)
By **Barak Shoshany**\
Email: <[email protected]>\
Expand All @@ -14,14 +14,33 @@
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.
If you use this package in software of any kind, please provide a link to [the GitHub repository](https://github.com/bshoshany/OGRePy) in the source code and documentation.
If you use this package in published research, please cite it as follows:
* Barak Shoshany, *"OGRePy: An Object-Oriented General Relativity Package for Python"*, [doi:10.48550/arXiv.2409.03803](https://doi.org/10.48550/arXiv.2409.03803), [arXiv:2409.03803](https://arxiv.org/abs/2409.03803) (September 2024)
You can use the following BibTeX entry:
```bibtex
@article{Shoshany2024_OGRePy,
archiveprefix = {arXiv},
author = {Barak Shoshany},
doi = {10.48550/arXiv.2409.03803},
eprint = {2409.03803},
title = {{OGRePy: An Object-Oriented General Relativity Package for Python}},
year = {2024}
}
```
If you found this project useful, please consider [starring it on GitHub](https://github.com/bshoshany/OGRePy/stargazers)! This allows me to see how many people are using my code, and motivates me to keep working to improve it.
"""

# 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, update_check, welcome
from ._core import Coordinates, CovariantD, Metric, OGRePyError, PartialD, Tensor, __version__, calc, cite, compare, diag, doc, func, info, options, release_date, sym, syms, update_check, 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", "update_check", "welcome"]
__all__: list[str] = ["s", "Coordinates", "CovariantD", "Metric", "OGRePyError", "PartialD", "Tensor", "__version__", "calc", "cite", "compare", "diag", "doc", "func", "info", "options", "release_date", "sym", "syms", "update_check", "welcome"]
Loading

0 comments on commit b45f28a

Please sign in to comment.