|
| 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` |
0 commit comments