Skip to content

Commit 767c5ab

Browse files
committed
Merge develop
2 parents 16931c5 + db1103b commit 767c5ab

File tree

521 files changed

+9931
-8875
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

521 files changed

+9931
-8875
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ docs/_build
4747
/.cache/
4848
/.settings/
4949
/tcl/
50+
/.python-version
51+
/.tox/

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ install:
88
- ./configure etc/conf/dev
99

1010
script:
11-
- bin/py.test -vvs tests
11+
- bin/py.test -vvs
1212

1313
notifications:
1414
irc:

README.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ You will need to install a Python interpreter if you do not have one already
4242
installed.
4343

4444
On Linux and Mac, Python is typically pre-installed. To verify which
45-
version may be pre-installed, open a terminal and type::
45+
version may be pre-installed, open a terminal and type:
4646

4747
python --version
4848

@@ -58,25 +58,26 @@ INSTALLATION
5858
Checkout or download and extract the AboutCode Toolkit from:
5959
https://github.com/nexB/aboutcode-toolkit/
6060

61-
To install all the needed dependencies in a virtualenv, run (on posix)::
61+
To install all the needed dependencies in a virtualenv, run (on posix):
6262
source configure
63-
or on windows::
63+
or on windows:
6464
configure
6565

6666

67-
USAGE
67+
REFERENCE
6868
-----
69-
See https://github.com/nexB/aboutcode-toolkit/blob/master/USAGE.rst for USAGE.
69+
See https://github.com/nexB/aboutcode-toolkit/blob/master/REFERENCE.rst for reference
70+
on aboutcode-toolkit usage.
7071

7172

7273
TESTS and DEVELOPMENT
7374
---------------------
74-
To install all the needed development dependencies, run (on posix)::
75+
To install all the needed development dependencies, run (on posix):
7576
source configure etc/conf/dev
76-
or on windows::
77+
or on windows:
7778
configure etc/conf/dev
7879

79-
To verify that everything works fine you can run the test suite with::
80+
To verify that everything works fine you can run the test suite with:
8081
py.test
8182

8283

@@ -121,4 +122,4 @@ See (of course) the about.ABOUT file for details.
121122
:alt: Windows Master branch tests status
122123
.. |devel-win| image:: https://ci.appveyor.com/api/projects/status/uwj2gh8i9ga1mqwn/branch/develop?png=true
123124
:target: https://ci.appveyor.com/project/nexB/aboutcode-toolkit
124-
:alt: Windows Develop branch tests status
125+
:alt: Windows Develop branch tests status

REFERENCE.rst

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ about
1111

1212
::
1313

14-
--version Show the version and exit.
15-
--help Show this message and exit.
14+
--version Show the version and exit.
15+
-h, --help Show this message and exit.
1616

1717
**Commands:**
1818

@@ -22,6 +22,7 @@ about
2222
check LOCATION: directory
2323
gen LOCATION: input file, OUTPUT: directory
2424
inventory LOCATION: directory, OUTPUT: csv file
25+
transform LOCATION: csv file, OUTPUT: csv file
2526

2627

2728
attrib
@@ -352,3 +353,59 @@ The multiple licenses support format for ABOUT files are by "grouping" with the
352353
- key: mit
353354
name: mit.LICENSE
354355

356+
357+
transform
358+
=========
359+
360+
**Syntax**
361+
362+
::
363+
364+
about transform [OPTIONS] LOCATION OUTPUT
365+
366+
LOCATION: Path to a CSV file.
367+
OUTPUT: Path to CSV inventory file to create.
368+
369+
**Options:**
370+
371+
::
372+
373+
-c, --configuration FILE Path to an optional YAML configuration file. See
374+
--help-format for format help.
375+
--help-format Show configuration file format help and exit.
376+
-q, --quiet Do not print error or warning messages.
377+
--verbose Show all error and warning messages.
378+
-h, --help Show this message and exit.
379+
380+
Purpose
381+
-------
382+
Transform the CSV file at LOCATION by applying renamings, filters and checks and write a new CSV to OUTPUT.
383+
384+
Options
385+
-------
386+
387+
::
388+
389+
-c, --configuration
390+
391+
Path to an optional YAML configuration file. See--help-format for format help.
392+
393+
$ about transform -c 'path to the YAML configuration file' LOCATION OUTPUT
394+
395+
--help-format
396+
397+
Show configuration file format help and exit.
398+
This option will print out examples of the the YAML configuration file.
399+
400+
Keys configuration are: `column_renamings`, `required_columns` and `column_filters`
401+
402+
$ about transform --help-format
403+
404+
--verbose
405+
406+
This option tells the tool to show all errors found.
407+
The default behavior will only show 'CRITICAL', 'ERROR', and 'WARNING'
408+
409+
Special Notes
410+
=============
411+
When using the `column_filters` configuration, all the standard required columns (`about_resource` and `name`) and the user definied `required_columns` need to be included.

