FEniCS / ufl

UFL - Unified Form Language
https://fenicsproject.org
GNU Lesser General Public License v3.0
104 stars 64 forks source link

rename namespace from ufl to ufl_legacy #155

Closed drew-parsons closed 1 year ago

drew-parsons commented 1 year ago

ufl 2023.1 diverged sufficiently that it is no longer compatible with old dolfin, and not readily patched to restore compatibility.

The issue is raised at https://github.com/FEniCS/ufl/issues/151 . Discussion at #151 concluded that since ufl is used elsewhere (e.g. firedrake), it is preferable to rename old ufl (2022.2.0) as ufl_legacy, rather than to rename latest ufl as uflx (which was done for ffc->ffcx)

This patch commences the change of namespace from ufl to ufl_legacy, intended for merging into a new ufl_legacy branch based on the 2022.2.0 tag.

drew-parsons commented 1 year ago

One question I'm not certain about is the meta information: in setup.cfg should the name be changed from fenics-ufl to fenics-ufl-legacy? I wasn't sure since it's tied to the version. We probably want to freeze the major version at 2022 and increment the minor version. So there won't necessarily be a clash between legacy "fenics-ufl 2022.3.0" and new "fenics-ufl 2023.1.1".

But thinking about it, since (old) dolfin will need to be updated to use the ufl_legacy namespace, it's probably more correct to have it require fenics-ufl-legacy rather than fenics-ufl, so setup.cfg for ufl_legacy should probably be patched this way.

drew-parsons commented 1 year ago

I think it makes sense to rename the distribution name as fenics-ufl-legacy, in line with renaming the package itself. I think the PR is ready for review now.

drew-parsons commented 1 year ago

There are some ufl components unchanged to ufl_legacy in the tree here, which are not present on my local clone. I will investigate it.

drew-parsons commented 1 year ago

I tried restoring the "misplaced" files and being more explicitly in using git mv before changing contents. But then github reported the same state anyway, as if these 4 files (and not the others) were copied and deleted without git mv. But the successful renaming is seen in 7a708f7 with these 4 files renamed the same way as the others.

So I don't know why the PR summary displays these 4 files differently (algorithms/init.py, algorithms/multifunction.py, classes.py, finiteelement/init.py). Perhaps it's just a glitch in the github web interface.

So I've reset (annulled) those last changes. The final result is consistent with what it should be. I'm reopening for review.