Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2013-2017 nexB Inc. http://www.nexb.com/ - All rights reserved.
Copyright (c) 2013-2018 nexB Inc. and others http://www.nexb.com/ - All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion about → aboutcode
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ fi

source $ABOUT_ROOT_DIR/bin/activate

$ABOUT_ROOT_DIR/bin/about-code "$@"
$ABOUT_ROOT_DIR/bin/aboutcode "$@"
8 changes: 4 additions & 4 deletions about.ABOUT → aboutcode.ABOUT
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
about_resource: .

name: AboutCode-toolkit
version: 3.0.0.dev6
version: 3.1.0

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

homepage_url: https://aboutcode.org

vcs_tool: git
vcs_repository: https://github.com/dejacode/about-code-tool.git
vcs_repository: https://github.com/nexB/aboutcode-toolkit.git

description: AboutCode Toolkit is a tool to process ABOUT files. An ABOUT file
provides a simple way to document the provenance (origin and license)
Expand All @@ -20,6 +20,6 @@ description: AboutCode Toolkit is a tool to process ABOUT files. An ABOUT file
license: apache-2.0
license_name: Apache 2.0
license_file: apache-2.0.LICENSE
copyright: Copyright (c) 2013-2017 nexB Inc.
copyright: Copyright (c) 2013-2018 nexB Inc. and others

notice_file: NOTICE
4 changes: 2 additions & 2 deletions about.bat → aboutcode.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ goto about

:about
call %ABOUT_ROOT_DIR%\Scripts\activate
echo %ABOUT_ROOT_DIR%\bin\about-code %CMD_LINE_ARGS%
%ABOUT_ROOT_DIR%\bin\about-code %CMD_LINE_ARGS%
echo %ABOUT_ROOT_DIR%\bin\aboutcode %CMD_LINE_ARGS%
%ABOUT_ROOT_DIR%\bin\aboutcode %CMD_LINE_ARGS%

:EOS
2 changes: 1 addition & 1 deletion about.cfg → aboutcode.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AboutCode configuration file
# AboutCode toolkit configuration file

[mappings]
# When you generate ABOUT files from a CSV inventory, use this section to map
Expand Down
4 changes: 2 additions & 2 deletions docs/UsingAboutCodetoDocumentYourSoftwareAssets.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ among multiple licenses.</td>

## <a name="OptionallyDefineCustomFieldsforgenwithMAPPING.CONFIG">Optionally Define Custom Fields for gen with MAPPING.CONFIG</a>

