Skip to content

Commit 952f957

Browse files
committed
Merge branch 'release-v1.0.1'
2 parents 1b10a53 + c03b9d0 commit 952f957

File tree

6 files changed

+20
-24
lines changed

6 files changed

+20
-24
lines changed

about.ABOUT

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
about_resource: .
22

33
name: AboutCode
4-
version: 0.9.0
4+
version: 1.0.1
5+
56

67
owner: nexB Inc.
78
author: Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez

about_code_tool/about.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
import ntpath
4747

4848

49-
__version__ = '0.9.0'
49+
__version__ = '1.0.1'
5050

5151
# See http://dejacode.org
5252
__about_spec_version__ = '1.0'
@@ -968,8 +968,6 @@ def get_custom_field_keys(self):
968968
return custom_key
969969

970970
def get_row_data(self, updated_path, custom_keys):
971-
print(updated_path)
972-
print(custom_keys)
973971
"""
974972
Create a csv compatible row of data for this object.
975973
"""
@@ -1267,7 +1265,6 @@ def generate_attribution(self, template_path=None, limit_to=None):
12671265
limit_to = limit_to or []
12681266

12691267
about_object_fields = []
1270-
about_content_dict = {}
12711268
license_dict = {}
12721269

12731270
not_process_components = list(limit_to)
@@ -1328,7 +1325,7 @@ def generate_attribution(self, template_path=None, limit_to=None):
13281325
# However, this is a temp fix for the license summarization feature.
13291326
rendered = template.render(about_objects=about_object_fields,
13301327
license_keys=license_key,
1331-
license_texts = license_text_list,
1328+
license_texts=license_text_list,
13321329
common_licenses=COMMON_LICENSES)
13331330
return rendered
13341331

about_code_tool/genabout.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
import about
4242

43-
__version__ = '0.9.0'
43+
__version__ = '1.0.1'
4444

4545
__copyright__ = """
4646
Copyright (c) 2013-2014 nexB Inc. All rights reserved.
@@ -391,8 +391,6 @@ def get_dje_license_list(self, gen_location, input_list, gen_license, dje_licens
391391
# update/overwrite the 'license_text_file' with
392392
# 'dje_license_key'
393393
if line['license_text_file']:
394-
file_value = []
395-
license_file_list = []
396394
file_location = line['about_file']
397395
about_parent_dir = dirname(file_location)
398396
license_text_file = line['license_text_file']
@@ -544,7 +542,7 @@ def update_about_resource(self, line, about_file_exist):
544542
about_resource = line['about_file']
545543
if about_resource.endswith('/'):
546544
line['about_resource'] = '.'
547-
else: # 'about_resource' key present with no value
545+
else: # 'about_resource' key present with no value
548546
about_resource = line['about_file']
549547
if about_resource.endswith('/'):
550548
line['about_resource'] = '.'
@@ -701,7 +699,7 @@ def main(parser, options, args):
701699
handler.setLevel(logging.WARNING)
702700

703701
valid_actions = 0, 1, 2, 3
704-
if action:
702+
if action:
705703
if action in valid_actions:
706704
action_num = action
707705
else:

about_code_tool/genattrib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
logger.addHandler(handler)
4444
file_logger = logging.getLogger(__name__ + '_file')
4545

46-
__version__ = '0.9.0'
46+
__version__ = '1.0.1'
4747

48-
__about_spec_version__ = '0.8.0' # See http://dejacode.org
48+
__about_spec_version__ = '1.0.0' # See http://dejacode.org
4949

5050
__copyright__ = """
5151
Copyright (c) 2013-2014 nexB Inc. All rights reserved.

about_code_tool/tests/test_about.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def test_header_row_in_csv_output(self):
116116
'checksum_sha256,dje_component,dje_license,dje_organization,'
117117
'dje_license_name,scm_branch,scm_repository,signature_gpg_file,'
118118
'redistribute_sources,about_format,usage,'
119-
'license_text,notice,' # These two are not supported and thus treat as custom keys
119+
'license_text,notice,' # These two are not supported and thus treat as custom keys
120120
'scm_path,scm_tool,scm_rev,scm_tag,organization,'
121121
'warnings,errors')
122122

@@ -606,26 +606,24 @@ def test_remove_blank_lines_and_no_colon_fields(self):
606606
self.assertEqual(expected_warnings[i][0], w.code)
607607
self.assertEqual(expected_warnings[i][1], w.field_value)
608608

609-
# FIXME: This is failing because there is no component list provided
610-
def FAILING_test_generate_attribution_with_custom_template(self):
609+
def test_generate_attribution_with_custom_template(self):
611610
expected = (u'notice_text:'
612611
'version:2.4.3'
613612
'about_resource:httpd-2.4.3.tar.gz'
614613
'name:Apache HTTP Serverlicense_text:')
615614
test_file = join(TESTDATA_DIR, 'attrib/attrib.ABOUT')
616615
collector = about.Collector(test_file)
617616
template = join(TESTDATA_DIR, 'attrib/test.template')
618-
result = collector.generate_attribution(template)
617+
result = collector.generate_attribution(template, limit_to=[''])
619618
self.assertEqual(expected, result)
620619

621-
# FIXME: This is failing because there is no component list provided
622-
def FAILING_test_generate_attribution_with_default_template(self):
620+
def test_generate_attribution_with_default_template(self):
623621
f = open(join(TESTDATA_DIR, 'attrib/attrib.html'))
624622
expected = f.read()
625623
test_file = join(TESTDATA_DIR, 'attrib/attrib.ABOUT')
626624
collector = about.Collector(test_file)
627-
result = collector.generate_attribution()
628-
# Strip all the white spaces
625+
result = collector.generate_attribution(limit_to=[''])
626+
# Strip all the white spaces
629627
self.assertEqual(re.sub(r'\s+', '', expected), re.sub(r'\s+', '', result))
630628

631629
def test_license_text_extracted_from_license_text_file(self):
@@ -698,4 +696,4 @@ def test_get_about_name(self):
698696
def test_get_dje_license_name(self):
699697
about_file = about.AboutFile(join(TESTDATA_DIR, 'basic/simple.about'))
700698
result = about_file.get_dje_license_name()
701-
self.assertEqual(result, 'Apache License 2.0')
699+
self.assertEqual(result, 'Apache License 2.0')

docs/CHANGELOG.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
Release 1.0.1:
2+
2013-11-03: Minor bug fixes, such as extraneous debug printouts.
13

2-
Release next:
3-
4+
Release 1.0.0:
5+
2013-10-31: Making 1.0: some changes in the spec, such as supporting only text in external files. Several refinements including common licenses.
46

57
Release 0.8.1:
68
2013-06-24: Initial release with minimal capabilities to read and validate ABOUT files format 0.8.0 and output a CSV inventory.

0 commit comments

Comments
 (0)