Skip to content

Commit

Permalink
Fix newlines and trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
saimn committed Oct 21, 2021
1 parent 12c6185 commit 2a7b970
Show file tree
Hide file tree
Showing 23 changed files with 94 additions and 102 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: end-of-file-fixer
exclude: ".*(data.*|extern.*|licenses.*|_parsetab.py)$"
- id: trailing-whitespace
exclude: ".*(data.*|extern.*|licenses.*|_parsetab.py)$"
exclude: ".*(data.*|extern.*|licenses.*|_parsetab.py|test_cds.py)$"
# - repo: https://github.com/timothycrosley/isort
# rev: 5.9.2
# hooks:
Expand Down
2 changes: 1 addition & 1 deletion GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Astropy Project Governance

Please visit our website to learn more about the [Astropy Team](http://www.astropy.org/team.html).
Please visit our website to learn more about the [Astropy Team](http://www.astropy.org/team.html).
80 changes: 40 additions & 40 deletions astropy/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -27,46 +27,46 @@ wherever appropriate.
Recommended BibTeX entries for the above citations are:

@ARTICLE{2018AJ....156..123T,
author = {{The Astropy Collaboration} and {Price-Whelan}, A.~M. and {Sip{\H o}cz}, B.~M. and
{G{\"u}nther}, H.~M. and {Lim}, P.~L. and {Crawford}, S.~M. and
{Conseil}, S. and {Shupe}, D.~L. and {Craig}, M.~W. and {Dencheva}, N. and
{Ginsburg}, A. and {VanderPlas}, J.~T. and {Bradley}, L.~D. and
{P{\'e}rez-Su{\'a}rez}, D. and {de Val-Borro}, M. and {Paper Contributors}, (. and
{Aldcroft}, T.~L. and {Cruz}, K.~L. and {Robitaille}, T.~P. and
{Tollerud}, E.~J. and {Coordination Committee}, (. and {Ardelean}, C. and
{Babej}, T. and {Bach}, Y.~P. and {Bachetti}, M. and {Bakanov}, A.~V. and
{Bamford}, S.~P. and {Barentsen}, G. and {Barmby}, P. and {Baumbach}, A. and
{Berry}, K.~L. and {Biscani}, F. and {Boquien}, M. and {Bostroem}, K.~A. and
{Bouma}, L.~G. and {Brammer}, G.~B. and {Bray}, E.~M. and {Breytenbach}, H. and
{Buddelmeijer}, H. and {Burke}, D.~J. and {Calderone}, G. and
{Cano Rodr{\'{\i}}guez}, J.~L. and {Cara}, M. and {Cardoso}, J.~V.~M. and
{Cheedella}, S. and {Copin}, Y. and {Corrales}, L. and {Crichton}, D. and
{D{\rsquo}Avella}, D. and {Deil}, C. and {Depagne}, {\'E}. and
{Dietrich}, J.~P. and {Donath}, A. and {Droettboom}, M. and
{Earl}, N. and {Erben}, T. and {Fabbro}, S. and {Ferreira}, L.~A. and
{Finethy}, T. and {Fox}, R.~T. and {Garrison}, L.~H. and {Gibbons}, S.~L.~J. and
{Goldstein}, D.~A. and {Gommers}, R. and {Greco}, J.~P. and
{Greenfield}, P. and {Groener}, A.~M. and {Grollier}, F. and
{Hagen}, A. and {Hirst}, P. and {Homeier}, D. and {Horton}, A.~J. and
{Hosseinzadeh}, G. and {Hu}, L. and {Hunkeler}, J.~S. and {Ivezi{\'c}}, {\v Z}. and
{Jain}, A. and {Jenness}, T. and {Kanarek}, G. and {Kendrew}, S. and
{Kern}, N.~S. and {Kerzendorf}, W.~E. and {Khvalko}, A. and
{King}, J. and {Kirkby}, D. and {Kulkarni}, A.~M. and {Kumar}, A. and
{Lee}, A. and {Lenz}, D. and {Littlefair}, S.~P. and {Ma}, Z. and
{Macleod}, D.~M. and {Mastropietro}, M. and {McCully}, C. and
{Montagnac}, S. and {Morris}, B.~M. and {Mueller}, M. and {Mumford}, S.~J. and
{Muna}, D. and {Murphy}, N.~A. and {Nelson}, S. and {Nguyen}, G.~H. and
{Ninan}, J.~P. and {N{\"o}the}, M. and {Ogaz}, S. and {Oh}, S. and
{Parejko}, J.~K. and {Parley}, N. and {Pascual}, S. and {Patil}, R. and
{Patil}, A.~A. and {Plunkett}, A.~L. and {Prochaska}, J.~X. and
{Rastogi}, T. and {Reddy Janga}, V. and {Sabater}, J. and {Sakurikar}, P. and
{Seifert}, M. and {Sherbert}, L.~E. and {Sherwood-Taylor}, H. and
{Shih}, A.~Y. and {Sick}, J. and {Silbiger}, M.~T. and {Singanamalla}, S. and
{Singer}, L.~P. and {Sladen}, P.~H. and {Sooley}, K.~A. and
{Sornarajah}, S. and {Streicher}, O. and {Teuben}, P. and {Thomas}, S.~W. and
{Tremblay}, G.~R. and {Turner}, J.~E.~H. and {Terr{\'o}n}, V. and
{van Kerkwijk}, M.~H. and {de la Vega}, A. and {Watkins}, L.~L. and
{Weaver}, B.~A. and {Whitmore}, J.~B. and {Woillez}, J. and
author = {{The Astropy Collaboration} and {Price-Whelan}, A.~M. and {Sip{\H o}cz}, B.~M. and
{G{\"u}nther}, H.~M. and {Lim}, P.~L. and {Crawford}, S.~M. and
{Conseil}, S. and {Shupe}, D.~L. and {Craig}, M.~W. and {Dencheva}, N. and
{Ginsburg}, A. and {VanderPlas}, J.~T. and {Bradley}, L.~D. and
{P{\'e}rez-Su{\'a}rez}, D. and {de Val-Borro}, M. and {Paper Contributors}, (. and
{Aldcroft}, T.~L. and {Cruz}, K.~L. and {Robitaille}, T.~P. and
{Tollerud}, E.~J. and {Coordination Committee}, (. and {Ardelean}, C. and
{Babej}, T. and {Bach}, Y.~P. and {Bachetti}, M. and {Bakanov}, A.~V. and
{Bamford}, S.~P. and {Barentsen}, G. and {Barmby}, P. and {Baumbach}, A. and
{Berry}, K.~L. and {Biscani}, F. and {Boquien}, M. and {Bostroem}, K.~A. and
{Bouma}, L.~G. and {Brammer}, G.~B. and {Bray}, E.~M. and {Breytenbach}, H. and
{Buddelmeijer}, H. and {Burke}, D.~J. and {Calderone}, G. and
{Cano Rodr{\'{\i}}guez}, J.~L. and {Cara}, M. and {Cardoso}, J.~V.~M. and
{Cheedella}, S. and {Copin}, Y. and {Corrales}, L. and {Crichton}, D. and
{D{\rsquo}Avella}, D. and {Deil}, C. and {Depagne}, {\'E}. and
{Dietrich}, J.~P. and {Donath}, A. and {Droettboom}, M. and
{Earl}, N. and {Erben}, T. and {Fabbro}, S. and {Ferreira}, L.~A. and
{Finethy}, T. and {Fox}, R.~T. and {Garrison}, L.~H. and {Gibbons}, S.~L.~J. and
{Goldstein}, D.~A. and {Gommers}, R. and {Greco}, J.~P. and
{Greenfield}, P. and {Groener}, A.~M. and {Grollier}, F. and
{Hagen}, A. and {Hirst}, P. and {Homeier}, D. and {Horton}, A.~J. and
{Hosseinzadeh}, G. and {Hu}, L. and {Hunkeler}, J.~S. and {Ivezi{\'c}}, {\v Z}. and
{Jain}, A. and {Jenness}, T. and {Kanarek}, G. and {Kendrew}, S. and
{Kern}, N.~S. and {Kerzendorf}, W.~E. and {Khvalko}, A. and
{King}, J. and {Kirkby}, D. and {Kulkarni}, A.~M. and {Kumar}, A. and
{Lee}, A. and {Lenz}, D. and {Littlefair}, S.~P. and {Ma}, Z. and
{Macleod}, D.~M. and {Mastropietro}, M. and {McCully}, C. and
{Montagnac}, S. and {Morris}, B.~M. and {Mueller}, M. and {Mumford}, S.~J. and
{Muna}, D. and {Murphy}, N.~A. and {Nelson}, S. and {Nguyen}, G.~H. and
{Ninan}, J.~P. and {N{\"o}the}, M. and {Ogaz}, S. and {Oh}, S. and
{Parejko}, J.~K. and {Parley}, N. and {Pascual}, S. and {Patil}, R. and
{Patil}, A.~A. and {Plunkett}, A.~L. and {Prochaska}, J.~X. and
{Rastogi}, T. and {Reddy Janga}, V. and {Sabater}, J. and {Sakurikar}, P. and
{Seifert}, M. and {Sherbert}, L.~E. and {Sherwood-Taylor}, H. and
{Shih}, A.~Y. and {Sick}, J. and {Silbiger}, M.~T. and {Singanamalla}, S. and
{Singer}, L.~P. and {Sladen}, P.~H. and {Sooley}, K.~A. and
{Sornarajah}, S. and {Streicher}, O. and {Teuben}, P. and {Thomas}, S.~W. and
{Tremblay}, G.~R. and {Turner}, J.~E.~H. and {Terr{\'o}n}, V. and
{van Kerkwijk}, M.~H. and {de la Vega}, A. and {Watkins}, L.~L. and
{Weaver}, B.~A. and {Whitmore}, J.~B. and {Woillez}, J. and
{Zabalza}, V. and {Contributors}, (.},
title = "{The Astropy Project: Building an Open-science Project and Status of the v2.0 Core Package}",
journal = {\aj},
Expand Down
1 change: 0 additions & 1 deletion astropy/io/fits/tests/cfitsio_verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,3 @@ int main(int argc, char *argv[])
}
}
}

1 change: 0 additions & 1 deletion astropy/wcs/src/unit_list_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,4 +385,3 @@ _setup_unit_list_proxy_type(

return 0;
}

2 changes: 1 addition & 1 deletion docs/coordinates/common_errors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ as follows::
>>> # convert to AltAz
>>> aa = cirs_topo.transform_to(AltAz(obstime=t, location=home))
>>> aa.alt # doctest: +FLOAT_CMP
<Latitude 90. deg>
<Latitude 90. deg>
6 changes: 3 additions & 3 deletions docs/cosmology/dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ the definition of :class:`~astropy.cosmology.FLRW`.
m_nu = Parameter(doc="Mass of neutrino species",
unit="eV", equivalencies=u.mass_energy(), fmt="")
Ob0 = Parameter(doc="Omega baryon; baryonic matter density/critical density at z=0")
def __init__(self, H0, Om0, Ode0, Tcmb0=0.0*u.K, Neff=3.04, m_nu=0.0*u.eV,
Ob0=None, *, name=None, meta=None):
cls = self.__class__
Expand All @@ -120,7 +120,7 @@ the definition of :class:`~astropy.cosmology.FLRW`.
First note that all the parameters are also arguments in ``__init__``. This is
not strictly necessary, but is good practice. If the parameter has units (and
related equivalencies) these must be specified on the Parameter, as seen in
related equivalencies) these must be specified on the Parameter, as seen in
:attr:`~astropy.cosmology.FLRW.H0` and :attr:`~astropy.cosmology.FLRW.m_nu`.

The next important thing to note is how the parameter value is set, in
Expand Down Expand Up @@ -184,7 +184,7 @@ this, the key thing is to explicitly set the instance variables
constructor for the subclass, where the latter are all the arguments except
``z`` to ``_inv_efunc_scalar``. The provided classes do use this optimization,
and in fact go even further and provide optimizations for no radiation, and for
radiation with massless neutrinos coded in cython. Consult the
radiation with massless neutrinos coded in cython. Consult the
:class:`~astropy.cosmology.FLRW` subclasses for details, and
``scalar_inv_efuncs`` for the details.

Expand Down
12 changes: 6 additions & 6 deletions docs/cosmology/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ signature.
>>> cosmo = FlatLambdaCDM.read('<file name>')
>>> cosmo == Planck18
True

Reading and writing :class:`~astropy.cosmology.Cosmology` objects go through
intermediate representations, often a dict or `~astropy.table.QTable` instance.
These intermediate representations are accessible through the methods
Expand Down Expand Up @@ -154,7 +154,7 @@ treatment are in ``Cosmology.from_format.help("mapping")``.
>>> import copy
>>> from astropy.cosmology import Cosmology
>>> def from_table_row(row, *, move_to_meta=False, cosmology=None):
... # get name from column
... name = row['name'] if 'name' in row.columns else None
Expand All @@ -176,7 +176,7 @@ implements `astropy.cosmology.Cosmology.to_format`).
:emphasize-lines: 4
>>> from astropy.table import QTable
>>> def to_table_row(cosmology, *args):
... p = cosmology.to_format("mapping")
... p["cosmology"] = p["cosmology"].__qualname__ # as string
Expand Down Expand Up @@ -215,8 +215,8 @@ Now the registered functions can be used in
>>> row = Planck18.to_format("row")
>>> row
<Row index=0>
cosmology name H0 Om0 Tcmb0 Neff m_nu [3] Ob0
km / (Mpc s) K eV
cosmology name H0 Om0 Tcmb0 Neff m_nu [3] Ob0
km / (Mpc s) K eV
str13 str8 float64 float64 float64 float64 float64 float64
------------- -------- ------------ ------- ------- ------- ----------- -------
FlatLambdaCDM Planck18 67.66 0.30966 2.7255 3.046 0.0 .. 0.06 0.04897
Expand Down Expand Up @@ -332,7 +332,7 @@ register everything into `astropy.io.registry`.
>>> io_registry.register_reader("json", Cosmology, read_json)
>>> io_registry.register_writer("json", Cosmology, write_json)
>>> io_registry.register_identifier("json", Cosmology, json_identify)
Now the registered functions can be used in
:meth:`astropy.cosmology.Cosmology.read` and
:meth:`astropy.cosmology.Cosmology.write`.
Expand Down
1 change: 0 additions & 1 deletion docs/development/workflow/this_project.inc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.. _`Astropy GitHub`: https://github.com/astropy/astropy

62 changes: 31 additions & 31 deletions docs/io/ascii/write.rst
Original file line number Diff line number Diff line change
Expand Up @@ -338,20 +338,20 @@ After execution, the contents of ``coords_cols.dat`` will be::
--------------------------------------------------------------------------------
Bytes Format Units Label Explanations
--------------------------------------------------------------------------------
1- 11 A11 --- Name Description of Name
13- 23 E11.6 keV Temperature [0.0/0.01] Description of Temperature
25- 30 F6.4 10+22 nH [0.01/0.03] Description of nH
32- 36 F5.3 10+12Jy Flux ? Description of Flux
1- 11 A11 --- Name Description of Name
13- 23 E11.6 keV Temperature [0.0/0.01] Description of Temperature
25- 30 F6.4 10+22 nH [0.01/0.03] Description of nH
32- 36 F5.3 10+12Jy Flux ? Description of Flux
38- 42 E5.1 mag magnitude [0.0/3981.08] Description of magnitude
44- 49 F6.1 --- Obs [2019.0/2019.0] Time of Observation
51- 53 I3 s Cadence [100] Description of Cadence
55- 58 F4.1 h RAh Right Ascension (hour)
60- 63 F4.1 min RAm Right Ascension (minute)
65- 79 F15.12 s RAs Right Ascension (second)
81 A1 --- DE- Sign of Declination
82- 85 F5.1 deg DEd Declination (degree)
87- 90 F4.1 arcmin DEm Declination (arcmin)
92-106 F15.12 arcsec DEs Declination (arcsec)
44- 49 F6.1 --- Obs [2019.0/2019.0] Time of Observation
51- 53 I3 s Cadence [100] Description of Cadence
55- 58 F4.1 h RAh Right Ascension (hour)
60- 63 F4.1 min RAm Right Ascension (minute)
65- 79 F15.12 s RAs Right Ascension (second)
81 A1 --- DE- Sign of Declination
82- 85 F5.1 deg DEd Declination (degree)
87- 90 F4.1 arcmin DEm Declination (arcmin)
92-106 F15.12 arcsec DEs Declination (arcsec)
--------------------------------------------------------------------------------
Notes:
--------------------------------------------------------------------------------
Expand All @@ -368,15 +368,15 @@ And the file ``ecliptic_cols.dat`` will look like::
--------------------------------------------------------------------------------
Bytes Format Units Label Explanations
--------------------------------------------------------------------------------
1- 11 A11 --- Name Description of Name
13- 23 E11.6 keV Temperature [0.0/0.01] Description of Temperature
25- 30 F6.4 10+22 nH [0.01/0.03] Description of nH
32- 36 F5.3 10+12Jy Flux ? Description of Flux
38- 42 E5.1 mag magnitude [0.0/3981.08] Description of magnitude
44- 49 F6.1 --- Obs [2019.0/2019.0] Time of Observation
51- 53 I3 s Cadence [100] Description of Cadence
1- 11 A11 --- Name Description of Name
13- 23 E11.6 keV Temperature [0.0/0.01] Description of Temperature
25- 30 F6.4 10+22 nH [0.01/0.03] Description of nH
32- 36 F5.3 10+12Jy Flux ? Description of Flux
38- 42 E5.1 mag magnitude [0.0/3981.08] Description of magnitude
44- 49 F6.1 --- Obs [2019.0/2019.0] Time of Observation
51- 53 I3 s Cadence [100] Description of Cadence
55- 70 F16.12 deg ELON Ecliptic Longitude (geocentrictrueecliptic)
72- 87 F16.12 deg ELAT Ecliptic Latitude (geocentrictrueecliptic)
72- 87 F16.12 deg ELAT Ecliptic Latitude (geocentrictrueecliptic)
--------------------------------------------------------------------------------
Notes:
--------------------------------------------------------------------------------
Expand All @@ -399,7 +399,7 @@ The following example shows a similar situation, using the option to send the ou
>>> # re-order so that related columns are placed next to eachother.
>>> outtab = outtab['Name', 'Obs', 'coord', 'Cadence', 'nH', 'magnitude',
... 'Temperature', 'Flux', 'e_Flux'] # doctest: +REMOTE_DATA

>>> ascii.write(outtab, format='cds') # doctest: +REMOTE_DATA
Title:
Authors:
Expand All @@ -409,16 +409,16 @@ The following example shows a similar situation, using the option to send the ou
--------------------------------------------------------------------------------
Bytes Format Units Label Explanations
--------------------------------------------------------------------------------
1- 11 A11 --- Name Description of Name
13- 18 F6.1 --- Obs [2019.0/2019.0] Time of Observation
20- 22 I3 s Cadence [100] Description of Cadence
24- 29 F6.4 10+22 nH [0.01/0.03] Description of nH
31- 35 E5.1 mag magnitude [0.0/3981.08] Description of magnitude
37- 47 E11.6 keV Temperature [0.0/0.01] Description of Temperature
49- 53 F5.3 10+12Jy Flux ? Description of Flux
55- 61 F7.1 Jy e_Flux [450.0/10000.0] Description of e_Flux
1- 11 A11 --- Name Description of Name
13- 18 F6.1 --- Obs [2019.0/2019.0] Time of Observation
20- 22 I3 s Cadence [100] Description of Cadence
24- 29 F6.4 10+22 nH [0.01/0.03] Description of nH
31- 35 E5.1 mag magnitude [0.0/3981.08] Description of magnitude
37- 47 E11.6 keV Temperature [0.0/0.01] Description of Temperature
49- 53 F5.3 10+12Jy Flux ? Description of Flux
55- 61 F7.1 Jy e_Flux [450.0/10000.0] Description of e_Flux
63- 78 F16.12 deg ELON Ecliptic Longitude (geocentrictrueecliptic)
80- 95 F16.12 deg ELAT Ecliptic Latitude (geocentrictrueecliptic)
80- 95 F16.12 deg ELAT Ecliptic Latitude (geocentrictrueecliptic)
--------------------------------------------------------------------------------
Notes:
--------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/lts_policy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ will only cover:
backports done by the original author, users, or institutions who are on LTS
and need the fix.
* New "features" that are absolutely necessary to accomplish the above.
* Other critical additions absolutely necessary for users stuck to the LTS.
* Other critical additions absolutely necessary for users stuck to the LTS.
In this case, the users themselves (e.g., developers from affected institutions)
would perform the needed backports or implementation.

Expand Down
2 changes: 1 addition & 1 deletion docs/modeling/parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ the standard `Numpy broadcasting rules`_.
Parameter constraints
=====================

`astropy.modeling` supports several types of parameter constraints. They are implemented
`astropy.modeling` supports several types of parameter constraints. They are implemented
as properties of `~astropy.modeling.Parameter`, the class which defines all fittable
parameters, and can be set on individual parameters or on model instances.

Expand Down
6 changes: 2 additions & 4 deletions docs/modeling/polynomial_models.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. include:: links.inc

.. _polynomial_models:

*****************
Expand Down Expand Up @@ -78,6 +78,4 @@ confusion in meaning.
- :class:`~astropy.modeling.polynomial.Hermite2D`

- :class:`~astropy.modeling.polynomial.SIP` model implements the
Simple Imaging Polynomial (`SIP`_) convention


Simple Imaging Polynomial (`SIP`_) convention
2 changes: 1 addition & 1 deletion docs/table/indexing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ indices while column slices will not::
--- ----
2 0
4 1>>]

.. EXAMPLE END
.. EXAMPLE START: Table Indexing with the "discard_on_copy" Index Mode
Expand Down
2 changes: 1 addition & 1 deletion docs/timeseries/initializing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ Adding Data to the Time Series

The above examples show how to initialize |TimeSeries| objects, but these do not
include any data aside from the times. There are different ways of adding data,
as with the |Table| class.
as with the |Table| class.

Passing Data During Initialization
----------------------------------
Expand Down
1 change: 0 additions & 1 deletion docs/visualization/rgb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,3 @@ of the galaxies show up. Compare with Fig. 1 of `Lupton et al. (2004)`_ or the


.. _SDSS Skyserver image: http://skyserver.sdss.org/dr13/en/tools/chart/navi.aspx?ra=313.12381&dec=-5.74611

2 changes: 1 addition & 1 deletion docs/visualization/wcsaxes/overlays.rst
Original file line number Diff line number Diff line change
Expand Up @@ -345,4 +345,4 @@ and a |Quantity| as the radius:
edgecolor='white', facecolor='none',
transform=ax.get_transform('fk5'))

ax.add_patch(s)
ax.add_patch(s)
2 changes: 1 addition & 1 deletion docs/wcs/example_create_imaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ saves those settings to a new FITS header.
normalized in a number of ways that make performing the WCS
transformation easier. Therefore, they can not be relied upon to
get the original values in the header. To build up a FITS header
directly and specifically, use `astropy.io.fits.Header` directly.
directly and specifically, use `astropy.io.fits.Header` directly.
Loading

0 comments on commit 2a7b970

Please sign in to comment.