@@ -36,7 +36,7 @@ Example
3636Follow the instructions at :doc: `New Project <../source/new_project >` to create a new
3737project named **acme-supernovae ** with a package named **supernovae **.
3838
39- .. code-block :: bash
39+ .. code-block :: console
4040
4141 copier copy gh:lincc-frameworks/python-project-template acme-supernovae
4242 cd acme-supernovae
@@ -51,7 +51,7 @@ might break over time as code changes and other uses of **src** are confused by
5151Define bash functions to find the files containing **src ** and to perform the change using
5252sed so first add the shell functions.
5353
54- .. code-block :: bash
54+ .. code-block :: console
5555
5656 organization=acme
5757 subpackage=supernovae
@@ -65,21 +65,21 @@ sed so first add the shell functions.
6565
6666 It is wise to review the changes before committing them.
6767
68- .. code-block :: bash
68+ .. code-block :: console
6969
7070 git diff
7171
7272 Assuming all is good
7373
74- .. code-block :: bash
74+ .. code-block :: console
7575
7676 git add .
7777 git commit -m "finished move from src to ${organization}"
7878
7979 Add a clause to pyproject.toml to declare this as a namespace package. Again, you might want to
8080review the results before committing. At least take a look so you see what it added.
8181
82- .. code-block :: bash
82+ .. code-block :: console
8383
8484 tr '|' '\n' <<<'|[tool.setuptools.packages.find]|where = ["."]|include = ["'"${organization}"'"]|namespaces = true' >>pyproject.toml
8585 git add .
@@ -90,7 +90,7 @@ the package is now a namespace package. This is done by adding a clause to the i
9090
9191This might be the trickiest bit although for a brand new project it does very little.
9292
93- .. code-block :: bash
93+ .. code-block :: console
9494
9595 myfiles2() { find . -name .git -prune -o -type f \( -name '*.py' -o -name '*.ipynb' \) -print; }
9696 mysed2() { sed -e "/import/s%${subpackage}%${organization}.${subpackage}%g;" "${1}" >.tmpfile && mv "${1}" .oldfile && mv .tmpfile "${1}" && rm .oldfile; }
@@ -104,15 +104,15 @@ This might be the trickiest bit although for a brand new project it does very li
104104 Build the project and install. We recommend that you do this in a virtual environment.
105105In this example we build for '.[dev]' and also run the pre-commit hooks as a verification step.
106106
107- .. code-block :: bash
107+ .. code-block :: console
108108
109109 pip install -e '.[dev]'
110110 pre-commit run --all-files
111111
112112 Create a new project named **acme-utilities ** with a package named **utilities ** and convert it to a namespace package
113113using exactly the same process as above but with different names. Then install and check with pre-commit hooks.
114114
115- .. code-block :: bash
115+ .. code-block :: console
116116
117117 cd ..
118118 copier copy gh:lincc-frameworks/python-project-template acme-utilities
@@ -153,7 +153,7 @@ using exactly the same process as above but with different names. Then install
153153
154154 Try it out. In this example we use the python interpreter to import the subpackages and run the examples.
155155
156- .. code-block :: bash
156+ .. code-block :: console
157157
158158 $ python
159159 >>> from acme import supernovae, utilities
@@ -167,6 +167,6 @@ Try it out. In this example we use the python interpreter to import the subpack
167167
168168 You might want to uninstall the packages to avoid python environment bloat!
169169
170- .. code-block :: bash
170+ .. code-block :: console
171171
172172 pip uninstall acme-supernovae acme-utilities
0 commit comments