Skip to content

Commit

Permalink
Change how-to document headings for consistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnbrown committed Dec 19, 2018
1 parent 6f11a62 commit 77295bf
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 31 deletions.
6 changes: 3 additions & 3 deletions docs/how-to/customize-differences.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
:keywords: datatest, differences, custom


#######################
How to Customize Errors
#######################
############################
How to Customize Differences
############################

When using a predicate function (see :ref:`predicate-docs`),
a ValidationError contains one "difference" for each time the
Expand Down
12 changes: 6 additions & 6 deletions docs/how-to/data-types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
:keywords: datatest, reference data


########################
How to Assert Data Types
########################
##########################
How to Validate Data Types
##########################

To check that data is of a particular type, you can pass a
type object (e.g., a class) as the *requirement* value
type object (i.e., a class) as the *requirement* value
(see :ref:`predicate-docs`).

In the following example, we use the type :py:class:`float`
In the following example, we use the :py:class:`float` type
as the *requirement*. The elements in *data* are considered
valid if they are float instances:

Expand Down Expand Up @@ -52,7 +52,7 @@ valid if they are float instances:
self.assertValid(data, float)
In this example, we use the type :py:class:`str` as the
In this example, we use the :py:class:`str` type as the
*requirement*. The elements in *data* are considered
valid if they are strings:

Expand Down
8 changes: 4 additions & 4 deletions docs/how-to/date-formats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
:keywords: datatest, date format, validate date


##########################
How to Assert Date Formats
##########################
############################
How to Validate Date Formats
############################

To assert a particular date format, you can use a predicate
To check for a particular date format, you can use a predicate
function. In the following example, we define a function that
checks for the YYYY-MM-DD format:

Expand Down
6 changes: 3 additions & 3 deletions docs/how-to/descriptive-stats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
:keywords: datatest, validate, sum, total


########################
How to Assert Sum Totals
########################
######################################
How to Validate Descriptive Statistics
######################################

To check sum totals from a file, you would select data from a column,
sum the values, and then validate the result against a required number
Expand Down
6 changes: 3 additions & 3 deletions docs/how-to/file-names.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
:keywords: datatest, check file names


########################
How to Assert File Names
########################
##########################
How to Validate File Names
##########################

The following example uses :py:func:`glob() <glob.glob>` to get
a list of file names from a specified location and then uses a
Expand Down
6 changes: 3 additions & 3 deletions docs/how-to/fuzzy-matching.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
:keywords: approximate string, fuzzy matching, testing, datatest


###########################
How to Assert Fuzzy Matches
###########################
#############################
How to Validate Fuzzy Matches
#############################

When comparing strings of text, it can sometimes be useful to assert
that values are similar instead of asserting that they are exactly the
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/intervals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


#########################
How to Assert an Interval
How to Validate Intervals
#########################

To check that data elements are within a given interval, you can
Expand Down
6 changes: 3 additions & 3 deletions docs/how-to/phone-numbers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
:keywords: datatest, phone format, validate phone number


##################################
How to Assert Phone Number Formats
##################################
#############################
How to Validate Phone Numbers
#############################

To check that phone numbers are well-formed, you can use a regular
expression.
Expand Down
6 changes: 3 additions & 3 deletions docs/how-to/subset-superset.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
:keywords: datatest, validate, subset, superset


###################################
How to Assert Subsets and Supersets
###################################
#####################################
How to Validate Subsets and Supersets
#####################################

When given a :py:class:`set` requirement, the :func:`validate` function's
default behavior checks data elements for membership in the set. But if you
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to/uniqueness.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@


###########################
How to Assert Unique Values
How to Check for Uniqueness
###########################

To assert that values are unique, we can define a group-requirement
To checck that values are unique, we can define a group-requirement
that generates :class:`Extra` differences when duplicate values are
encountered.

Expand Down

0 comments on commit 77295bf

Please sign in to comment.