SPECIFICATION.rst

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ABOUT File Specification v3.1.1
1+
ABOUT File Specification v3.1.4
22

33

44
Purpose
@@ -22,7 +22,7 @@ versions of a software component.
2222
Getting Started
2323
~~~~~~~~~~~~~~~
2424

25-
A simple and valid ABOUT file named httpd.ABOUT may look like this::
25+
A simple and valid ABOUT file named httpd-2.4.3.tar.gz.ABOUT may look like this::
2626

2727
about_resource: httpd-2.4.3.tar.gz
2828
name: Apache HTTP Server
@@ -32,14 +32,15 @@ A simple and valid ABOUT file named httpd.ABOUT may look like this::
3232
license_expression: apache-2.0
3333
licenses:
3434
- key: apache-2.0
35-
- file: apache-2.0.LICENSE
35+
name: Apache License 2.0
36+
file: apache-2.0.LICENSE
3637
notice_file: httpd.NOTICE
3738
copyright: Copyright (c) 2012 The Apache Software Foundation.
3839

3940
The meaning of this ABOUT file is:
4041

4142
- The file "httpd-2.4.3.tar.gz" is stored in the same directory and side-by-side
42-
with the ABOUT file "httpd.ABOUT" that documents it.
43+
with the ABOUT file "httpd-2.4.3.tar.gz.ABOUT" that documents it.
4344

4445
- The name of this component is "Apache HTTP Server" with version "2.4.3".
4546

@@ -60,6 +61,7 @@ Specification
6061
An ABOUT file is an ASCII YAML formatted text file.
6162
Note that while Unicode characters are not supported in
6263
an ABOUT file proper, external files can contain UTF-8 Unicode.
64+
The key for the licenses field and the license_expression are dejacode license key.
6365

6466

6567
ABOUT file name
@@ -72,7 +74,7 @@ A file name can contain only these US-ASCII characters:
7274

7375
- digits from 0 to 9
7476
- uppercase and lowercase letters from A to Z
75-
- the "_" underscore, "-" dash, "." period and "+" period signs.
77+
- the following symbols: "_", "-", "+", ".", "(", ")", "~", "[", "]", "{", "}"
7678

7779
- The case of a file name is not significant. On case-sensitive file systems
7880
(such as on Linux), a tool must report an error if two ABOUT files stored in
@@ -104,9 +106,9 @@ A field name can contain only these US-ASCII characters:
104106
- Field names are not case sensitive. For example, "HOMEPAGE_URL" and "HomePage_url"
105107
represent the same field name.
106108

107-
- A field name must start at the beginning of a new line. It can be followed by
108-
one or more spaces that must be ignored. These spaces are commonly used to
109-
improve the readability of an ABOUT file.
109+
- A field name must start at the beginning of a new line. No spaces is allowed in the
110+
field name. It can be followed by one or more spaces that must be ignored.
111+
These spaces are commonly used to improve the readability of an ABOUT file.
110112

111113

112114
Field value
@@ -140,22 +142,13 @@ For instance::
140142
This text contains multiple lines.
141143

142144

143-
Fields are mandatory or optional
144-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
145+
Fields are mandatory, optional or custom extension
146+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
145147

146-
As defined in this specification, a field can be mandatory or optional. Tools
148+
A field can be mandatory, optional or custom extension. Tools
147149
must report an error for missing mandatory fields.
148150

149151

150-
Extension and ignored fields
151-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
152-
153-
An ignored field is a field with a name that is not defined in this
154-
specification. Custom extension fields are also supported and must be processed
155-
by tools as ignored fields unless a certain tool can process a certain extension
156-
field.
157-
158-
159152
Fields validation
160153
~~~~~~~~~~~~~~~~~
161154

@@ -165,9 +158,9 @@ name syntax or invalid content. Tools should report additional validation error
165158
details. The validation process should check that each field name is
166159
syntactically correct and that fields contain correct values according to its
167160
concise, common sense definition in this specification. For certain fields,
168-
additional and specific validations are relevant such as checksum verification,
169-
URL validation, path resolution and verification, and so forth. Tools should
170-
report a warning for ignored fields.
161+
additional and specific validations are relevant such as URL validation,
162+
path resolution and verification, and so forth. Tools should
163+
report a warning for present fields that do not have any value.
171164

