/usr/share/doc/csvkit/html/contributing.html is in csvkit-doc 1.0.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | <!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contributing to csvkit — csvkit 1.0.2 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="csvkit 1.0.2 documentation" href="index.html"/>
<link rel="next" title="Release process" href="release.html"/>
<link rel="prev" title="Tips and Troubleshooting" href="tricks.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> csvkit
</a>
<div class="version">
1.0.2
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="cli.html">Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="tricks.html">Tips and Troubleshooting</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Contributing to csvkit</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#getting-started">Getting Started</a></li>
<li class="toctree-l2"><a class="reference internal" href="#principles-of-development">Principles of development</a></li>
<li class="toctree-l2"><a class="reference internal" href="#how-to-contribute">How to contribute</a></li>
<li class="toctree-l2"><a class="reference internal" href="#a-note-on-new-tools">A note on new tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="#streaming-versus-buffering">Streaming versus buffering</a></li>
<li class="toctree-l2"><a class="reference internal" href="#legalese">Legalese</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="release.html">Release process</a></li>
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">csvkit</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>Contributing to csvkit</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/contributing.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="contributing-to-csvkit">
<h1>Contributing to csvkit<a class="headerlink" href="#contributing-to-csvkit" title="Permalink to this headline">¶</a></h1>
<p>csvkit actively encourages contributions from people of all genders, races, ethnicities, ages, creeds, nationalities, persuasions, alignments, sizes, shapes, and journalistic affiliations. You are welcome here.</p>
<p>We seek contributions from developers and non-developers of all skill levels. We will typically accept bug fixes and documentation updates with minimal fuss. If you want to work on a larger feature—great! The maintainers will be happy to provide feedback and code review on your implementation.</p>
<p>Before making any changes or additions to csvkit, please be sure to read the rest of this document, especially the “Principles of development” section.</p>
<div class="section" id="getting-started">
<h2>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline">¶</a></h2>
<p>Set up your environment for development:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">git</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">wireservice</span><span class="o">/</span><span class="n">csvkit</span><span class="o">.</span><span class="n">git</span>
<span class="n">cd</span> <span class="n">csvkit</span>
<span class="n">mkvirtualenv</span> <span class="n">csvkit</span>
<span class="c1"># If running Python 2:</span>
<span class="n">pip</span> <span class="n">install</span> <span class="o">-</span><span class="n">r</span> <span class="n">requirements</span><span class="o">-</span><span class="n">py2</span><span class="o">.</span><span class="n">txt</span>
<span class="c1"># If running Python 3:</span>
<span class="n">pip</span> <span class="n">install</span> <span class="o">-</span><span class="n">r</span> <span class="n">requirements</span><span class="o">-</span><span class="n">py3</span><span class="o">.</span><span class="n">txt</span>
<span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">develop</span>
<span class="n">tox</span>
</pre></div>
</div>
</div>
<div class="section" id="principles-of-development">
<h2>Principles of development<a class="headerlink" href="#principles-of-development" title="Permalink to this headline">¶</a></h2>
<p>csvkit is to tables as Unix text processing commands (cut, grep, cat, sort) are to text. As such, csvkit adheres to <a class="reference external" href="http://en.wikipedia.org/wiki/Unix_philosophy">the Unix philosophy</a>.</p>
<ol class="arabic simple">
<li>Small is beautiful.</li>
<li>Make each program do one thing well.</li>
<li>Build a prototype as soon as possible.</li>
<li>Choose portability over efficiency.</li>
<li>Store data in flat text files.</li>
<li>Use software leverage to your advantage.</li>
<li>Use shell scripts to increase leverage and portability.</li>
<li>Avoid captive user interfaces.</li>
<li>Make every program a filter.</li>
</ol>
<p>As there is no single, standard CSV format, csvkit encourages popular formatting options:</p>
<ul class="simple">
<li>Output targets broad compatibility: Quoting is done with double-quotes and only when required. Fields are delimited with commas. Rows are terminated with Unix line endings (“\n”).</li>
<li>Output favors consistency over brevity: Numbers always include at least one decimal place, even if they are round. Dates and times are output in ISO 8601 format. Null values are rendered as empty strings.</li>
</ul>
</div>
<div class="section" id="how-to-contribute">
<h2>How to contribute<a class="headerlink" href="#how-to-contribute" title="Permalink to this headline">¶</a></h2>
<ol class="arabic simple">
<li>Fork the project on <a class="reference external" href="https://github.com/wireservice/csvkit">GitHub</a>.</li>
<li>Look through the <a class="reference external" href="https://github.com/wireservice/csvkit/issues">open issues</a> for a task that you can realistically expect to complete in a few days. Don’t worry about the issue’s priority; instead, choose something you’ll enjoy. You’re more likely to finish something if you enjoy hacking on it.</li>
<li>Comment on the issue to let people know you’re going to work on it so that no one duplicates your effort. It’s good practice to provide a general idea of how you plan to resolve the issue so that others can make suggestions.</li>
<li>Write tests for any changes to the code’s behavior. Follow the format of the tests in the <code class="docutils literal"><span class="pre">tests/</span></code> directory to see how this works. You can run all the tests with the command <code class="docutils literal"><span class="pre">tox</span></code>, or just your Python version’s with <code class="docutils literal"><span class="pre">nosetests</span></code> (faster).</li>
<li>Write the code. Try to be consistent with the style and organization of the existing code. A good contribution won’t be refused for stylistic reasons, but large parts of it may be rewritten and nobody wants that.</li>
<li>As you’re working, periodically merge in changes from the upstream master branch to avoid having to resolve large merge conflicts. Check that you haven’t broken anything by running the tests.</li>
<li>Write documentation for any user-facing features.</li>
<li>Once it works, is tested, and is documented, submit a pull request on GitHub.</li>
<li>Wait for it to be merged or for a comment about what needs to be changed.</li>
<li>Rejoice.</li>
</ol>
</div>
<div class="section" id="a-note-on-new-tools">
<h2>A note on new tools<a class="headerlink" href="#a-note-on-new-tools" title="Permalink to this headline">¶</a></h2>
<p>As a general rule, csvkit is no longer adding new tools. This is the result of limited maintenance time as well as a desire to keep the toolkit focused on the most common use cases. Exceptions may be made to this rule on a case-by-case basis. We, of course, welcome patches to improve existing tools or add useful features.</p>
<p>If you decide to build your own tool, we encourage you to create and maintain it as a separate Python package. You will probably want to use the <a class="reference external" href="http://agate.readthedocs.io/">agate</a> library, which csvkit uses for most of its CSV reading and writing. Doing so will safe time and make it easier to maintain common behavior with csvkit’s core tools.</p>
</div>
<div class="section" id="streaming-versus-buffering">
<h2>Streaming versus buffering<a class="headerlink" href="#streaming-versus-buffering" title="Permalink to this headline">¶</a></h2>
<p>csvkit tools operate in one of two fashions: Some, such as <a class="reference internal" href="scripts/csvsort.html"><span class="doc">csvsort</span></a>, buffer their entire input into memory before writing any output. Other tools—those that can operate on individual records—write write a row immediately after reading a row. Records are “streamed” through the tool. Streaming tools produce output faster and require less memory than buffering tools.</p>
<p>For performance reasons tools should always offer streaming when possible. If a new feature would undermine streaming functionality it must be balanced against the utility of having a tool that can efficiently operate over large datasets.</p>
<p>Currently, the following tools stream:</p>
<ul class="simple">
<li><a class="reference internal" href="scripts/csvclean.html"><span class="doc">csvclean</span></a></li>
<li><a class="reference internal" href="scripts/csvcut.html"><span class="doc">csvcut</span></a></li>
<li><a class="reference internal" href="scripts/csvformat.html"><span class="doc">csvformat</span></a></li>
<li><a class="reference internal" href="scripts/csvgrep.html"><span class="doc">csvgrep</span></a></li>
<li><a class="reference internal" href="scripts/csvstack.html"><span class="doc">csvstack</span></a></li>
<li><a class="reference internal" href="scripts/sql2csv.html"><span class="doc">sql2csv</span></a></li>
</ul>
<p>Currently, the following tools buffer:</p>
<ul class="simple">
<li><a class="reference internal" href="scripts/csvjoin.html"><span class="doc">csvjoin</span></a></li>
<li><a class="reference internal" href="scripts/csvjson.html"><span class="doc">csvjson</span></a> unless <code class="docutils literal"><span class="pre">--stream</span></code> and <code class="docutils literal"><span class="pre">--no-inference</span></code> are set but <code class="docutils literal"><span class="pre">--skip-lines</span></code> is not</li>
<li><a class="reference internal" href="scripts/csvlook.html"><span class="doc">csvlook</span></a></li>
<li><a class="reference internal" href="scripts/csvpy.html"><span class="doc">csvpy</span></a></li>
<li><a class="reference internal" href="scripts/csvsort.html"><span class="doc">csvsort</span></a></li>
<li><a class="reference internal" href="scripts/csvsql.html"><span class="doc">csvsql</span></a></li>
<li><a class="reference internal" href="scripts/csvstat.html"><span class="doc">csvstat</span></a></li>
<li><a class="reference internal" href="scripts/in2csv.html"><span class="doc">in2csv</span></a> unless <code class="docutils literal"><span class="pre">--format</span></code> is <code class="docutils literal"><span class="pre">ndjson</span></code> and <code class="docutils literal"><span class="pre">--no-inference</span></code> is set, or <code class="docutils literal"><span class="pre">--format</span></code> is <code class="docutils literal"><span class="pre">csv</span></code> and <code class="docutils literal"><span class="pre">--no-inference</span></code> is set but <code class="docutils literal"><span class="pre">--skip-lines</span></code> is not</li>
</ul>
</div>
<div class="section" id="legalese">
<h2>Legalese<a class="headerlink" href="#legalese" title="Permalink to this headline">¶</a></h2>
<p>To the extent that contributors care, they should keep the following legal mumbo-jumbo in mind:</p>
<p>The source of csvkit and therefore of any contributions are licensed under the permissive <a class="reference external" href="http://www.opensource.org/licenses/mit-license.php">MIT license</a>. By submitting a patch or pull request you are agreeing to release your contribution under this license. You will be acknowledged in the AUTHORS file. As the owner of your specific contributions you retain the right to privately relicense your specific contributions (and no others), however, the released version of the code can never be retracted or relicensed.</p>
</div>
</div>
</div>
<div class="articleComments">
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="release.html" class="btn btn-neutral float-right" title="Release process" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="tricks.html" class="btn btn-neutral" title="Tips and Troubleshooting" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2018, Christopher Groskopf.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.0.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
|