GithubHelp home page GithubHelp logo

spdx / spdx-online-tools Goto Github PK

View Code? Open in Web Editor NEW
60.0 14.0 57.0 360.05 MB

Source for the website providing online SPDX tools

Home Page: https://tools.spdx.org

License: Apache License 2.0

Python 23.68% CSS 9.68% JavaScript 54.44% HTML 11.94% Shell 0.27%

spdx-online-tools's Introduction

GSoC Logo

spdx-online-tools

Source for the website providing online SPDX tools. The tool provides an easy all-in-one website to upload and parse SPDX documents for validation, comparison and conversion and search SPDX license list. Here you can find more about the working of the tool.

Features

  • Upload and parse SPDX Documents
  • Validate SPDX Documents
  • Compare Multiple SPDX Rdf Files
  • Convert one SPDX format to another
  • Compare License text to the SPDX listed Licenses

Requirements (Linux/Debian/Ubuntu)

Either the Sun/Oracle JDK/JRE Variant or OpenJDK. Python 3.7+.

Debian/Ubuntu users will have to install g++ and python-dev first:

sudo apt-get install g++ python-dev

Requirements (Windows)

Windows users need a Python installation and C++ compiler:

Installation

  1. Clone or download the repository.

  2. Create a new virtual environment for the project.

    python3 -m venv ./venv
    source venv/bin/activate

    On Windows:

    py -m venv venv
    venv\Scripts\activate
    
  3. Install the required python libraries given in the requirements.txt file.

    cd spdx-online-tools
    pip install -r requirements.txt
  4. Run Django migrate.

    python src/manage.py migrate
  5. (Optional) If you want use license-xml-editor with licenses/exceptions from spdx license list, download the license name database.

    python src/populate.py
  6. (Optional) If you want to use the license submittal feature or check license feature, follow the below step(s):

    • Install redis server on your local machine.

      For linux users

      • Use the command sudo apt-get install redis-server to install the redis server.

      For Mac users

      • Install the redis by running the command

        brew install redis.

      • If you want to run redis whenever your computer starts then run

        ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents.

      • To run the redis server use

        launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist.

      • To test if the redis is working run the command redis-cli ping. If it returns Pong then you are good to go.

      For Windows users

      • Download the redis server from here and install it.
    • Make sure redis server is running and keep it running until you are done using the license submittal or check license feature.

      The redis is used to store the license text of license present on the SPDX license list. For the very first time it may take a while to build the license on the redis server.

      SPDX License Matcher matches the license text input by the user(via license submittal form) against the data present on the redis to find for duplicate and near matches.

  7. Start the application.

    python src/manage.py runserver
  8. Open localhost:8000/ in the browser.

  9. Register and login to use the tools.

How to Run Tests

python src/manage.py test

Running with Docker

You need to have docker desktop installed on your machine for the container environment.

Prior to starting the docker image, you will need to create a file to set the environment variables described below.

Create a file ".env" with the following content:

DIFF_REPO_GIT_TOKEN=XXXX
DIFF_REPO_WITH_OWNER=XXXX
ONLINE_TOOL_GITHUB_KEY=XXXX
ONLINE_TOOL_GITHUB_SECRET=XXXX

You can bring up the Docker image with the following docker-compose command:

docker-compose -f docker-compose.dev.yml up --build

For the production environment, see the README-PRODUCTION.md file.

GitHub Developer Sensitive Data

The src/src/settings.py file uses sensitive data to work with the GitHub API. For that reason, sensitive data is maintained as environment variables. Due to that lack of data, some features of SPDX Online Tools and its API won't be able to run as they require the user credentials in order to access the GitHub API. So, the user is supposed to either maintain a .env file in the src/src/ folder or create environment variables in their os with their credentials in order to ensure proper functioning of the tool.

The src/src/secret.py file contains the following lines along with some methods required to run the tests properly. These include:

def getGithubKey():
    return os.environ.get(key="ONLINE_TOOL_GITHUB_KEY")

def getGithubSecret():
    return os.environ.get(key="ONLINE_TOOL_GITHUB_SECRET")

