Skip to content

Commit b7c0a9c

Browse files
authored
This commit is almost exclusively adding line breaks. The one exception is renaming link text in precommit.rst. (#166)
1 parent 7eb9fe8 commit b7c0a9c

File tree

6 files changed

+89
-38
lines changed

6 files changed

+89
-38
lines changed

docs/practices/git-lfs.rst

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ Git Large File Support
44
Quick Start
55
-------------------------------------------------------------------------------
66

7-
After cloning a repository and connecting to the resulting working tree confirm that you have ``git-lfs`` and then issue ``git lfs install`` to install configuration and hooks and then ``git lfs track`` to designate targets for git-lfs.
7+
After cloning a repository and connecting to the resulting working tree confirm
8+
that you have ``git-lfs`` and then issue ``git lfs install`` to install
9+
configuration and hooks and then ``git lfs track`` to designate targets for git-lfs.
810

911
.. code-block:: bash
1012
@@ -26,12 +28,17 @@ After cloning a repository and connecting to the resulting working tree confirm
2628
What is it? Why do it?
2729
-------------------------------------------------------------------------------
2830

29-
`Git-lfs <https://git-lfs.com/>`_ replaces large files such as datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server.
30-
This can be very useful for projects that have large data files that change infrequently. It does require a remote that supports git-lfs and so if you are unsure about
31-
whether you want to use git-lfs you probably do not want to use it until you understand it better.
31+
`Git-lfs <https://git-lfs.com/>`_ replaces large files such as datasets, and
32+
graphics with text pointers inside Git, while storing the file contents on a remote server.
33+
This can be very useful for projects that have large data files that change
34+
infrequently.
35+
It does require a remote that supports git-lfs and so if you are unsure about
36+
whether you want to use git-lfs you probably do not want to use it until you
37+
understand it better.
3238

3339
This template provides a starting point for using git-lfs with a project.
34-
Note that you need to install the program ``git-lfs`` separately as that is not easily done as part of the installation. See :ref:`get-git-lfs-label`.
40+
Note that you need to install the program ``git-lfs`` separately as that is not
41+
easily done as part of the installation. See :ref:`get-git-lfs-label`.
3542

3643
How to manage
3744
-------------------------------------------------------------------------------
@@ -73,8 +80,10 @@ and several other git servers do support git-lfs. If you use another remote you
7380
Designate files for git-lfs tracking
7481
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7582
You will also want add paths to ``.gitattributes`` that designate the files git-lfs will manage for git.
76-
While you can edit ``.gitattributes`` directly there is a command that will make the needed changes and create the file if necessary.
77-
For example, if you want to specify that ``FITS`` files are handled by git-lfs then you might use these commands
83+
While you can edit ``.gitattributes`` directly there is a command that will make
84+
the needed changes and create the file if necessary.
85+
For example, if you want to specify that ``FITS`` files are handled by git-lfs
86+
then you might use these commands
7887

7988
.. code-block:: bash
8089
@@ -94,13 +103,18 @@ in the lsst developer documentation and adapt its recommendations to your projec
94103
Uninstall git-lfs from the repository
95104
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96105

97-
If you want to stop using git-lfs going forward then you can uninstall it. You should use the same options used on installation, in particular if you specified the ``--local`` option you should also specify it here. Probably it is safer to always include the ``--local`` option so you restrict impact to the current repository.
106+
If you want to stop using git-lfs going forward then you can uninstall it.
107+
You should use the same options used on installation, in particular if you
108+
specified the ``--local`` option you should also specify it here.
109+
Probably it is safer to always include the ``--local`` option so you restrict
110+
impact to the current repository.
98111

99112
.. code-block:: bash
100113
101114
git lfs uninstall --local
102115
103-
Any files modified after uninstalling git-lfs will become part of the regular git repository but the git-lfs artifacts will remain.
116+
Any files modified after uninstalling git-lfs will become part of the regular
117+
git repository but the git-lfs artifacts will remain.
104118

105119
Note that we recommend against uninstalling git-lfs as it causes confusion.
106120

@@ -110,7 +124,8 @@ You can see what files are controlled by git-lfs using the ``git lfs ls-files``
110124
111125
git lfs ls-files
112126
113-
Then if you want to copy them to the regular git repository you can change their modification dates using ``touch`` and commit the changes.
127+
Then if you want to copy them to the regular git repository you can change their
128+
modification dates using ``touch`` and commit the changes.
114129

115130

116131

docs/practices/linting.rst

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,25 @@ Linting
44
What is it? Why do it?
55
-------------------------------------------------------------------------------
66

7-
Linting is a form of static program checking, meaning that it analyzes code without running it.
8-
9-
A linter checks code for code errors, violations of some agreed-upon coding standards, or gives its opinion on code smells. A "code smell" is when something isn't exactly **wrong**, but could be an indicator that your code is inefficient or could be refactored to be cleaner.
10-
11-
When code is reliably run through a linter, then code reviewers can assume that the code they're looking at adheres to that agreed-upon coding standard.
12-
A code reviewer won't be distracted by improper spacing, and can focus their reviewing effort on the meat of the code.
13-
14-
There are two main linters suggested by this template: pylint and black. While they have a lot of the same opinions, we recommend picking a single standard for your project and sticking to it. If some folks use one linter, this may cause undue churn in your source files as each developer creates some formatting changes each time they touch a file (and then another developer undoes them the next time they touch the same file).
7+
Linting is a form of static program checking, meaning that it analyzes code
8+
without running it.
9+
10+
A linter checks code for code errors, violations of some agreed-upon coding
11+
standards, or gives its opinion on code smells. A "code smell" is when something
12+
isn't exactly **wrong**, but could be an indicator that your code is inefficient
13+
or could be refactored to be cleaner.
14+
15+
When code is reliably run through a linter, then code reviewers can assume that
16+
the code they're looking at adheres to that agreed-upon coding standard.
17+
A code reviewer won't be distracted by improper spacing, and can focus their
18+
reviewing effort on the meat of the code.
19+
20+
There are two main linters suggested by this template: pylint and black. While
21+
they have a lot of the same opinions, we recommend picking a single standard for
22+
your project and sticking to it.
23+
If some folks use one linter, this may cause undue churn in your source files as
24+
each developer creates some formatting changes each time they touch a file (and
25+
then another developer undoes them the next time they touch the same file).
1526

1627

1728
How to modify/remove

docs/practices/overview.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
Overview
22
===============================================================================
33

4-
The LINCC Frameworks team has selected some best practices for inclusion in this project template.
4+
The LINCC Frameworks team has selected some best practices for inclusion in
5+
this project template.
56

6-
Here, we explain each of those best practices in more detail, and provide any additional pointers you might want as you work within these practices.
7+
Here, we explain each of those best practices in more detail, and provide any
8+
additional pointers you might want as you work within these practices.
79

810
Practices
911
-------------------------------------------------------------------------------

docs/practices/pipx.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ We use ``pipx`` to install Copier (the technology that powers our template) as
2222
a command line tool, so that we can call ``copier`` from any virtual environment.
2323
Beyond that, we don't use ``pipx`` for anything else in the template.
2424

25-
In the :doc:`Getting Started <../source/overview>` section, we assume the use of ``pipx``. But you can use
26-
``conda`` or ``pip`` if you'd rather have ``copier`` installed in a specific
27-
environment. We have not yet documented the differences to the getting started
28-
workflow that this would require.
25+
In the :doc:`Getting Started <../source/overview>` section, we assume the use
26+
of ``pipx``.
27+
But you can use ``conda`` or ``pip`` if you'd rather have ``copier`` installed
28+
in a specific environment.
29+
We have not yet documented the differences to the getting started workflow that
30+
this would require.
2931

3032
How to install ``pipx``
3133
-----------------------

docs/practices/precommit.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@ of these that are not useful for your project.
5757
- Ensures that automatically generated documentation and, optionally, jupyter notebooks can be built successfully.
5858

5959

60-
Many other pre-commit hooks exist, a partial list can be found `here <https://pre-commit.com/hooks.html>`_.
60+
Many other pre-commit hooks exist, a partial list can be found in the pre-commit
61+
`documentation <https://pre-commit.com/hooks.html>`_.

docs/source/new_project.rst

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ Starting a new project
55
Create a new project from the template
66
-------------------------------------------------------------------------------
77

8-
Choose where you would like to create your new project, and call copier with the template.
8+
Choose where you would like to create your new project, and call copier with
9+
the template.
910

1011
.. code-block:: bash
1112
1213
>> copier gh:lincc-frameworks/python-project-template <path/to/destination>
1314
14-
Copier will ask you questions for how to set up the project. These questions will be used to fill in aspects of the project's configuration, including both metadata and parameters. Below we provide some high-level overview of the questions:
15+
Copier will ask you questions for how to set up the project. These questions
16+
will be used to fill in aspects of the project's configuration, including both
17+
metadata and parameters. Below we provide some high-level overview of the
18+
questions:
1519

1620
.. list-table::
1721
:header-rows: 1
@@ -44,27 +48,37 @@ Copier will ask you questions for how to set up the project. These questions wil
4448
- Support for large files for use in git. This option is primarily informational and no answer locks you in to using (or not using) git-lfs. Importantly, selecting this option does not install git-lfs for your project (see :doc:`Git_Large_File_Support <../practices/git-lfs>`).
4549

4650

47-
While these choices will provide the initial structure for your project, most can be changed later. See Copier's `documentation for changing answers to the question <https://copier.readthedocs.io/en/stable/updating/>`_.
51+
While these choices will provide the initial structure for your project, most
52+
can be changed later.
53+
See Copier's `documentation for changing answers to the question <https://copier.readthedocs.io/en/stable/updating/>`_.
4854

49-
After providing answers to the prompts, Copier will hydrate a project template and save it in the specified location. Additionally Copier will run ``git init`` in the new project directory to initialize it as a local repository.
55+
After providing answers to the prompts, Copier will hydrate a project template
56+
and save it in the specified location. Additionally Copier will run
57+
``git init`` in the new project directory to initialize it as a local repository.
5058

5159
Create a new environment
5260
---------------------------
5361

5462
If you are using `virtual environments <https://packaging.python.org/en/latest/glossary/#term-Virtual-Environment>`_
55-
create a new environment with your choice of environment tools (virtualenv, conda, etc.) and activate it.
56-
This step is optional, but we recommend using virtual environments to better manage different project's dependencies.
57-
See Python's `description of virtual environments <https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/>`_ for more details.
63+
create a new environment with your choice of environment tools (virtualenv,
64+
conda, etc.) and activate it.
65+
This step is optional, but we recommend using virtual environments to better
66+
manage different project's dependencies.
67+
See Python's `description of virtual environments <https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/>`_
68+
for more details.
5869

5970
.. tip::
60-
Projects using Python notebooks will need to have ``pandoc`` installed to convert notebooks to html locally.
61-
Pandoc is `available on conda-forge <https://github.com/conda-forge/pandoc-feedstock>`_, so conda can be a convenient way to keep these dependencies grouped together.
71+
Projects using Python notebooks will need to have ``pandoc`` installed to
72+
convert notebooks to html locally.
73+
Pandoc is `available on conda-forge <https://github.com/conda-forge/pandoc-feedstock>`_,
74+
so conda can be a convenient way to keep these dependencies grouped together.
6275

6376
Install your new package
6477
----------------------------------------------------
6578

6679
Go to the new package directory and install the newly created python package.
67-
Use ``pip`` to install both the standard set of dependencies as well as the ``[dev]`` dependencies.
80+
Use ``pip`` to install both the standard set of dependencies as well as the
81+
``[dev]`` dependencies.
6882

6983
.. note::
7084
Depending on your system you may not need the single quotes around ``'.[dev]'``.
@@ -85,12 +99,16 @@ Use ``pip`` to install both the standard set of dependencies as well as the ``[d
8599
Great, but don't stop here
86100
-------------------------------------------------------------------------------
87101

88-
At this point, your new project is hydrated and ready for you to start coding. But there's a lot more that this template has to offer. Keep reading to find out more about built in pre-commit hooks, GitHub CI, automatic documentation, and more.
102+
At this point, your new project is hydrated and ready for you to start coding.
103+
But there's a lot more that this template has to offer.
104+
Keep reading to find out more about built in pre-commit hooks, GitHub CI,
105+
automatic documentation, and more.
89106

90107
Commit your new project locally
91108
-------------------------------------------------------------------------------
92109

93-
Commit the project to your local version control like so to see the pre-commit checks run.
110+
Commit the project to your local version control like so to see the pre-commit
111+
checks run.
94112

95113
.. code-block:: bash
96114
@@ -109,7 +127,9 @@ Create a new repository in GitHub: (`GitHub How-to <https://docs.github.com/en/g
109127
>> git remote add origin https://github.com/<the_remote_project>/<the_remote_repository>
110128
>> git push origin <local_branch_name>
111129
112-
Notice that when you create a PR in GitHub, a set of tests for Continuous Integration starts up to verify that the project can build successfully and that all the unit tests pass. Neato!
130+
Notice that when you create a PR in GitHub, a set of tests for Continuous
131+
Integration starts up to verify that the project can build successfully and
132+
that all the unit tests pass. Neato!
113133

114134
Install pre-commit
115135
----------------------------

0 commit comments

Comments
 (0)