Skip to content

Commit 83fe11a

Browse files
authored
Merge pull request #56 from nexB/53-convert-readme-to-rst
53 convert readme to rst
2 parents 156629d + 95391f4 commit 83fe11a

5 files changed

Lines changed: 84 additions & 61 deletions

File tree

MANIFEST.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ graft src
22
graft etc
33
graft thirdparty
44

5-
graft tests
5+
recursive-exclude thirdparty/dev *
6+
prune tests
67

7-
prune src/deltacode.egg-info
88

9+
include deltacode.ABOUT
910
include AUTHORS.rst
1011
include CHANGELOG.rst
11-
include README.md
12+
include README.rst
1213
include apache-2.0.LICENSE
13-
include deltacode.ABOUT
1414
include NOTICE
1515
include MANIFEST.in
1616
include setup.py

README.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

README.rst

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
=========
2+
Deltacode
3+
=========
4+
5+
+--------------+----------------------------------------------------------------------------------------------+
6+
| **Branch** | **Linux (Travis)** |
7+
+--------------+----------------------------------------------------------------------------------------------+
8+
| develop |.. image:: https://travis-ci.com/nexB/deltacode.svg?token=9MXbiHv3xZxwT2egFxby&branch=develop |
9+
| | :target: https://travis-ci.com/nexB/deltacode |
10+
+--------------+----------------------------------------------------------------------------------------------+
11+
12+
About:
13+
======
14+
15+
``deltacode`` is a simple command line utility that leverages the power
16+
of `scancode-toolkit <https://github.com/nexB/scancode-toolkit>`_ to determine file-level differences between two
17+
codebases.
18+
19+
How to use:
20+
===========
21+
22+
In order to calculate these differences (i.e. 'deltas'), the user must have two individual
23+
scancode scan files, with the ``--info`` scan option at minimum.
24+
25+
For example::
26+
27+
$ pip install scancode-toolkit
28+
$ scancode --info ~/postgresql-9.6/ ~/psql-9.6-fileinfo.json
29+
$ scancode --info ~/postgresql-10.0/ ~/psql-10.0-fileinfo.json
30+
31+
32+
33+
Once you have the two codebase scans, simply install/configure
34+
deltacode, and run it on the two scans::
35+
36+
(deltacode) $ deltacode --help
37+
Usage: deltacode [OPTIONS]
38+
39+
Identify the changes that need to be made to the 'old' scan file (-o or
40+
--old) in order to generate the 'new' scan file (-n or --new). Write the
41+
results to a .csv file (-c or --csv-file) or a .json file (-j or --json-
42+
file) at a user-designated location. If no file option is selected, print
43+
the JSON results to the console.
44+
45+
Options:
46+
-h, --help Show this message and exit.
47+
-n, --new PATH Identify the path to the "new" scan file
48+
[required]
49+
-o, --old PATH Identify the path to the "old" scan file
50+
[required]
51+
-c, --csv-file PATH Identify the path to the .csv output file
52+
-j, --json-file FILENAME Identify the path to the .json output file
53+
-a, --all-delta-types Include unmodified files as well as all changed
54+
files in the .json or .csv output. If not
55+
selected, only changed files are included.
56+
57+
(deltacode) $ deltacode -n ~/psql-10.0-fileinfo.json -o ~/psql-9.6-fileinfo.json -j ~/psql-10.0-psql-9.6-delta.json
58+
59+
=========
60+
Problems?
61+
=========
62+
63+
Open an `issue <https://www.github.com/nexb/deltacode/issues>`_.
64+
65+
Notes:
66+
======
67+
68+
- ``deltacode`` also collects statistical information, like # of files and other percentages. Currently, this output is not present in the ``csv`` output
69+
70+
Future TODOs/additions:
71+
=======================
72+
73+
- Use ``copyright`` information from scans to identify changes in copyright holders or dates for attribution.
74+
- Detect package or file changes that are only a version change for the same package or file.
75+
- Determine whether some added/removed files or packages are actually cases where the files or packages were moved.
76+

etc/release/MANIFEST.in.release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ prune tests
99
include deltacode.ABOUT
1010
include AUTHORS.rst
1111
include CHANGELOG.rst
12-
include README.md
12+
include README.rst
1313
include apache-2.0.LICENSE
1414
include NOTICE
1515
include MANIFEST.in

src/deltacode/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ def write_json(deltacode, outfile, all_delta_types=False):
9292
def cli(new, old, csv_file, json_file, all_delta_types):
9393
"""
9494
Identify the changes that need to be made to the 'old'
95-
scan file (-o or -old) in order to generate the 'new' scan file (-n or
96-
-new). Write the results to a .csv file (-c or -csv-file) or a
97-
.json file (-j or -json-file) at a user-designated location. If no file
95+
scan file (-o or --old) in order to generate the 'new' scan file (-n or
96+
--new). Write the results to a .csv file (-c or --csv-file) or a
97+
.json file (-j or --json-file) at a user-designated location. If no file
9898
option is selected, print the JSON results to the console.
9999
"""
100100
# retrieve the option selections

0 commit comments

Comments
 (0)