Skip to content

Commit

Permalink
sage_project_cookiecutter/sagemath-upstream-package-template: New
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Mar 18, 2024
1 parent aed4ff2 commit 006bf0b
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 2 deletions.
30 changes: 28 additions & 2 deletions pkgs/sage-project-cookiecutter/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ This creates configuration files:

It can also be invoked as follows::

$ pipx run cookiecutter gh:sagemath/sage --directory="pkgs/sage-project-cookiecutter/sage_project_cookiecutter/user-project-template"
$ pipx run cruft create https://github.com/mkoeppe/sage --checkout sagemath-environment-cookiecutter \
--directory="pkgs/sage-project-cookiecutter/sage_project_cookiecutter/user-project-template"

See https://cookiecutter.readthedocs.io/en/latest/README.html for available options.
TODO: Update URL, remove --checkout ... before merging.

See https://cruft.github.io/cruft/ for available options.


Creating a pip-installable downstream package
Expand All @@ -50,6 +53,11 @@ Additionally creates:

- ``.github/workflows/``

It can also be invoked as follows::

$ pipx run cruft create https://github.com/mkoeppe/sage --checkout sagemath-environment-cookiecutter \
--directory="pkgs/sage-project-cookiecutter/sage_project_cookiecutter/downstream-package-template"


Adding Sage CI portability/integration testing infrastructure to an upstream project
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -64,6 +72,11 @@ Creates:
- ``.devcontainer/portability-*``
- ``.devcontainer/tox-docker-in-docker``

It can also be invoked as follows::

$ pipx run cruft create https://github.com/mkoeppe/sage --checkout sagemath-environment-cookiecutter \
--directory="pkgs/sage-project-cookiecutter/sage_project_cookiecutter/upstream-package-template"


Creating a pip-installable upstream package of the SageMath organization
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -76,3 +89,16 @@ Additionally creates:

- ``CODE_OF_CONDUCT.md``
- ``CONTRIBUTING.md``

It can also be invoked as follows::

$ pipx run cruft create https://github.com/mkoeppe/sage --checkout sagemath-environment-cookiecutter \
--directory="pkgs/sage-project-cookiecutter/sage_project_cookiecutter/sagemath-upstream-package-template"


Updating a project
~~~~~~~~~~~~~~~~~~

::

$ pipx run cruft update
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"project_name": "my-sage-project",
"__prompts__": {
"project_name": "Name of the project (directory name to create)"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This is an open-source project maintained by the SageMath community.

The [Code of Conduct](https://github.com/sagemath/sage/blob/develop/CODE_OF_CONDUCT.md)
of the Sage community applies.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
This is an open-source project maintained by the SageMath community.

Contributions of all sorts are heartily welcomed.

See https://github.com/sagemath/sage/blob/develop/CONTRIBUTING.md for general
guidance on how to contribute.

Open issues or submit pull requests at https://github.com/sagemath/{{cookiecutter.project_name}}
and join https://groups.google.com/group/sage-devel to discuss.

0 comments on commit 006bf0b

Please sign in to comment.