Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ table:
- changed-files:
- any-glob-to-any-file:
- '**/table/**/*'
- astropy/extern/jquery/**/*

time:
- changed-files:
Expand Down
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ repos:
exclude: "^(\
cextern/wcslib/C/flexed/.*|\
CHANGES.rst|\
astropy/extern/jquery/data/js/jquery.dataTables.js|\
)$"
# Prevent giant files from being committed.
- id: check-case-conflict
Expand Down
2 changes: 1 addition & 1 deletion astropy/config/tests/test_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def check_config(conf):
assert "[table]" in conf
assert "# replace_warnings = ," in conf
assert "[table.jsviewer]" in conf
assert "# css_urls = https://cdn.datatables.net/1.10.12/css/jquery.dataTables.css," in conf # fmt: skip
assert "# css_urls = https://cdn.datatables.net/2.1.8/css/dataTables.dataTables.min.css" in conf # fmt: skip
assert "[visualization.wcsaxes]" in conf
assert "## Whether to log exceptions before raising them." in conf
assert "# log_exceptions = False" in conf
Expand Down
31 changes: 3 additions & 28 deletions astropy/extern/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,6 @@ In particular, this currently includes for Python:
- PLY_: This is a parser generator providing lex/yacc-like tools in Python.
It is used for Astropy's unit parsing and angle/coordinate string parsing.

And for JavaScript:

- jQuery_: This is used currently for the browser-based table viewer feature.

- DataTables_: This is a plug-in for jQuery used also for the browser-based
table viewer.

Notes for developers
--------------------

jQuery/DataTables
^^^^^^^^^^^^^^^^^

The minified files are the ones that are used in the table viewer feature, but
the non-minified versions are also present in the ``js/`` sub-directory for
packaging reasons. These files must also be distributed, to provide the source
files from which the minified ones can be compiled. This is a requirement for
Linux distributions such as Debian and Fedora.


Notes for third-party packagers
-------------------------------

Expand All @@ -43,15 +23,11 @@ would prefer to use their system packages rather than the bundled versions.
jQuery/DataTables
^^^^^^^^^^^^^^^^^

Packagers may either use system copies of these JavaScript modules, or require
use of online versions (perhaps via URLs of cloud-hosted versions of these
modules).

It is possible to change the default urls for the remote versions of these
files by using the Astropy
`Configuration system <https://docs.astropy.org/en/stable/config/>`_. The default
configuration file (``$HOME/.astropy/config``) contains a commented section
``[table.jsviewer]`` with two items for jQuery and DataTables. It is also
``[table.jsviewer]`` with two items for jQuery_ and DataTables_. It is also
possible to display the default value and modify it by importing the
configuration module::

Expand All @@ -63,10 +39,9 @@ configuration module::
In [3]: conf.jquery_url = '...'

Third-party packagers can override the defaults for these configuration items
(by modifying the configuration objects in ``astropy/table/jsviewer.py``, or
by modifying the configuration objects in ``astropy/table/jsviewer.py``, or
provide astropy config files that include the overrides appropriate for the
packaged version. They would *also* need to set the default
``use_local_files`` option to ``False`` for these settings to be read.
packaged version.


Other
Expand Down
Empty file removed astropy/extern/jquery/__init__.py
Empty file.
Loading