This repository was archived by the owner on Aug 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +92
-10
lines changed
feature/git/dffml_feature_git/feature Expand file tree Collapse file tree 6 files changed +92
-10
lines changed Original file line number Diff line number Diff line change 11High Level
22==========
33
4- .. automodule :: dffml.high_level
5- :members:
6- :undoc-members:
4+ Example usage can be found in the :doc: `/quickstart/model `.
5+
6+ .. autofunction :: dffml.high_level.train
7+
8+ .. autofunction :: dffml.high_level.accuracy
9+
10+ .. autofunction :: dffml.high_level.predict
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ branch can be found `here <master/index.html>`_.
4141 :caption: Introduction
4242
4343 about
44- model
4544 installation
4645
4746.. toctree ::
Original file line number Diff line number Diff line change @@ -404,7 +404,26 @@ lines_of_code_by_language
404404
405405*Core *
406406
407- No description
407+ This operation relys on ``tokei ``. Here's how to install version 10.1.1,
408+ check it's releases page to make sure you're installing the latest version.
409+
410+ On Linux
411+
412+ .. code-block :: console
413+
414+ $ curl -sSL 'https://github.com/XAMPPRocky/tokei/releases/download/v10.1.1/tokei-v10.1.1-x86_64-apple-darwin.tar.gz' \
415+ | tar -xvz && \
416+ echo '22699e16e71f07ff805805d26ee86ecb9b1052d7879350f7eb9ed87beb0e6b84fbb512963d01b75cec8e80532e4ea29a tokei' | sha384sum -c - && \
417+ sudo mv tokei /usr/local/bin/
418+
419+ On OSX
420+
421+ .. code-block :: console
422+
423+ $ curl -sSL 'https://github.com/XAMPPRocky/tokei/releases/download/v10.1.1/tokei-v10.1.1-x86_64-apple-darwin.tar.gz' \
424+ | tar -xvz && \
425+ echo '8c8a1d8d8dd4d8bef93dabf5d2f6e27023777f8553393e269765d7ece85e68837cba4374a2615d83f071dfae22ba40e2 tokei' | sha384sum -c - && \
426+ sudo mv tokei /usr/local/bin/
408427
409428 **Stage: processing **
410429
Original file line number Diff line number Diff line change @@ -189,10 +189,26 @@ We'll be using those operations, so we need to install them
189189 The ``lines_of_code_to_comments `` operation will give use the ratio of the
190190number of lines of comments to the number of lines of code.
191191
192- .. note ::
192+ You need to install `tokei <https://github.com/XAMPPRocky/tokei >`_ before you
193+ can use ``lines_of_code_to_comments ``.
193194
194- You need to install `tokei <https://github.com/XAMPPRocky/tokei >`_ before
195- you can use ``lines_of_code_to_comments ``.
195+ On Linux
196+
197+ .. code-block :: console
198+
199+ $ curl -sSL 'https://github.com/XAMPPRocky/tokei/releases/download/v10.1.1/tokei-v10.1.1-x86_64-apple-darwin.tar.gz' \
200+ | tar -xvz && \
201+ echo '22699e16e71f07ff805805d26ee86ecb9b1052d7879350f7eb9ed87beb0e6b84fbb512963d01b75cec8e80532e4ea29a tokei' | sha384sum -c - && \
202+ sudo mv tokei /usr/local/bin/
203+
204+ On OSX
205+
206+ .. code-block :: console
207+
208+ $ curl -sSL 'https://github.com/XAMPPRocky/tokei/releases/download/v10.1.1/tokei-v10.1.1-x86_64-apple-darwin.tar.gz' \
209+ | tar -xvz && \
210+ echo '8c8a1d8d8dd4d8bef93dabf5d2f6e27023777f8553393e269765d7ece85e68837cba4374a2615d83f071dfae22ba40e2 tokei' | sha384sum -c - && \
211+ sudo mv tokei /usr/local/bin/
196212
197213 The ``lines_of_code_to_comments `` operation needs the output given by
198214``lines_of_code_by_language ``, which needs a Git repos source code.
Original file line number Diff line number Diff line change @@ -144,6 +144,27 @@ since that creates more user friendly configs than ``json``.
144144
145145 $ pip install -U dffml-feature-git dffml-config-yaml
146146
147+ The git operations / features rely on ``tokei ``. We need to download and install
148+ it first.
149+
150+ On Linux
151+
152+ .. code-block :: console
153+
154+ $ curl -sSL 'https://github.com/XAMPPRocky/tokei/releases/download/v10.1.1/tokei-v10.1.1-x86_64-apple-darwin.tar.gz' \
155+ | tar -xvz && \
156+ echo '22699e16e71f07ff805805d26ee86ecb9b1052d7879350f7eb9ed87beb0e6b84fbb512963d01b75cec8e80532e4ea29a tokei' | sha384sum -c - && \
157+ sudo mv tokei /usr/local/bin/
158+
159+ On OSX
160+
161+ .. code-block :: console
162+
163+ $ curl -sSL 'https://github.com/XAMPPRocky/tokei/releases/download/v10.1.1/tokei-v10.1.1-x86_64-apple-darwin.tar.gz' \
164+ | tar -xvz && \
165+ echo '8c8a1d8d8dd4d8bef93dabf5d2f6e27023777f8553393e269765d7ece85e68837cba4374a2615d83f071dfae22ba40e2 tokei' | sha384sum -c - && \
166+ sudo mv tokei /usr/local/bin/
167+
147168 Operations are just Python functions, or classes. They define a routine which
148169will be run concurrently with other operations. Here's an example of the
149170``git_commits `` operation, which will find the number of commits within a date
@@ -153,8 +174,8 @@ range.
153174
154175.. literalinclude :: /../feature/git/dffml_feature_git/feature/operations.py
155176 :linenos:
156- :lineno-start: 367
157- :lines: 367-394
177+ :lineno-start: 349
178+ :lines: 349-368
158179
159180Since operations are run concurrently with each other, DFFML manages locking of
160181input data, such as git repositories. This is done via ``Definitions `` which are
Original file line number Diff line number Diff line change @@ -289,6 +289,29 @@ async def git_repo_release(
289289 outputs = {"lines_by_language" : lines_by_language_count },
290290)
291291async def lines_of_code_by_language (repo : Dict [str , str ]):
292+ """
293+ This operation relys on ``tokei``. Here's how to install version 10.1.1,
294+ check it's releases page to make sure you're installing the latest version.
295+
296+ On Linux
297+
298+ .. code-block:: console
299+
300+ $ curl -sSL 'https://github.com/XAMPPRocky/tokei/releases/download/v10.1.1/tokei-v10.1.1-x86_64-apple-darwin.tar.gz' \\
301+ | tar -xvz && \\
302+ echo '22699e16e71f07ff805805d26ee86ecb9b1052d7879350f7eb9ed87beb0e6b84fbb512963d01b75cec8e80532e4ea29a tokei' | sha384sum -c - && \\
303+ sudo mv tokei /usr/local/bin/
304+
305+ On OSX
306+
307+ .. code-block:: console
308+
309+ $ curl -sSL 'https://github.com/XAMPPRocky/tokei/releases/download/v10.1.1/tokei-v10.1.1-x86_64-apple-darwin.tar.gz' \\
310+ | tar -xvz && \\
311+ echo '8c8a1d8d8dd4d8bef93dabf5d2f6e27023777f8553393e269765d7ece85e68837cba4374a2615d83f071dfae22ba40e2 tokei' | sha384sum -c - && \\
312+ sudo mv tokei /usr/local/bin/
313+
314+ """
292315 # cloc creates temporary files >:(
293316 proc = await create ("tokei" , repo .directory , cwd = repo .directory )
294317 cols = []
You can’t perform that action at this time.
0 commit comments