Permalink
Commits on Oct 4, 2018
  1. Link to "The interesting ideas in Datasette"

    simonw committed Oct 4, 2018
Commits on Sep 19, 2018
  1. Travis applies :latest tag to Docker release, refs #329

    simonw committed Sep 19, 2018
  2. Releasing Datasette 0.25

    simonw committed Sep 19, 2018
  3. Fix small doc typo - thanks @jaywgraves (#365)

    jaywgraves authored and simonw committed Sep 19, 2018
Commits on Aug 28, 2018
  1. Fix json.loads in Python 3.5

    simonw committed Aug 28, 2018
  2. Better docs for publish_subcommand() plugin hook

    simonw committed Aug 28, 2018
  3. extra_css_urls(template, database, table, datasette)

    simonw committed Aug 28, 2018
    The extra_css_urls and extra_js_urls hooks now take additional optional
    parameters.
    
    Also refactored them out of the Datasette class and into RenderMixin.
    
    Plus improved plugin documentation to explicitly list parameters.
  4. render_cell(value, column, table, database, datasette)

    simonw committed Aug 28, 2018
    The render_cell plugin hook previously was only passed value.
    
    It is now passed (value, column, table, database, datasette).
  5. Added plugin_config() method

    simonw committed Aug 28, 2018
  6. New ds.metadata() method

    simonw committed Aug 13, 2018
Commits on Aug 16, 2018
  1. Import pysqlite3 if available, closes #360 (#361)

    simonw committed Aug 16, 2018
Commits on Aug 11, 2018
  1. Refactor to use new datasatte.config(key) method

    simonw committed Aug 11, 2018
Commits on Aug 8, 2018
  1. Bump versions of pytest, pluggy and beautifulsoup4 (#358)

    simonw committed Aug 8, 2018
Commits on Aug 6, 2018
  1. Hide 'view and edit SQL' if config.allow_sql turned off

    simonw committed Aug 6, 2018
  2. fts_table and fts_pk metadata configs, available for both tables and …

    simonw committed Aug 6, 2018
    …views
  3. sortable_columns also now works with views

    simonw committed Aug 6, 2018
Commits on Aug 5, 2018
  1. render_cell(value) plugin hook, closes #352

    simonw committed Aug 5, 2018
    New plugin hook for customizing the way cells values are rendered in HTML.
    
    The first full example of this hook in use is https://github.com/simonw/datasette-json-html
Commits on Jul 28, 2018
  1. Renamed variable, since docs are not written in Markdown

    simonw committed Jul 28, 2018
  2. Only run documented_views() fixture once per session

    simonw committed Jul 28, 2018
    Speeds up tests, because previously it ran once per view class.
  3. Docs for IndexView, TableView, RowView, closes #299

    simonw committed Jul 28, 2018
    Also removed xfail from test_view_classes_are_documented, so any future *View
    classes that are added without documentation will cause the tests to fail.
  4. Added labels so unit tests can detect docs, refs #299

    simonw committed Jul 28, 2018
  5. xfail documentation unit tests for view classes, refs #299

    simonw committed Jul 28, 2018
    More documentation unit tests. These ones check that every single **View class
    imported into the datasette/app.py module are covered by our documentation.
    
    Just one problem: they aren't documented yet. So I'm using the xfail pytest
    decorator to mark these tests as allowed-to-fail. When you run the test suite
    you now get a report of how many views still need to be documented, but it
    doesn't fail the tests.
    
    The output looks something like this:
    
        $ pytest tests/test_docs.py
        collected 31 items
    
        tests/test_docs.py ..........................XXXxx.                [100%]
    
        ============ 26 passed, 2 xfailed, 3 xpassed in 1.06 seconds ============
    
    Once I have documented all the views I will remove the xfail so any future
    views that are added without documentation will cause a test failure.
    
    We can detect that a view is documented by looking for ReST label in the docs,
    for example:
    
        .. _IndexView:
    
    Some view classes can be used to power multiple URLs - the JsonDataView class
    for example is used to power /-/metadata and /-/config and /-/plugins
    
    In this case, the second part of the label can indicate the variety of page, e.g:
    
        .. _JsonDataView_metadata:
    
    The test will pass as long as there is at least one label that starts with
    _JsonDataView.
Commits on Jul 26, 2018
  1. Unit tests for publish now/heroku - closes #348

    simonw committed Jul 26, 2018
  2. "datasette publish heroku" improvements

    simonw committed Jul 26, 2018
    * Fixed bug where --title= didn't work if -m not provided
    * Now using Python 3.6.6 instead of Python 3.6.3
  3. publish_subcommand hook + default plugins mechanism, used for publish…

    simonw committed Jul 26, 2018
    … heroku/now (#349)
    
    This change introduces a new plugin hook, publish_subcommand, which can be
    used to implement new subcommands for the "datasette publish" command family.
    
    I've used this new hook to refactor out the "publish now" and "publish heroku"
    implementations into separate modules. I've also added unit tests for these
    two publishers, mocking the subprocess.call and subprocess.check_output
    functions.
    
    As part of this, I introduced a mechanism for loading default plugins. These
    are defined in the new "default_plugins" list inside datasette/app.py
    
    Closes #217 (Plugin support for datasette publish)
    Closes #348 (Unit tests for "datasette publish")
    Refs #14, #59, #102, #103, #146, #236, #347
  4. Unit test confirming all plugin hooks are documented

    simonw committed Jul 26, 2018
Commits on Jul 25, 2018
  1. Fix for Python 3.5

    simonw committed Jul 25, 2018
Commits on Jul 24, 2018
  1. Removed unnecessary print statements from tests

    simonw committed Jul 24, 2018
  2. 'Usage: datasette', not 'Usage: cli' - refs #336

    simonw committed Jul 24, 2018
  3. Ensure --help examples in docs are always up to date, closes #336

    simonw committed Jul 24, 2018
    Unit tests now check that docs/*.txt help examples are all up-to-date.
    
    I ran into a problem here in that the terminal_width needed to be more
    accurately defined - so I replaced update-docs-help.sh with update-docs-
    help.py which hard-codes the terminal width.
  4. Removed docker -e flag

    simonw committed Jul 24, 2018