def getSecretKey():
    return os.environ.get(key="DJANGO_SECRET_KEY")

def getOauthToolKitAppID():
    return os.environ.get(key="OAUTH_APP_ID")

def getOauthToolKitAppSecret():
    return os.environ.get(key="OAUTH_APP_SECRET")
	
# The methods getDiffRepoGitToken and getDiffRepoWithOwner are used to configure the repository used for storing license diffs created during the license submittal process
# The DIFF_REPO_GIT_TOKEN is a personal access token created in Github with access to the repo DIFF_REPO_WITH_OWNER
    
def getDiffRepoGitToken():
    return os.environ.get(key="DIFF_REPO_GIT_TOKEN")
    
def getDiffRepoWithOwner():
    return os.environ.get(key="DIFF_REPO_WITH_OWNER", default="spdx/licenseRequestImages")

where:

  • ONLINE_TOOL_GITHUB_KEY is the Client ID for the Github Oauth Apps (To create your Oauth application see this)
  • ONLINE_TOOL_GITHUB_SECRET is the Client secret for the Github Oauth Apps
  • DJANGO_SECRET_KEY is the Django secret
  • OAUTH_APP_ID is the client ID of the django oauth toolkit app (To create your application see this)
  • OAUTH_APP_SECRET is the client secret of the django oauth toolkit app (To create your application see this)
  • DIFF_REPO_GIT_TOKEN is the Github user's Personal Access Token which has write access to DIFF_REPO_WITH_OWNER (Follow this to create your Github Personal access token with full repo and user scope access)
  • DIFF_REPO_WITH_OWNER is the repo where images related to license submittable process are uploaded

Note: While setting up the GitHub OAuth App, set the Homepage URL to http://localhost:8000/ and the Authorization callback URL to http://localhost:8000/oauth/complete/github

How to Use API

