sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.45k stars 481 forks source link

New upstream for database_stein_watkins #33881

Open mkoeppe opened 2 years ago

mkoeppe commented 2 years ago

We create Python packages at https://github.com/sagemath/database_stein_watkins that serve as the new upstream.

The actual files will be accessed via importlib.resources; actually the backport package importlib-resources, because Python 3.8 does not have files and as_file. Also we need the added support for package resources in namespace packages: the distributions database-stein-watkins-mini and database-stein-watkins-huge both share the namespace database_stein_watkins.

Currently database-stein-watkins-huge is only a placeholder. Whether we can publish the huge package to PyPI will depend on whether the size limit request at https://github.com/pypa/pypi-support/issues/1946 is successful.

We use hatchling as the build system. It supports PEP 660 editable wheels and namespace packages. (flit_core is not suitable - it does not have support for resources in namespace packages.)

Part of Meta-ticket #30914: Create upstream repositories, pip-installable packages for database packages

CC: @williamstein

Component: packages: optional

Author: Matthias Koeppe

Branch/Commit: u/mkoeppe/new_upstream_for_database_stein_watkins @ fb43593

Issue created by migration from https://trac.sagemath.org/ticket/33881

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -3,3 +3,4 @@

 Publishing the huge package to PyPI will require a pypa/pypi-support ticket.

