Skip to content

Commit

Permalink
Clarifications for migration guides (#527)
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil authored Oct 16, 2024
1 parent 644a32a commit 327df0a
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 49 deletions.
40 changes: 12 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ Development Status

The fork supports Python 3, increases test coverage, sets up CI and linters, maintains releases to [PyPI](https://pypi.org/project/galgebra/#history), improves [docs](http://galgebra.readthedocs.io) and has many bug fixes, see [Changelog](https://galgebra.readthedocs.io/en/latest/changelog.html).

> [!NOTE]
> [!IMPORTANT]
> Readers of Prof. Alan Macdonald's [Linear and Geometric Algebra](http://www.faculty.luther.edu/~macdonal/laga/index.html) and [Vector and Geometric Calculus](http://www.faculty.luther.edu/~macdonal/vagc/index.html), please check out [**Migrating guide for readers of LAGA&VAGC**](#migrating-guide-for-readers-of-lagavagc) below.
>
> If you are coming from [sympy.galgebra](https://docs.sympy.org/0.7.6.1/modules/galgebra/) or [brombo/galgebra](https://github.com/brombo/galgebra), please check out section [Migration Guide](#migration-guide) below.
> If you are coming from [sympy.galgebra](https://docs.sympy.org/0.7.6.1/modules/galgebra/) or [brombo/galgebra](https://github.com/brombo/galgebra) (unlikely nowadays), please check out section the old [Migration Guide](https://github.com/pygae/galgebra/blob/master/doc/old_migration_guide.md).
Features
--------------------
Expand Down Expand Up @@ -215,42 +215,26 @@ This could take more than 10 minutes, please be patient.
Migration Guide
----------------

> Note: The APIs have changed since the era of `sympy.galgebra` and `brombo/galgebra`, some properties and methods are deprecated, the supported versions of Python and SymPy have also changed, please check [Changelog](https://galgebra.readthedocs.io/en/latest/changelog.html) and further update your scripts accordingly besides the following. If you encounter any problems, feel free to [open an issue](https://github.com/pygae/galgebra/issues/new)!
### Migrating guide for readers of LAGA&VAGC

Readers of [Linear and Geometric Algebra](http://www.faculty.luther.edu/~macdonal/laga/index.html) and [Vector and Geometric Calculus](http://www.faculty.luther.edu/~macdonal/vagc/index.html) might be guided by [GAlgebra Primer](http://www.faculty.luther.edu/~macdonal/GAlgebraPrimer.pdf) (version November 29, 2022, accessed May, 2024) to download [GAfiles.zip](http://www.faculty.luther.edu/~macdonal/GAfiles.zip) and copy `gprinter.py`, `lt.py`, `mv.py`, and `GAlgebraInit.py`¸ into where GAlgebra is installed. These steps are NO LONGER NEEDED since GAlgebra 0.6.0 as they are merge into GAlgebra with tests, copying these files will cause conflicts and regressions of fixed bugs.

For minor differences to those files, please check out [the change log for GAlgebra 0.6.0](https://galgebra.readthedocs.io/en/latest/changelog.html#0.6.0). Also please note that:

- `GAlgebraInit.py` is renamed to `primer.py` and can be imported like `from galgebra.primer import *` but it's usage is discouraged, although it saves some boilerplate code, this is not part of GAlgebra's maintained API, GAlgebra might remove it in future.
- Some notebooks from the zip is included in GAlgebra in `examples/primer`.

### Migrating from [sympy.galgebra](https://docs.sympy.org/0.7.6.1/modules/galgebra/)

GAlgebra is no longer part of SymPy since 1.0.0, if you have an import like this in your source:

```python
from sympy.galgebra.ga import *
```
Readers of [Linear and Geometric Algebra](http://www.faculty.luther.edu/~macdonal/laga/index.html) and [Vector and Geometric Calculus](http://www.faculty.luther.edu/~macdonal/vagc/index.html) might be guided by [GAlgebra Primer](http://www.faculty.luther.edu/~macdonal/GAlgebraPrimer.pdf) (version November 29, 2022, accessed May, 2024) to download [GAfiles.zip](http://www.faculty.luther.edu/~macdonal/GAfiles.zip) and copy `gprinter.py`, `lt.py`, `mv.py`, and `GAlgebraInit.py`¸ into where GAlgebra is installed.

Simply remove the `sympy.` prefix before `galgebra` then you are good to go:
These steps are NO LONGER NEEDED since GAlgebra 0.6.0 as they are merge into GAlgebra with tests, copying these files will cause conflicts and regressions of fixed bugs. Instead, you may follow the following steps:

```python
from galgebra.ga import *
```bash
pip uninstall galgebra
pip install git+https://github.com/pygae/galgebra.git
```

### Migrating from [brombo/galgebra](https://github.com/brombo/galgebra)
GAlgebra will be installed as `0.6.0-dev` as `0.6.0` has not yet been finalized and published to PyPI.

The `setgapth.py` way to install is now deprecated by `pip install galgebra` and all modules in GAlgebra should be imported from `galgebra`, for example:
For minor differences to those files, please check out [the change log for GAlgebra 0.6.0](https://galgebra.readthedocs.io/en/latest/changelog.html#0.6.0). Also please note that:

```python
from galgebra.printer import Format, Eprint, latex, GaPrinter
from galgebra.ga import Ga
from galgebra.mv import Mv, Nga
```
- `GAlgebraInit.py` is renamed to `primer.py` and can be imported like `from galgebra.primer import *` but it's usage is discouraged, although it saves some boilerplate code, this is not part of GAlgebra's maintained API, GAlgebra might remove it in future.
- Some notebooks from the zip are included in GAlgebra in `examples/primer`.

<!-- end: migration -->

<!-- begin: bundled-resources -->

Bundled Resources
Expand Down
3 changes: 0 additions & 3 deletions doc/bundled-resources.rst

This file was deleted.

2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# -- Project information -----------------------------------------------------

project = 'galgebra'
copyright = '2014-2019, Alan Bromborsky and GAlgebra team'
copyright = '2014-2024, Alan Bromborsky and GAlgebra team'
author = 'Alan Bromborsky'

# -- General configuration ---------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion doc/getting-started.rst

This file was deleted.

9 changes: 0 additions & 9 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@

.. these are all hidden, because they render more clearly in the sidebar.
.. toctree::
:maxdepth: 2
:hidden:

getting-started
installation

.. toctree::
:caption: A guide to GAlgebra
:hidden:
Expand Down Expand Up @@ -40,8 +33,6 @@

changelog
bibliography
migration
bundled-resources

Indices and tables
==================
Expand Down
3 changes: 0 additions & 3 deletions doc/installation.rst

This file was deleted.

3 changes: 0 additions & 3 deletions doc/migration.rst

This file was deleted.

27 changes: 27 additions & 0 deletions doc/old_migration_guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Migration Guide (Old)

> Note: The APIs have changed since the era of `sympy.galgebra` and `brombo/galgebra`, some properties and methods are deprecated, the supported versions of Python and SymPy have also changed, please check [Changelog](https://galgebra.readthedocs.io/en/latest/changelog.html) and further update your scripts accordingly besides the following. If you encounter any problems, feel free to [open an issue](https://github.com/pygae/galgebra/issues/new)!
# Migrating from [sympy.galgebra](https://docs.sympy.org/0.7.6.1/modules/galgebra/)

GAlgebra is no longer part of SymPy since 1.0.0, if you have an import like this in your source:

```python
from sympy.galgebra.ga import *
```

Simply remove the `sympy.` prefix before `galgebra` then you are good to go:

```python
from galgebra.ga import *
```

# Migrating from [brombo/galgebra](https://github.com/brombo/galgebra)

The `setgapth.py` way to install is now deprecated by `pip install galgebra` and all modules in GAlgebra should be imported from `galgebra`, for example:

```python
from galgebra.printer import Format, Eprint, latex, GaPrinter
from galgebra.ga import Ga
from galgebra.mv import Mv, Nga
```
2 changes: 1 addition & 1 deletion doc/readthedocs-pip-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ scipy
ipykernel
nbsphinx
numba
sphinx-rtd-theme
sphinx-rtd-theme==2.0.0
sphinx_mdinclude

sphinx-markdown-tables
Expand Down

0 comments on commit 327df0a

Please sign in to comment.