172165

173166
Fields order and multiple occurrences
@@ -177,7 +170,7 @@ The field order does not matter. Multiple occurrences of a field name is not
177170
supported.
178171

179172
The tool processing an ABOUT file or CSV/JSON input will issue an error when a
180-
field name occurs more than once in the input file (as for any other ignored field).
173+
field name occurs more than once in the input file.
181174

182175

183176
Field referencing a file
@@ -204,6 +197,15 @@ above the ABOUT file directory, using a relative POSIX path::
204197
licenses:
205198
- file: ../docs/ruby.README
206199

200+
In addition, there may be cases that a license can have 2 or more referenced license files.
201+
If this is the case, a comma ',' is used to identify multiple files
202+
For instance::
203+
204+
license_expression: gpl-2.0-plus
205+
licenses:
206+
- key: gpl-2.0-plus
207+
file: COPYING, COPYING.LESSER
208+
207209
Field referencing a URL
208210
~~~~~~~~~~~~~~~~~~~~~~~
209211

@@ -219,7 +221,7 @@ download URL is referenced this way::
219221
Flag fields
220222
~~~~~~~~~~~
221223

222-
Flag fields have a "true" or "false" value. True, T, Yes or Y , x must be
224+
Flag fields have a "true" or "false" value. True, T, Yes, Y or x must be
223225
interpreted as "true" in any case combination. False, F, No or N must be
224226
interpreted as "false" in any case combination.
225227

@@ -316,14 +318,14 @@ Optional Licensing fields
316318

317319
- license_url: URL to the license text for the component.
318320

319-
- license_expression: The license expression that apply to the component. You
321+
- license_expression: The DejaCode license expression that apply to the component. You
320322
can separate each identifier using " or " and " and " to document the
321323
relationship between multiple license identifiers, such as a choice among
322324
multiple licenses.
323325

324-
- license_name: The license short name for the license.
326+
- license_name: The DejaCode license short name for the license.
325327

326-
- license_key: The license key(s) for the component.
328+
- license_key: The DejaCode license key(s) for the component.
327329

328330

329331
Optional Boolean flag fields
@@ -348,9 +350,7 @@ Optional Extension fields
348350
~~~~~~~~~~~~~~~~~~~~~~~~~
349351

350352
You can create extension fields by prefixing them with a short prefix to
351-
distinguish these from the standard fields. You should provide documentation for
352-
these extensions and create or extend existing tools to support these
353-
extensions. Other tools must ignore these extensions.
353+
distinguish these from the standard fields (but this is not necessary).
354354

355355

356356
Optional Extension fields to reference files stored in a version control system (VCS)
@@ -408,6 +408,9 @@ to verify the integrity of a file documented by an ABOUT file.
408408
- checksum_sha1: SHA1 for the file documented by this ABOUT file in the
409409
"about_resource" field.
410410

411+
- checksum_sha256: SHA256 for the file documented by this ABOUT file in the
412+
"about_resource" field.
413+
411414
Some examples::
412415

413416
checksum_md5: f30b9c173b1f19cf42ffa44f78e4b96c

about.ABOUT

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,21 @@
11
about_resource: .
22
name: AboutCode-toolkit
3-
about_resource_path: .
4-
5-
version: 3.3.3
6-
7-
description: |
3+
version: 4.0.0
4+
author: Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez
5+
copyright: Copyright (c) 2013-2019 nexB Inc.
6+
description: |-
87
AboutCode Toolkit is a tool to process ABOUT files. An ABOUT file
98
provides a simple way to document the provenance (origin and license)
109
'about' a software component. This is a small text file stored in the
1110
codebase side-by-side with the documented software component.
12-
1311
homepage_url: http://www.nexb.com/community.html
14-
15-
license: apache-2.0
16-
license_name: Apache 2.0
17-
license_file: apache-2.0.LICENSE
18-
copyright: Copyright (c) 2013-2017 nexB Inc.
19-
12+
license_expression: apache-2.0
13+
licenses:
14+
- file: apache-2.0.LICENSE
15+
key: apache-2.0
16+
name: Apache License 2.0
17+
url: https://enterprise.dejacode.com/urn/?urn=urn:dje:license:apache-2.0
2018
notice_file: NOTICE
21-
2219
owner: nexB Inc.
23-
author: Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez
24-
25-
vcs_tool: git
2620
vcs_repository: https://github.com/nexB/aboutcode-toolkit.git
21+
vcs_tool: git

about.cfg

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

0 commit comments

Comments
 (0)