Here is the exhaustive list of request and response fields of different api tools.

  1. Start the server.

    python src/manage.py runserver
  2. Send the request to the url with the form input values accordingly. Curl examples are given below.

  3. For validation tool, send the request to /api/validate/.

    curl -X POST -u <admin>:<password> -F "file=@<fileInput>" -H "Accept: application/json" http://localhost:8000/api/validate/ | json_pp
  4. For compare tool, send the request to /api/compare/.

    curl -X POST -u <admin>:<password> -F "file1=@<fileInput1>" -F "file2=<fileInput2>" -F "rfilename=<resultFileName>" -H "Accept: application/json" http://localhost:8000/api/compare/ | json_pp
  5. For convert tool, send the request to /api/convert/.

    curl -X POST -u <admin>:<password> -F "file=@<fileInput>" -F "cfilename=<resultFileNameWithExtension>" -F "from_format=<convertFrom>" -F "to_format=<convertTo>" -H "Accept: application/json" http://localhost:8000/api/convert/ | json_pp
  6. For license check tool, send the request to /api/check_license/.

    curl -X POST -u <admin>:<password> -F "file=@<fileInput>" -H "Accept: application/json" http://localhost:8000/api/check_license/ | json_pp
  7. For the license submittal API, first create a django oauth toolkit application and follow the steps given below:

    Django Oauth Toolkit App

    • Go to admin page and login(if you don't have an admin account then create one using python src/manage.py createsuperuser).

    • Create a new application by going to the Applications section.

    • Copy the client id and client secret of the app and paste it in src/src/secret.py file under getOauthToolKitAppID and secret and fill the other details of the app as follows:

      • User: <admin you created>
      • client type: confidential
      • authorization grant type: resource owner password based

      and SAVE the app.

    Authorize oauth app with github to get code and send a request to the license submittal API

    • Visit http://github.com/login/oauth/authorize/?client_id=<github-client-id> it will then redirect you to a url, copy the code query string present in the url and send it via curl command if you want to use the API. if you want to run tests and test the API then paste the code in the src/src/secret.py file in the getAuthCode method.

      Note You can only use your code once. If you want to use the license submittal API again, you can generate a new code by following the above point. The code is valid for 10 minutes only.

    • Send the request to /api/submit-license/.

      curl -X POST http://localhost:8000/api/ submit_license/ -F 'fullname=<your-fullname>' -F 'shortIdentifier=<your-identifier>' -F 'licenseAuthorName=<license-author>' -F 'userEmail=<your-email>' -F 'text=<text>' -F 'osiApproved=<osi>' -F 'sourceUrl=<url>' -F 'code=<your-code-here>'

Dependencies

The project uses spdx java tools for various tools of the website.

spdx-online-tools's People

Contributors

anshuldutt21 avatar armintaenzertng avatar autoantwort avatar banulakumarage avatar basscoder2808 avatar dependabot[bot] avatar ekongobie avatar freddy28 avatar gaalocastillo avatar goneall avatar hardikkat24 avatar hirumalpriyashan avatar ilans avatar ithompson4 avatar itsyongan avatar jlovejoy avatar kmehant avatar nezhar avatar rtgdk avatar seabass-labrax avatar sidtohan avatar susg avatar techytushar avatar tjasmith avatar ugtan avatar vargenau avatar wking avatar wryonik avatar yash-varshney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spdx-online-tools's Issues

Add one more option for TagToRdf conversion.

TagToRdf takes max 3 arguments. See here
This third argument is for desired output format. ("RDF/XML-ABBREV"; "RDF/XML"; "N-TRIPLET"; "TURTLE").
Default format should be "RDF/XML-ABBREV".
You can include this output format drop down field in the convert form and modify call method accordingly.

(Extra points if you can modify the API for the same too! 💥 )

requirements.txt

@rtgdk I find that there are two requirements file and two src directories.
I need your help with understanding how the repo is structured.

Another tiny request (Personal thoughts): Please do a pip freeze and modify the requirements.txt for jpype1 and Django-downloadview

i.e. lock down to specific versions of the libraries. This will help avoid bugs/deprecations with future versions. Each time, If there be a need to use a higher version, we can bump up the requirements.txt and have a new release generated. Wanted to hear to your thoughts.

Missing table after updating server software

I'm getting the following error when accessing the new license request module:


Request Method: | GET
-- | --
http://13.57.134.254/app/license_requests/
1.11.2
OperationalError
no such table: app_licenserequest
/home/ubuntu/.local/lib/python2.7/site-packages/django/db/models/sql/compiler.py in execute_sql, line 886
/usr/local/bin/uwsgi
2.7.12
['.',  '',  '/usr/lib/python2.7',  '/usr/lib/python2.7/plat-x86_64-linux-gnu',  '/usr/lib/python2.7/lib-tk',  '/usr/lib/python2.7/lib-old',  '/usr/lib/python2.7/lib-dynload',  '/home/ubuntu/.local/lib/python2.7/site-packages',  '/usr/local/lib/python2.7/dist-packages',  '/usr/lib/python2.7/dist-packages']
Mon, 1 Oct 2018 16:58:07 +0000

I ran the makemigrations and migrate django commands, but no updates were applied.

@rtgdk @gaalocastillo Let me know if you have any suggestions.

Update django version

There is a minor security vulnerability in django version 1.11.18. We should upgrade to django ~> 1.11.18.

Note: related to issue #58

Error submitting XML in production server

I'm thinking this may be due to an incorrect version on the dependencies.

@techytushar @rtgdk Can you take a look and let me know if you have any thoughts on debugging?

Below is the stack trace:

Environment:


Request Method: GET
Request URL: http://13.57.134.254/oauth/complete/github/?redirect_state=5LC87E172cZinkKB9mTGcIBKfMnrYUCr&code=bc2dde0a62f7651ceee9&state=5LC87E172cZinkKB9mTGcIBKfMnrYUCr

Django Version: 1.11.2
Python Version: 2.7.12
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'app',
 'api',
 'rest_framework',
 'social_django']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'social_django.middleware.SocialAuthExceptionMiddleware']



Traceback:

File "/home/ubuntu/.local/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/home/ubuntu/.local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/home/ubuntu/.local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/home/ubuntu/.local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  57.         response = view_func(request, *args, **kwargs)