Optionally, you can control the generated label names and contents in your .ABOUT files using a MAPPING.CONFIG file. You can start with the default version provided at [https://github.com/nexB/aboutcode-toolkit/blob/develop/src/attributecode/mapping.config](https://github.com/nexB/aboutcode-toolkit/blob/develop/src/attributecode/mapping.config) and you can customize a copy of that file to map the software provenance information that is important to you. When you are ready to run gen, you will want to specify the --mapping option to tell it to look for the MAPPING.CONFIG file and use it.
Optionally, you can control the generated label names and contents in your .ABOUT files using a MAPPING.CONFIG file. You can start with the default version provided at [https://github.com/nexB/aboutcode-toolkit/blob/develop/src/aboutcode/mapping.config](https://github.com/nexB/aboutcode-toolkit/blob/develop/src/aboutcode/mapping.config) and you can customize a copy of that file to map the software provenance information that is important to you. When you are ready to run gen, you will want to specify the --mapping option to tell it to look for the MAPPING.CONFIG file and use it.

You can customize your copy of MAPPING.CONFIG to recognize your own software inventory column names in order to map them to ABOUT File contents. This is especially useful if you prefer not to change some of the actual column names in your software inventory before running gen. Note that the name on the right side (for example "Directory/Filename") is the name of the field in your software inventory spreadsheet, and the name on the left, followed by a colon, is the field label to go into the .ABOUT file. Here is an example:

Expand Down Expand Up @@ -297,7 +297,7 @@ You should prepare a filtered version of your software inventory (the one that y

You can run attrib using the default_html.template (or default_json.template if want JSON output) provided with the AboutCode Toolkit tools:

[https://github.com/nexB/aboutcode-toolkit/blob/develop/src/attributecode/templates/default_html.template](https://github.com/nexB/aboutcode-toolkit/blob/develop/src/attributecode/templates/default_html.template)
[https://github.com/nexB/aboutcode-toolkit/blob/develop/src/aboutcode/templates/default_html.template](https://github.com/nexB/aboutcode-toolkit/blob/develop/src/aboutcode/templates/default_html.template)

If you choose to do that, you will most likely want to edit the generated .html file to provide header information about your own organization and product.

Expand Down
4 changes: 2 additions & 2 deletions etc/scripts/irc-notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

Example:
export APPVEYOR_URL=https://ci.appveyor.com
export APPVEYOR_PROJECT_NAME=attributecode
export APPVEYOR_PROJECT_NAME=aboutcode-toolkit
export APPVEYOR_REPO_COMMIT_AUTHOR=pombredanne
export APPVEYOR_REPO_COMMIT_TIMESTAMP=2016-10-31
export APPVEYOR_REPO_PROVIDER=gihub
Expand All @@ -43,7 +43,7 @@
export APPVEYOR_REPO_COMMIT_MESSAGE="some IRC test"
export APPVEYOR_ACCOUNT_NAME=nexB
export APPVEYOR_PULL_REQUEST_NUMBER=pull_request_number
export APPVEYOR_REPO_NAME=nexB/attributecode
export APPVEYOR_REPO_NAME=nexB/aboutcode-toolkit
python etc/scripts/irc-notify.py aboutcode '[{project_name}:{branch}] {short_commit}: "{message}" ({author}) {color_red}Succeeded','Details: {build_url} | Commit: {commit_url}'

See also https://github.com/gridsync/gridsync/blob/master/appveyor.yml for examples
Expand Down
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ def read(*names, **kwargs):

setup(
name='aboutcode-toolkit',
version='3.0.2',
version='3.1.0',
license='Apache-2.0',
description=(
'AboutCode-toolkit is a tool to document the provenance (origin and license) of '
'third-party software using small text files. '
'Collect inventories, generate attribution documentation.'
),
long_description=(
'AttributeCode provides a simple way to document the'
'AboutCode-toolkit provides a simple way to document the'
'provenance (i.e. origin and license) of software components that'
'you use in your project. This documentation is stored in *.ABOUT'
'files, side-by-side with the documented code.'
Expand Down Expand Up @@ -79,7 +79,9 @@ def read(*names, **kwargs):
},
entry_points={
'console_scripts': [
'about-code=attributecode.cmd:cli',
'aboutcode=aboutcode.cmd:cli',
# TODO deprecate me: this is kept for compatibility
'about-code=aboutcode.cmd:cli',
]
},
)
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
basestring = str # Python 3


__version__ = '3.0.2'
__version__ = '3.1.0'


__about_spec_version__ = '3.0.0'
Expand Down
4 changes: 2 additions & 2 deletions src/attributecode/api.py → src/aboutcode/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
from urllib.request import urlopen, Request
from urllib.error import HTTPError, URLError

from attributecode import ERROR
from attributecode import Error
from aboutcode import ERROR
from aboutcode import Error


"""
Expand Down
14 changes: 7 additions & 7 deletions src/attributecode/attrib.py → src/aboutcode/attrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@

import jinja2

import attributecode
from attributecode import ERROR
from attributecode import Error
from attributecode.licenses import COMMON_LICENSES
from attributecode.model import parse_license_expression
from attributecode.util import add_unc
import aboutcode
from aboutcode import ERROR
from aboutcode import Error
from aboutcode.licenses import COMMON_LICENSES
from aboutcode.model import parse_license_expression
from aboutcode.util import add_unc


def generate(abouts, template_string=None):
Expand Down Expand Up @@ -177,7 +177,7 @@ def generate_and_save(abouts, output_location, use_mapping=False,

try:
# Return a list which contains only the about file path
about_list = attributecode.util.get_about_file_path(
about_list = aboutcode.util.get_about_file_path(
inventory_location, use_mapping=use_mapping)
# FIXME: why catching all exceptions?
except Exception:
Expand Down
18 changes: 9 additions & 9 deletions src/attributecode/cmd.py → src/aboutcode/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
# silence unicode literals warnings
click.disable_unicode_literals_warning = True

from attributecode import __about_spec_version__
from attributecode import __version__
from attributecode.attrib import generate_and_save as attrib_generate_and_save
from attributecode.gen import generate as gen_generate
from attributecode import model
from attributecode import severities
from attributecode.util import extract_zip
from attributecode.util import ignore_about_resource_path_not_exist_error
from attributecode.util import to_posix
from aboutcode import __about_spec_version__
from aboutcode import __version__
from aboutcode.attrib import generate_and_save as attrib_generate_and_save
from aboutcode.gen import generate as gen_generate
from aboutcode import model
from aboutcode import severities
from aboutcode.util import extract_zip
from aboutcode.util import ignore_about_resource_path_not_exist_error
from aboutcode.util import to_posix


__copyright__ = """
Expand Down
18 changes: 9 additions & 9 deletions src/attributecode/gen.py → src/aboutcode/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
# Python 3
import csv

from attributecode import ERROR
from attributecode import CRITICAL
from attributecode import Error
from attributecode import model
from attributecode.model import check_file_field_exist
from attributecode import util
from attributecode.util import add_unc
from attributecode.util import to_posix
from attributecode.util import UNC_PREFIX_POSIX
from aboutcode import ERROR
from aboutcode import CRITICAL
from aboutcode import Error
from aboutcode import model
from aboutcode.model import check_file_field_exist
from aboutcode import util
from aboutcode.util import add_unc
from aboutcode.util import to_posix
from aboutcode.util import UNC_PREFIX_POSIX


LOG_FILENAME = 'error.log'
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# * name
#
# Syntax:
# <attributecode key>: <input key>
# <aboutcode key>: <input key>
#
# Example:
# Assuming your input have columns "Resource", "Component", "Confirmed Version", "Confirmed Copyright", "Confirmed License"
Expand Down
26 changes: 13 additions & 13 deletions src/attributecode/model.py → src/aboutcode/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@

from license_expression import Licensing

from attributecode import CRITICAL
from attributecode import ERROR
from attributecode import INFO
from attributecode import WARNING
from attributecode import api
from attributecode import Error
from attributecode import saneyaml
from attributecode import util
from attributecode.util import add_unc
from attributecode.util import copy_license_notice_files
from attributecode.util import on_windows
from attributecode.util import UNC_PREFIX
from attributecode.util import UNC_PREFIX_POSIX
from aboutcode import CRITICAL
from aboutcode import ERROR
from aboutcode import INFO
from aboutcode import WARNING
from aboutcode import api
from aboutcode import Error
from aboutcode import saneyaml
from aboutcode import util
from aboutcode.util import add_unc
from aboutcode.util import copy_license_notice_files
from aboutcode.util import on_windows
from aboutcode.util import UNC_PREFIX
from aboutcode.util import UNC_PREFIX_POSIX


class Field(object):
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/attributecode/util.py → src/aboutcode/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
# Python 3
import http.client as httplib

from attributecode import CRITICAL
from attributecode import Error
from aboutcode import CRITICAL
from aboutcode import Error


on_windows = 'win32' in sys.platform
Expand Down Expand Up @@ -201,7 +201,7 @@ def norm(p):
else:
relative = path[len(base) + 1:]
# We don't want to keep the first segment of the root of the returned path.
# See https://github.com/nexB/attributecode/issues/276
# See https://github.com/nexB/aboutcode/issues/276
# relative = posixpath.join(base_name, relative)
return relative

Expand Down
24 changes: 0 additions & 24 deletions src/attributecode/__main__.py

This file was deleted.

6 changes: 3 additions & 3 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

import mock

from attributecode import api
from attributecode import ERROR
from attributecode import Error
from aboutcode import api
from aboutcode import ERROR
from aboutcode import Error
from testing_utils import FakeResponse


Expand Down
4 changes: 2 additions & 2 deletions tests/test_attrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

from testing_utils import get_test_loc

from attributecode import attrib
from attributecode import model
from aboutcode import attrib
from aboutcode import model


class AttribTest(unittest.TestCase):
Expand Down
16 changes: 8 additions & 8 deletions tests/test_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
from __future__ import print_function
from __future__ import unicode_literals

from attributecode import CRITICAL
from attributecode import DEBUG
from attributecode import ERROR
from attributecode import INFO
from attributecode import NOTSET
from attributecode import WARNING
from attributecode import cmd
from attributecode import Error
from aboutcode import CRITICAL
from aboutcode import DEBUG
from aboutcode import ERROR
from aboutcode import INFO
from aboutcode import NOTSET
from aboutcode import WARNING
from aboutcode import cmd
from aboutcode import Error


# NB: these tests depends on py.test stdout/err capture capabilities
Expand Down
10 changes: 5 additions & 5 deletions tests/test_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
from testing_utils import get_temp_dir
from testing_utils import get_test_loc

from attributecode import ERROR
from attributecode import INFO
from attributecode import CRITICAL
from attributecode import Error
from attributecode import gen
from aboutcode import ERROR
from aboutcode import INFO
from aboutcode import CRITICAL
from aboutcode import Error
from aboutcode import gen


class GenTest(unittest.TestCase):
Expand Down
Loading