Skip to content

Commit b22e735

Browse files
authored
Create a configuration checklist with references. (#428)
1 parent 9c136cd commit b22e735

File tree

7 files changed

+83
-38
lines changed

7 files changed

+83
-38
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This project template codifies LINCC-Framework's best practices for python code
77

88
[Copier](https://copier.readthedocs.io/en/latest/) is required to use this template. Copier is an open source tool that hydrates projects from templates and natively supports updating projects as the original template matures. It's really neat!
99

10-
Our template works best with Copier v8.0 and above.
10+
Our template works best with Copier v9.1 and above.
1111
For all the information, see the detailed user guide in
1212
[readthedocs](https://lincc-ppt.readthedocs.io/)
1313

copier.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ _message_after_copy: |
187187
- Enable dependabot in github
188188
- Add another GitHub user as an administrator on the repository
189189
190+
These steps are detailed at
191+
https://lincc-ppt.readthedocs.io/en/latest/source/configuration_checklist.html
192+
190193
###
191194
# Below this line are Copier configuration options.
192195
###

docs/conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
html_static_path = ["static"]
2828
html_css_files = ["custom.css"]
2929

30-
extensions = ["sphinx_copybutton"]
30+
extensions = ["sphinx_copybutton", "sphinx.ext.autosectionlabel"]
3131

3232
# -- sphinx-copybutton configuration ----------------------------------------
3333
## sets up the expected prompt text from console blocks, and excludes it from
@@ -38,6 +38,10 @@
3838
## lets us suppress the copy button on select code blocks.
3939
copybutton_selector = "div:not(.no-copybutton) > div.highlight > pre"
4040

41+
# -- Options for autosectionlabel -------------------------------------------------
42+
43+
autosectionlabel_prefix_document=True
44+
4145
# -- Options for HTML output -------------------------------------------------
4246
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
4347

docs/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you find it useful, or have any questions or concerns when using the template
1212
please :doc:`/source/contact`
1313

1414
.. important::
15-
These instructions assume you are using ``copier`` version 8.0 or newer. Some
15+
These instructions assume you are using ``copier`` version 9.1 or newer. Some
1616
features may not be available in older versions.
1717

1818
.. toctree::
@@ -21,6 +21,7 @@ please :doc:`/source/contact`
2121

2222
source/overview
2323
source/new_project
24+
source/configuration_checklist
2425
source/update_project
2526
source/existing_project
2627
source/contributing
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
Configuring a new project
2+
===============================================================================
3+
4+
So you've created a new python project from the template! Great!
5+
6+
Now let's get other services linked up to your new project to make the most of
7+
what the template and open source CI has to offer!
8+
9+
Configure your GitHub repository for safety and security
10+
-------------------------------------------------------------------------------
11+
12+
* Consider setting up branch protection rules.
13+
14+
* `GitHub Instructions for protected branches <https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-pull-request-reviews-before-merging>`_
15+
* This will help ensure your code is always ready to deploy by running all tests
16+
pass to merging into the ``main`` branch.
17+
18+
* Enable ``dependabot`` for your new repository
19+
20+
* `GitHub Instructions for dependabot <https://docs.github.com/en/code-security/getting-started/securing-your-repository#managing-dependabot-security-updates>`_
21+
* There are several different features that ``dependabot`` offers to keep your dependencies
22+
up to date and your code secure. It's as easy as clicking a checkbox to get started.
23+
24+
* Add another GitHub user as an administrator on your repository
25+
26+
* `GitHub Instructions for repo access <https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository>`_
27+
* It's just a good idea - like having a spare set of keys for your Lamborghini.
28+
29+
Configure your GitHub repository for convenience
30+
-------------------------------------------------------------------------------
31+
32+
There are several convenient options in GitHub that are not enabled by default.
33+
We find ourselves setting these options on all our development repositories, and
34+
list them here for reference.
35+
36+
In your repo, "Settings" tab, "General" page, scroll down to the "Pull Requests"
37+
section:
38+
39+
* Check **"Allow squash merging"**. This lets you combine several intermediate
40+
commits on a development branch into a single merge into main. The merge
41+
history will stay cleaner.
42+
* Check **"Allow auto-merge"**. This lets you set a pull request to automatically
43+
merge when all required reviews and status criteria is met. This can be
44+
great when working with folks in other time zones - you don't need to be
45+
around to merge your change once it's ready.
46+
* Check **"Automatically delete head branches"**. If you're working in development
47+
branches and only merging in to main with pull requests (which you should do!),
48+
your repo may quickly fill up with stale development branches. With
49+
this feature enabled, your development branches will be automatically deleted
50+
once the pull requests are merged into main.
51+
52+
53+
Get the most out of this template
54+
-------------------------------------------------------------------------------
55+
56+
- :ref:`Finish setting up benchmarks <practices/ci_benchmarking:Set-up>`
57+
- :ref:`Set up smoke test email notifications <practices/ci_testing:Email notifications>`
58+
- :ref:`Set up smoke test slack notifications <practices/ci_testing:Slack notifications>`
59+
- :ref:`Set up code coverage with codecov <practices/code_coverage:How to manage>`
60+
- :ref:`Set up a PyPI package <practices/pypi:Set-up>`
61+
- :ref:`Set up a conda-forge package <practices/conda:Set-up>`
62+
- :ref:`Connect your project to ReadTheDocs <practices/sphinx:How to get started with ReadTheDocs>`
63+
64+
Still have questions?
65+
-------------------------------------------------------------------------------
66+
67+
:doc:`/source/contact`

docs/source/new_project.rst

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ questions:
4343
code (``src/{{package_name}}``). The package name must start with a lowercase letter,
4444
followed by one or more of the following (a-z, 0-9, _).
4545
* - *What github organization will your project live under?*
46-
- This will either be a gihub organization, or your github username, if you're working outside
46+
- This will either be a github organization, or your github username, if you're working outside
4747
of an organization. This is used to construct URLs to your project, like
4848
``https://github.com/{{project_organization}}/{{project_name}}``
4949
* - *What is the name of the code author?*
@@ -169,41 +169,10 @@ Notice that when you create a PR in GitHub, a set of tests for Continuous
169169
Integration starts up to verify that the project can build successfully and
170170
that all the unit tests pass. Neato!
171171

172+
Next steps
173+
-------------------------------------------------------------------------------
172174

173-
Additional configurations
174-
-------------------------
175-
176-
Configure your GitHub repository for safety and security
177-
********************************************************
178-
179-
* Consider setting up branch protection rules.
180-
181-
* `GitHub Instructions for protected branches <https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-pull-request-reviews-before-merging>`_
182-
* This will help ensure your code is always ready to deploy by running all tests
183-
pass to merging into the ``main`` branch.
184-
185-
* Enable ``dependabot`` for your new repository
186-
187-
* `GitHub Instructions for dependabot <https://docs.github.com/en/code-security/getting-started/securing-your-repository#managing-dependabot-security-updates>`_
188-
* There are several different features that ``dependabot`` offers to keep your dependencies
189-
up to date and your code secure. It's as easy as clicking a checkbox to get started.
190-
191-
* Add another GitHub user as an administrator on your repository
192-
193-
* `GitHub Instructions for repo access <https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository>`_
194-
* It's just a good idea - like having a spare set of keys for your Lamborghini.
195-
196-
Get the most out of this template
197-
*********************************
198-
At this point, your new project is hydrated, version controlled and ready for
199-
you to start coding. But there's a lot more that this template has to offer!
200-
201-
If you want to enable performance benchmarking there are some additional steps.
202-
Refer to the "How to manage" section of :doc:`Continuous Integration Benchmarking <../practices/ci_benchmarking>`
203-
for more information.
204-
205-
Finally, take a look at the :doc:`Best Practices section <../practices/overview>` to learn about
206-
built in pre-commit hooks, GitHub CI, automatic documentation, and more.
175+
:doc:`Configure a new project<configuration_checklist>`
207176

208177
Still have questions?
209178
-------------------------------------------------------------------------------

docs/source/overview.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,5 @@ Given that your system satisfies the requirements, go ahead and install Copier.
7373
Now choose your next adventure...
7474
-------------------------------------
7575
* :doc:`Start a new project<new_project>`
76+
* :doc:`Configure a new project<configuration_checklist>`
7677
* :doc:`Upgrade an existing project<existing_project>`

0 commit comments

Comments
 (0)