You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+59-9Lines changed: 59 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,28 @@ Python Template Repo
2
2
====================
3
3
4
4
Python Template Repo aims to help you **quickly jumpstart new Python libraries with
5
-
integrated developer tooling**. Try this template out if you intend on **distributing
6
-
your Python library as an open-source Anaconda package** and **don't want to deal with
7
-
the repository infrastructure**!
5
+
integrated developer tooling to efficiently develop high quality and robust software.**
6
+
If you want to focus on developing open-source software without dedicating significant
7
+
time and effort on repo setup, try this template out!
8
8
9
9
Simply follow the "Getting Started" guides below. It is also easily configurable based
10
10
on your library's needs.
11
11
12
+
Motivation
13
+
----------
14
+
15
+
This template was driven from the desire to reduce the overhead in setting up and
16
+
maintaining Python libraries that follow software engineering practices (e.g., code
17
+
styling, unit testing, documentation). The target audience was originally developers
18
+
from the E3SM Project and LLNL Climate Program, but it can be used by anyone in the
19
+
open-source community!
20
+
21
+
The template is based on a common system design pattern integrated in `E3SM Project`_ post-processing tools (e3sm_diags, zppy, zstash, polaris), `xCDAT`_, and `PCMDI Metrics`_.
@@ -83,7 +98,8 @@ The library's documentation is setup with `Sphinx`_ and `Read the Docs Sphinx Th
83
98
You just need to do a few things to get up and running:
84
99
85
100
1. Update ``README.rst``, ``AUTHORS.rst``, ``HISTORY.rst``, and ``/docs/index.rst`` as needed
86
-
2. Decide how to deploy the documentation. Follow the instructions in the provided links.
101
+
2. Decide how to deploy the documentation. This step is left up to you based on your needs.
102
+
Follow the instructions in the provided links.
87
103
88
104
- Option 1: `Read the Docs`_
89
105
- Option 2: `GitHub Pages`_ (via GitHub Actions)
@@ -111,10 +127,9 @@ To build the documentation locally (useful for reviewing):
111
127
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112
128
113
129
This repository includes quality assurance (QA) tools for code formatting (``black``,
114
-
``isort``), linting (``flake8``), and unit testing (``pytest``). These tools ensure
115
-
that you can easily catch issues and follow good Python practices without sacrificing
116
-
energy on them. These tools are integrated in the `pre-commit`_ package as "hooks" that
117
-
automatically run when committing changes to files.
130
+
``isort``), linting (``flake8``), unit testing (``pytest``), and optional static type
131
+
checking (``mypy``). These tools ensure that you can easily catch issues and follow good
132
+
Python practices without sacrificing energy on them. These tools are integrated in the `pre-commit`_ package as "hooks" that automatically run when committing changes to files.
118
133
119
134
To run these QA tools through ``pre-commit``:
120
135
@@ -175,16 +190,49 @@ Information on QA tools:
175
190
automatically separated into sections and by type.
176
191
- `flake8`_ - A Python linter that checks Python code for style and syntax errors, and
177
192
for enforcing a style guide with `PEP (Python Enhancement Proposals)`_.
193
+
- `mypy`_ (enable in ``pre-commit-config.yaml``) - A static type checker for Python.
194
+
"Type checkers help ensure that you’re using variables and functions in your code
195
+
correctly. With mypy, add type hints (PEP 484) to your Python programs, and mypy will
0 commit comments