Skip to content

Commit

Permalink
docs: Use furo theme
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Feb 22, 2023
1 parent fbbc5e8 commit 0bc82b9
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 13 deletions.
11 changes: 11 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
build:
os: ubuntu-20.04
tools:
python: "3.9"
python:
install:
- path: .
- requirements: docs/requirements.txt
sphinx:
fail_on_warning: true
2 changes: 1 addition & 1 deletion csvkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
CSV reader and writer. It can be used as a drop-in replacement for the standard
module.
.. warn::
.. warning::
Since version 1.0 csvkit relies on `agate <http://agate.rtfd.org>`_'s
CSV reader and writer. This module is supported for legacy purposes only and you
Expand Down
2 changes: 1 addition & 1 deletion docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Output and Analysis
* To diff CSVs, consider `daff <https://github.com/paulfitz/daff>`_.
* To explore CSVs interactively, consider `VisiData <https://visidata.org>`_.

Alternatives to :doc:`csvsql` are `q <https://github.com/harelba/q>`_ and `textql <https://github.com/dinedal/textql>`_.
Alternatives to :doc:`/scripts/csvsql` are `q <https://github.com/harelba/q>`_ and `textql <https://github.com/dinedal/textql>`_.

Common arguments
================
Expand Down
9 changes: 1 addition & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,7 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme = 'furo'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
3 changes: 3 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
furo
sphinx>2
docutils>=0.18
2 changes: 1 addition & 1 deletion docs/scripts/csvstack.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Stack up the rows from multiple CSV files, optionally adding a grouping value to

See also: :doc:`../common_arguments`.

.. warn::
.. warning::

If you redirect output to an input file like :code:`csvstack file.csv > file.csv`, the file will grow indefinitely.

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial/2_examining_the_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Examining the data
csvstat: statistics without code
================================

In the previous section we saw how we could use :doc:`csvlook` and :doc:`csvcut` to view slices of our data. This is a good tool for exploring a dataset, but in practice we usually need to get the broadest possible view before we can start diving into specifics.
In the previous section we saw how we could use :doc:`/scripts/csvlook` and :doc:`/scripts/csvcut` to view slices of our data. This is a good tool for exploring a dataset, but in practice we usually need to get the broadest possible view before we can start diving into specifics.

:doc:`/scripts/csvstat` is designed to give us just such a broad understanding of our data. Inspired by the ``summary()`` function from the computational statistics programming language `"R" <https://www.r-project.org/>`_, :doc:`/scripts/csvstat` will generate summary statistics for all the data in a CSV file.

Expand Down Expand Up @@ -59,7 +59,7 @@ Let's examine summary statistics for a few columns from our dataset. As we learn
Row count: 1036
:doc:`csvstat` infers the type of data in each column and then performs basic statistics on it. The particular statistics computed depend on the type of the column (numbers, text, dates, etc).
:doc:`/scripts/csvstat` infers the type of data in each column and then performs basic statistics on it. The particular statistics computed depend on the type of the column (numbers, text, dates, etc).

In this example the first column, ``county`` was identified as type ``Text``. We see that there are ``35`` counties represented in the dataset and that ``DOUGLAS`` is far and away the most frequently occurring. A quick Google search shows that there are ``93`` counties in Nebraska, so we know that either not every county received equipment or that the data is incomplete. We can also find out that Douglas county contains Omaha, the state's largest city by far.

Expand Down

0 comments on commit 0bc82b9

Please sign in to comment.