Skip to content

Commit

Permalink
Added basic pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson committed Feb 17, 2022
1 parent f02034b commit 089be85
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 16 deletions.
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-yaml
args: ["--unsafe"]
- id: debug-statements
- id: end-of-file-fixer
exclude: ".*fits"
- id: trailing-whitespace
exclude: ".*fits"
2 changes: 1 addition & 1 deletion asdf/tags/core/tests/data/datatype-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ properties:
datatype: int16
- name: b
datatype: ['ascii', 16]
exact_datatype: true
exact_datatype: true
2 changes: 1 addition & 1 deletion asdf/tags/core/tests/data/ndim-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ properties:
ndim: 2

b:
max_ndim: 2
max_ndim: 2
2 changes: 1 addition & 1 deletion asdf/tests/data/complex-42.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/core/custom-42.0.0"
type: string
type: string
2 changes: 1 addition & 1 deletion asdf/tests/data/custom-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://nowhere.org/schemas/custom/custom-1.0.0"
type: integer
default: 42
default: 42
2 changes: 1 addition & 1 deletion asdf/tests/data/custom_flow-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ properties:
type: number
b:
type: number
flowStyle: block
flowStyle: block
2 changes: 1 addition & 1 deletion asdf/tests/data/missing-1.1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://nowhere.org/schemas/custom/missing-1.1.0"
type: object
type: object
2 changes: 1 addition & 1 deletion asdf/tests/data/self_referencing-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ id: "http://nowhere.org/schemas/custom/self_referencing-1.0.0"
anyOf:
- type: object
- $ref: "#/anyOf/0"
...
...
2 changes: 1 addition & 1 deletion compatibility_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ into a virtualenv, so an internet connection is required to run them.

The tests in this directory are excluded from the normal test suite, but
can be run (from the repo root directory) with
`pytest compatibility_tests/ --remote-data`.
`pytest compatibility_tests/ --remote-data`.
2 changes: 1 addition & 1 deletion docs/_templates/autosummary/base.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% extends "autosummary_core/base.rst" %}
{# The template this is inherited from is in astropy/sphinx/ext/templates/autosummary_core. If you want to modify this template, it is strongly recommended that you still inherit from the astropy template. #}
{# The template this is inherited from is in astropy/sphinx/ext/templates/autosummary_core. If you want to modify this template, it is strongly recommended that you still inherit from the astropy template. #}
2 changes: 1 addition & 1 deletion docs/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% extends "autosummary_core/class.rst" %}
{# The template this is inherited from is in astropy/sphinx/ext/templates/autosummary_core. If you want to modify this template, it is strongly recommended that you still inherit from the astropy template. #}
{# The template this is inherited from is in astropy/sphinx/ext/templates/autosummary_core. If you want to modify this template, it is strongly recommended that you still inherit from the astropy template. #}
2 changes: 1 addition & 1 deletion docs/_templates/autosummary/module.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% extends "autosummary_core/module.rst" %}
{# The template this is inherited from is in astropy/sphinx/ext/templates/autosummary_core. If you want to modify this template, it is strongly recommended that you still inherit from the astropy template. #}
{# The template this is inherited from is in astropy/sphinx/ext/templates/autosummary_core. If you want to modify this template, it is strongly recommended that you still inherit from the astropy template. #}
1 change: 0 additions & 1 deletion docs/asdf/developer_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -711,4 +711,3 @@ and keeping necessary state, which means that the ``AsdfFile`` can go
unmodified. The ``SerializationContext`` will be relatively lightweight and
creating it will not incur as much of a performance penalty as creating an
``AsdfFile``.

2 changes: 1 addition & 1 deletion docs/asdf/extending/schemas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -243,4 +243,4 @@ an error if not.

.. _JSON Schema Draft 4: https://json-schema.org/specification-links.html#draft-4
.. _Understanding JSON Schema: https://json-schema.org/understanding-json-schema/
.. _quantity schema: https://asdf-standard.readthedocs.io/en/latest/generated/stsci.edu/asdf/unit/quantity-1.1.0.html
.. _quantity schema: https://asdf-standard.readthedocs.io/en/latest/generated/stsci.edu/asdf/unit/quantity-1.1.0.html
6 changes: 3 additions & 3 deletions docs/asdf/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -533,10 +533,10 @@ The `AsdfFile.info` method behaves similarly to `asdf.info`, rendering
the tree of the associated `AsdfFile`.

Normally `asdf.info` will not show the contents of asdf nodes turned
into Python custom objects, but if that object supports a special
method, you may see the contents of such objects.
into Python custom objects, but if that object supports a special
method, you may see the contents of such objects.
See :ref:`exposing_extension_object_internals` for how
to implement such support for `asdf.info` and `asdf.search`.
to implement such support for `asdf.info` and `asdf.search`.

Searching the ASDF tree
=======================
Expand Down

0 comments on commit 089be85

Please sign in to comment.