Skip to content

Commit

Permalink
Merge pull request #774 from saulpw/pr-template
Browse files Browse the repository at this point in the history
[dev] move checklists to PULL_REQUEST_TEMPLATE
  • Loading branch information
saulpw authored Dec 2, 2020
2 parents 6691869 + 89ddd0b commit 1132abf
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 44 deletions.
2 changes: 2 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [ ] If contributing a core loader, [the loader checklist](https://visidata.org/docs/contributing-to-visidata#loader) was referenced.
- [ ] If registering an external plugin, [the plugin checklist](https://visidata.org/docs/contributing-to-visidata#plugins) was referenced.
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ We also need people to mention VisiData in their forums and communities that rel
Don't spam or do a drive-by promotion; these are largely ineffective and will often be received negatively.
Endorsements have more weight from people who actively post about other relevant topics; we don't want to become the "VisiData Brigade".

Finally, if you are on "Web 2.social", you can post a [tweet](https://twitter.com/visidata) or a [tutorial]() or a [demo](https://www.youtube.com/watch?v=N1CBDTgGtOU) or a [host a workshop](), or anything else you think might make people interested in exploring the wonderful world of VisiData.
Finally, if you are on "Web 2.social", you can post a [tweet](https://twitter.com/visidata) or a [tutorial]() or a [demo](https://www.youtube.com/watch?v=N1CBDTgGtOU) or [host a workshop](https://www.meetup.com/pt-BR/Journocoders/events/258035880/), or anything else you think might make people interested in exploring the wonderful world of VisiData.

## Support on Patreon

If VisiData saves you time on a regular basis, and especially if VisiData makes your paid work easier, please contribute to [my Patreon](https://www.patreon.com/saulpw).

## Start a Project Using VisiData

If you know Python and want to augment it to suit your own workflow, you can create a loader or a plugin. Here are some great examples:
If you know Python and want to augment it to suit your own workflow, you can create a loader or a plugin. In support of this, I have written [a detailed api guide for VisiData](https://www.visidata.org/docs/api/).

Here are some great examples:

- [jsvine's custom visidata plugins](https://github.com/jsvine/visidata-plugins)
- [layertwo's pcap loader](https://github.com/saulpw/visidata/blob/develop/visidata/loaders/pcap.py)
Expand Down
26 changes: 0 additions & 26 deletions dev/checklists/add-loader.md

This file was deleted.

16 changes: 0 additions & 16 deletions dev/checklists/add-plugin.md

This file was deleted.

4 changes: 4 additions & 0 deletions docs/api/loaders.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Loaders
=======

.. note::

You are welcome to submit new loaders to core VisiData, or as plugins. Please, see our `checklists for contribution <https://visidata.org/docs/contributing-to-visidata>`__.

Creating a new loader for a data source is simple and straigthforward.

1. ``open_filetype`` boilerplate
Expand Down
28 changes: 28 additions & 0 deletions docs/contributing-to-visidata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Checklists for Contributing to VIsiData

## [Submitting a Core Loader](#loader) {#loader}
A deeper explanation of all of these steps can be found [in the api documentation](https://www.visidata.org/docs/api/loaders.html).

- Create an `open_foo` function that returns the new `FooSheet`.
- Set an appropriate `rowtype` string.
- Provide a `# rowdef: ` comment. This describes the structure of a row (e.g. its base class) in a **Sheet**.
- If the loader's dependencies are not part of Python3 stdlib, note the additional dependencies in the `requirements.txt` (include a comment adjacent to the dep with the name of the loader).
- Check in a small sample dataset, in that format, to the `sample_data` folder
- Add a `load-foo.vd` to `tests/`. `load-foo.vd` should simply open the checked-in sample dataset and have a simple interaction if the source includes multiple tables.
- After replaying `vd load-foo.vd`, save the final sheet as `load-foo.tsv`. Save `load-foo.tsv` in `tests/golden/`.
- add a section on the loader to the [formats.jsonl](https://github.com/saulpw/visidata/blob/develop/dev/formats.jsonl).

## [Submitting an External Plugin](#plugins) {#plugins}

- Host a single Python file containing all of the plugin's code.
- Ensure the plugin has a `__version__`.
- In the `visidata/plugins/plugins.jsonl` file in the VisiData repo, add a row for each plugin with all of the necessary information:
- `url`: link to where the plugin file is hosted; specific commit urls are preferred over branches.
- `description`: a description of the plugin.
- `latest_ver`: the current version of the plugin.
- `latest_release`: the date the current version of the plugin was shipped.
- `maintainer`: your contact information.
- `visidata_ver`: the latest version of visidata this plugin was tested on.
- `pydeps` (optional): Space-separated list of pip-installable Python modules required for the plugin.
- `vdpugindeps` (optional): Space-separated list of vd plugin dependencies.
- `sha256`: SHA256 hash of the contents of the plugin .py file for the `latest_release`. A script for obtaining this hash can be found [here](https://raw.githubusercontent.com/saulpw/visidata/develop/dev/vdhash.py).

0 comments on commit 1132abf

Please sign in to comment.