+As build system we use `flit_core`, which supports [PEP 660 editable wheels](https://peps.python.org/pep-0660/).
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -3,4 +3,7 @@

 Publishing the huge package to PyPI will require a pypa/pypi-support ticket.

-As build system we use `flit_core`, which supports [PEP 660 editable wheels](https://peps.python.org/pep-0660/).
+The actual files will be accessed via `importlib.resources`; actually the backport package `importlib-resources`, because we need the added [support for package resources in namespace packages](https://github.com/python/importlib_resources/pull/196).
+
+We use a build system that supports [PEP 660 editable wheels](https://peps.python.org/pep-0660/).
+
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -3,7 +3,8 @@

 Publishing the huge package to PyPI will require a pypa/pypi-support ticket.

-The actual files will be accessed via `importlib.resources`; actually the backport package `importlib-resources`, because we need the added [support for package resources in namespace packages](https://github.com/python/importlib_resources/pull/196).
+The actual files will be accessed via `importlib.resources`; actually the backport package `importlib-resources`, because we need the added [support for package resources in namespace packages](https://github.com/python/importlib_resources/pull/196): the distributions **database-stein-watkins-mini** and **database-stein-watkins-huge** both share the namespace `database_stein_watkins`.

-We use a build system that supports [PEP 660 editable wheels](https://peps.python.org/pep-0660/).
+We use `hatchling` as the build system. It supports [PEP 660 editable wheels](https://peps.python.org/pep-0660/) and namespace packages. (`flit_core` is not suitable - it does not have support for resources in namespace packages.)

+
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -3,7 +3,7 @@

 Publishing the huge package to PyPI will require a pypa/pypi-support ticket.

-The actual files will be accessed via `importlib.resources`; actually the backport package `importlib-resources`, because we need the added [support for package resources in namespace packages](https://github.com/python/importlib_resources/pull/196): the distributions **database-stein-watkins-mini** and **database-stein-watkins-huge** both share the namespace `database_stein_watkins`.
+The actual files will be accessed via `importlib.resources`; actually the backport package `importlib-resources`, because we need the added [support for package resources in namespace packages](https://github.com/python/importlib_resources/pull/196): the distributions [database-stein-watkins-mini](https://pypi.org/project/database-stein-watkins-mini/20070827/) and **database-stein-watkins-huge** both share the namespace `database_stein_watkins`.

 We use `hatchling` as the build system. It supports [PEP 660 editable wheels](https://peps.python.org/pep-0660/) and namespace packages. (`flit_core` is not suitable - it does not have support for resources in namespace packages.)
mkoeppe commented 2 years ago

Branch: u/mkoeppe/new_upstream_for_database_stein_watkins

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -5,6 +5,6 @@

 The actual files will be accessed via `importlib.resources`; actually the backport package `importlib-resources`, because we need the added [support for package resources in namespace packages](https://github.com/python/importlib_resources/pull/196): the distributions [database-stein-watkins-mini](https://pypi.org/project/database-stein-watkins-mini/20070827/) and **database-stein-watkins-huge** both share the namespace `database_stein_watkins`.

-We use `hatchling` as the build system. It supports [PEP 660 editable wheels](https://peps.python.org/pep-0660/) and namespace packages. (`flit_core` is not suitable - it does not have support for resources in namespace packages.)
+We use [hatchling](https://hatch.pypa.io/latest/config/build/) as the build system. It supports [PEP 660 editable wheels](https://peps.python.org/pep-0660/) and namespace packages. (`flit_core` is not suitable - it does not have support for resources in namespace packages.)
mkoeppe commented 2 years ago

New commits:

747a578build/pkgs/database_stein_watkins_mini: New upstream
mkoeppe commented 2 years ago

Commit: 747a578

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 747a578 to 7579cc4

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

b7e702ebuild/pkgs/database_stein_watkins_mini/package-version.txt: Bump patch level
9893d47src/sage/databases/stein_watkins.py: Change all # optional tags to database_stein_watkins_mini
7579cc4src/sage/databases/stein_watkins.py: Use importlib_resources instead of reading from SAGE_SHARE
mkoeppe commented 2 years ago

Author: Matthias Koeppe

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,9 +1,9 @@
 We create Python packages at https://github.com/sagemath/database_stein_watkins 
 that serve as the new upstream.

-Publishing the huge package to PyPI will require a pypa/pypi-support ticket.
+The actual files will be accessed via `importlib.resources`; actually the backport package `importlib-resources`, because we need the added [support for package resources in namespace packages](https://github.com/python/importlib_resources/pull/196): the distributions [database-stein-watkins-mini](https://pypi.org/project/database-stein-watkins-mini/20070827/) and [database-stein-watkins-huge](https://pypi.org/project/database-stein-watkins-huge/#description) both share the namespace `database_stein_watkins`.

-The actual files will be accessed via `importlib.resources`; actually the backport package `importlib-resources`, because we need the added [support for package resources in namespace packages](https://github.com/python/importlib_resources/pull/196): the distributions [database-stein-watkins-mini](https://pypi.org/project/database-stein-watkins-mini/20070827/) and **database-stein-watkins-huge** both share the namespace `database_stein_watkins`.
+Currently [database-stein-watkins-huge](https://pypi.org/project/database-stein-watkins-huge/#description) is only a placeholder. Publishing the huge package to PyPI will require a pypa/pypi-support ticket.

 We use [hatchling](https://hatch.pypa.io/latest/config/build/) as the build system. It supports [PEP 660 editable wheels](https://peps.python.org/pep-0660/) and namespace packages. (`flit_core` is not suitable - it does not have support for resources in namespace packages.)
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -3,7 +3,7 @@

 The actual files will be accessed via `importlib.resources`; actually the backport package `importlib-resources`, because we need the added [support for package resources in namespace packages](https://github.com/python/importlib_resources/pull/196): the distributions [database-stein-watkins-mini](https://pypi.org/project/database-stein-watkins-mini/20070827/) and [database-stein-watkins-huge](https://pypi.org/project/database-stein-watkins-huge/#description) both share the namespace `database_stein_watkins`.

-Currently [database-stein-watkins-huge](https://pypi.org/project/database-stein-watkins-huge/#description) is only a placeholder. Publishing the huge package to PyPI will require a pypa/pypi-support ticket.
+Currently [database-stein-watkins-huge](https://pypi.org/project/database-stein-watkins-huge/#description) is only a placeholder. Whether we can publish the huge package to PyPI will depend on whether the size limit request at https://github.com/pypa/pypi-support/issues/1946 is successful.

 We use [hatchling](https://hatch.pypa.io/latest/config/build/) as the build system. It supports [PEP 660 editable wheels](https://peps.python.org/pep-0660/) and namespace packages. (`flit_core` is not suitable - it does not have support for resources in namespace packages.)
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 7579cc4 to 0348bf8

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

0348bf8build/pkgs/database_stein_watkins: New upstream
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 0348bf8 to e9cba6c

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

e9cba6csrc/sage/databases/stein_watkins.py: Add a test that needs the huge package
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,7 +1,7 @@
 We create Python packages at https://github.com/sagemath/database_stein_watkins 
 that serve as the new upstream.

-The actual files will be accessed via `importlib.resources`; actually the backport package `importlib-resources`, because we need the added [support for package resources in namespace packages](https://github.com/python/importlib_resources/pull/196): the distributions [database-stein-watkins-mini](https://pypi.org/project/database-stein-watkins-mini/20070827/) and [database-stein-watkins-huge](https://pypi.org/project/database-stein-watkins-huge/#description) both share the namespace `database_stein_watkins`.
+The actual files will be accessed via `importlib.resources`; actually the backport package `importlib-resources`, because Python 3.8 does not have [files and as_file](https://docs.python.org/3.11/library/importlib.resources.html#importlib.resources.files). Also we need the added [support for package resources in namespace packages](https://github.com/python/importlib_resources/pull/196): the distributions [database-stein-watkins-mini](https://pypi.org/project/database-stein-watkins-mini/20070827/) and [database-stein-watkins-huge](https://pypi.org/project/database-stein-watkins-huge/#description) both share the namespace `database_stein_watkins`.

 Currently [database-stein-watkins-huge](https://pypi.org/project/database-stein-watkins-huge/#description) is only a placeholder. Whether we can publish the huge package to PyPI will depend on whether the size limit request at https://github.com/pypa/pypi-support/issues/1946 is successful.
mkoeppe commented 2 years ago
comment:14

Editable installs do not work yet

mkoeppe commented 2 years ago
comment:15

Now they work.

mkoeppe commented 2 years ago

Work Issues: Add spkgs for hatchling and its deps

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

8958108build/pkgs/hatchling: New
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from e9cba6c to 8958108

mkoeppe commented 2 years ago

Changed work issues from Add spkgs for hatchling and its deps to Change spkg for hatchling to normal, add its deps

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 8958108 to fb43593

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

d8e55c9build/pkgs/database_stein_watkins_mini: New upstream
f16d624build/pkgs/database_stein_watkins_mini/package-version.txt: Bump patch level
19b503bsrc/sage/databases/stein_watkins.py: Change all # optional tags to database_stein_watkins_mini
773b85bsrc/sage/databases/stein_watkins.py: Use importlib_resources instead of reading from SAGE_SHARE
33c60d4build/pkgs/database_stein_watkins: New upstream
fb43593src/sage/databases/stein_watkins.py: Add a test that needs the huge package
mkoeppe commented 2 years ago

Changed work issues from Change spkg for hatchling to normal, add its deps to none

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -7,4 +7,5 @@

 We use [hatchling](https://hatch.pypa.io/latest/config/build/) as the build system. It supports [PEP 660 editable wheels](https://peps.python.org/pep-0660/) and namespace packages. (`flit_core` is not suitable - it does not have support for resources in namespace packages.)

+Part of Meta-ticket #30914: Create upstream repositories, pip-installable packages for database packages