File "/home/ubuntu/.local/lib/python2.7/site-packages/django/views/decorators/csrf.py" in wrapped_view
  58.         return view_func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/social_django/utils.py" in wrapper
  49.             return func(request, backend, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/social_django/views.py" in complete
  33.                        *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/social_core/actions.py" in do_complete
  41.         user = backend.complete(user=user, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/social_core/backends/base.py" in complete
  40.         return self.auth_complete(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/social_core/utils.py" in wrapper
  252.             return func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/social_core/backends/oauth.py" in auth_complete
  405.                             *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/social_core/utils.py" in wrapper
  252.             return func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/social_core/backends/oauth.py" in do_auth
  416.         return self.strategy.authenticate(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/social_django/strategy.py" in authenticate
  107.         return authenticate(*args, **kwargs)

File "/home/ubuntu/.local/lib/python2.7/site-packages/django/contrib/auth/__init__.py" in authenticate
  70.             user = _authenticate_with_backend(backend, backend_path, request, credentials)

File "/home/ubuntu/.local/lib/python2.7/site-packages/django/contrib/auth/__init__.py" in _authenticate_with_backend
  115.     return backend.authenticate(*args, **credentials)

File "/usr/local/lib/python2.7/dist-packages/social_core/backends/base.py" in authenticate
  80.         return self.pipeline(pipeline, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/social_core/backends/base.py" in pipeline
  83.         out = self.run_pipeline(pipeline, pipeline_index, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/social_core/backends/base.py" in run_pipeline
  112.             func = module_member(name)

File "/usr/local/lib/python2.7/dist-packages/social_core/utils.py" in module_member
  59.     return getattr(module, member)

Exception Type: AttributeError at /oauth/complete/github/
Exception Value: 'module' object has no attribute 'save_profile'

Submit new license: change Notes field

Can we rename the "Notes" field to "Comments" and make the text box bigger, and move it to the bottom of the form?

"Notes" are an official field in the SPDX License List, but I don't think that is really needed at this point in the process.
We do need and want to enable a place for longer comments, as people often include in the current email submission, e.g., where the license is used should be included here

license submit: instructions for fields/form

is it possible to add some instructions at the top of the page?

similarly, could we add hints for how to fill out some of the fields - maybe via a popup or via some text in the field that disappears when you then start typing?

Include drag and drop file method

Drag and drop file method to upload would make the UX more friendly. The user should also be able to use default browse-and-select file by clicking on the drag and drop tile.

You can take inspiration from gmail's drive upload button.
capture

Adding support for Python3

When I try to run the app with Python 3.5.2 the following error occur:

  1. except jpype.JavaException, ex is not supported can be changed to except jpype.JavaException as ex
  2. from models import gives Import error can be changed to from api.models
  3. from urlparse import urljoin also gives import error as there is no module named urlparse in Python3 it has been changed to urllib.parse
  4. Also the jpype gives error while installing for python3.6

1 and 2 are fixable but I cannot find a way to fix 3

Create a mechanism to limit the requests to the online tools

Programmatic access could put a substantial load on the service if multiple requests are made with high frequency.

Suggest an enhancement to govern the rate at which requests from the same user and/or IP address is made.

This could also apply to the web access.

Missing dependency

While installing the online tools on the server, I am getting the following error:

No module named github_utils
...
./app/views.py in <module>, line 57

@rtgdk @gaalocastillo - If you could let me know if there is a missing requirement

Add tests for Split View of XML Editor

It would be nice to have some test cases for the Split View of the XML Editor. They can be similar to the Tree Editor tests. One additional thing that can be tested is the syncing between the tree and text editors.

Add Python Decouple

Description

Python Decouple strictly separates the settings parameters from the source code. It adds parameters related to an instance of the project into a seperate .env file. All the environment-specific parameters (secret key, user, passwords, debug status and hosts to mention a few) can be kept into and changed from a single configuration module. Also, It enables changing parameters without having to redeploy the app.

Adding this into .gitignore ensures these are not pushed with the code.

The following dependency is required for this change:
python-decouple

Convert mouse pointer on hover

On the /app/license_requests/ and /app/archive_requests/ page, the mouse pointer should change to finger when the user hovers over the table items (license names) so that he knows that the items are clickable. In the current version it feels like they are just for displaying the info and not clickable. There can also be some sort of highlighting on mouse hover.

API for check license method

Implement an api for check license method. Take a file as an input, parse it to send the text as a parameter to the spdx java tool function.

To implement the api, take inspiration from here and here

Add support for documenting API

Although, the wiki here is enough to interact with the API but adding a support for API documentation will help people new to the repo, understand what the API can do without access to source code. It will also help them to see all the API endpoints available so that they can use these endpoints to test and analyze the requests and responses of the API endpoints which is not really possible in entering curl commands.

Add listVersionAdded="" tag to license tag

When creating the license XML for a newly submitted license, add the attribute listVersionAdded with a default value of empty string (e.g. <License isOsiApproved="false" licenseId="newlicense" name="newLicense" listVersionAdded="">

This would make it easier to add the list version once a license has been approved.

This issue has been split off from issue #100

license submit: display of input in Github issue

If a field is left empty in the submission form, could we still have the heading for the field (e.g., "Standard License Header") appear in the auto-generated issue so we know more easily that was left blank?

Add versioning information to the application

Since we are now deploying multiple versions of the app, we should add a version to the application and display the version in the about page. It would also be nice to display the version of the SPDX tools used in the backend as well.

Files sent to api is saved twice

In api, create model function is saving the files twice. So files sent to api is saved to 2 folders

  • media/api/< username >/< time > --> (Saved by views.py) [used by the api to call spdx java tool]
  • media/apifiles/< username >/< time > (Saved by models.py) [returned to the api user as json]

Figure out the bug and modify the code to save the file once, use that file for calling the spdx java tools function and return the path of that file.

Change focus on error when submitting a new license

When a field fails validation, the error is displayed at the top of the page. If you are scrolled at the bottom, you don't see the error message.

Scrolling to the top of the page where the error is would highlight the error and solve the issue.

It would also help to highlight the field in error in red.

Create a Docker Image

It would be great if there is a Dockerfile and the user can just build a Docker image and use the platform locally.

Archive button only visible to logged in users

Currently the Archive button on the license_requests/ page and Unarchive button on the archive_requests/ page is visible to everyone, so anyone can just press the buttons and mess things up. These buttons should only be visible to the users who are logged in. What do you think @goneall

Tests failing. CI missing

There are certain test cases that break currently. It would be great to add Travis CI or something similar to test each new commit.

Would it make sense to add a code style check? I can recommend pycodestyle

======================================================================
ERROR: test_generate_xml (app.tests.SubmitNewLicenseViewsTestCase)
View for generating an xml from license submittal form fields
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nezhar/DEV/PYTHON/spdx-online-tools/src/app/tests.py", line 985, in test_generate_xml
    xml = generateLicenseXml(self.osiApproved, self.shortIdentifier, self.fullname, self.urls,
NameError: global name 'generateLicenseXml' is not defined

======================================================================
FAIL: test_license_requests (app.tests.LicenseRequestsViewsTestCase)
GET Request for license requests list
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nezhar/DEV/PYTHON/spdx-online-tools/src/app/tests.py", line 938, in test_license_requests
    self.assertEqual(resp.resolver_match.func.__name__,"license_requests")
AssertionError: 'licenseRequests' != u'license_requests'

======================================================================
FAIL: test_post_submit (app.tests.SubmitNewLicenseViewsTestCase)
POST Request for submit a new license
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nezhar/DEV/PYTHON/spdx-online-tools/src/app/tests.py", line 980, in test_post_submit
    self.assertNotEqual(resp.redirect_chain,[])
AssertionError: [] == []

======================================================================
FAIL: test_submit_new_license (app.tests.SubmitNewLicenseViewsTestCase)
GET Request for submit a new license
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nezhar/DEV/PYTHON/spdx-online-tools/src/app/tests.py", line 963, in test_submit_new_license
    self.assertEqual(resp.resolver_match.func.__name__,"license_requests")
AssertionError: 'submitNewLicense' != u'license_requests'

======================================================================
FAIL: test_invalid_license_name (app.tests.XMLUploadTestCase)
POST request for xml input using invalid license name
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nezhar/DEV/PYTHON/spdx-online-tools/src/app/tests.py", line 569, in test_invalid_license_name
    self.assertEqual(resp.status_code,404)
AssertionError: 500 != 404

----------------------------------------------------------------------
Ran 63 tests in 42.095s

FAILED (failures=4, errors=1)
Destroying test database for alias 'default'...

Enhancement Request: Add Check License tab to spdx-online-tools

The online tool https://spdx.org/spdxweb compares license text to the SPDX listed licenses. It uses a text box input and output a list of matched licenses as a dialog box.

Adding this feature to the spdx-online-tools would allow us to consolidate the tools into one UI (not to mention the UI is better for the spdx-online-tools).

The code is currently implemented as an SPDX servlet, but simply calls the SPDX tools library.

The Java code that calls the library is the following:

LicenseCompareHelper.matchingStandardLicenseIds(licenseText)

where license text is the text in the textbox.

@rtgdk If you prefer, I can create a pull request with the Python code to implement this.

Submit new license tool issue: getting error when I submit

I keep getting an error when I try to submit a new license. @goneall thinks it may be an issue with an international character. I tried pasting the license text into a text file and converting to plain text - same issue. I've also tried with both Firefox and Chrome browsers (on a Mac) and have same issue:

image

New travis script failing due to missing secret file

The following error is being reported by the Travis script:

  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/django/core/management/__init__.py", line 308, in execute
    settings.INSTALLED_APPS
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/django/conf/__init__.py", line 56, in __getattr__
    self._setup(name)
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/django/conf/__init__.py", line 110, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/opt/python/2.7.14/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/travis/build/spdx/spdx-online-tools/src/src/settings.py", line 14, in <module>
    from secret import getGithubKey, getGithubSecret, getSecretKey
ImportError: No module named secret

This is due to the file containing the github secret info being missing. I don't believe the current unit tests use the secrets, so may be able to get away with creating a set of fake credentials in a src/src/secret.py file to get around this issue. Another approach would be to use encrypted environment variables to store the credentials in travis then create the secret.py file as part of the travis script.

Add archive new license request

Currently, all license requests are displayed after being submitted. At some point, the number of license requests may become overwhelming.

Suggest adding an archive feature where you can archive an existing license request. This could be a button on the submitted license list page that would be enabled when a license request is highlighted. It would be moved to an archive category which can have its own display. In the archive display, the license request could be "unarchived" with an unarchive button.

Make the issues URL for license submittal configurable

Currently, the URL for the license issues is hardcoded to point to the SPDX license list (https://github.com/spdx/license-list-XML/issues). The tests are now using a test repository: https://github.com/spdx/TEST-LicenseList-XML/issues

If we could move this URL to the settings file, we could put the https://github.com/spdx/TEST-LicenseList-XML/issues URL as the default and we can replace it with the license-list-XML repo in production.

This would limit the amount of issues being generated in the license-list-XML repo while developing and testing.

Rename “XML Editor” to “License XML Editor” to clarify its intended use (was: Add support for other valid extensions)

Currently it seems the upload (to XML Editor at least) only accepts files with an *.xml extension.

According to §1.6.9 of the [SPDX Specification 2.1][spec] it

[s]hould be easy to recognize in a file system without opening the file. A suggested naming convention is to use *.spdx (for tag-value format) and *-spdx.rdf for RDF format.

So while *.spdx for tag-value and *-spdx.rdf are not a required naming, they are conventions that the SPDX Online Tools should at least support.

As explained by @goneall in the first comment below, the underlying issue seems to stem from the ambiguous name of the tool. A simple renaming should be enough.

[spec]: https://spdx.org/spdx-specification-21-web-version#h.3dy6vkm

password reset

Password reset feature would be commendable 🥇 as I love my username

Improve automatic XML formatting of license submittal text

Currently, when converting a submitted license to XML the text is formatted by putting a paragraph tag around every line break.

Many copy/pastes have line breaks due to text editor and the lines are not really on paragraph boundaries.

A better algorithm would be to put paragraphs when there are 2 line breaks in a row (e.g. a blank line).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.