A JSON schema for open-source project contribution data.
Перейти к файлу
Francois Marier a1b54b6809
Switch to standard Mozilla license and use SPDX identifier. (#116)
Copy of MPL from https://www.mozilla.org/media/MPL/2.0/index.48a3fe23ed13.txt
2021-06-07 14:36:24 -04:00
app UnboundLocalError 'content' 2018-10-15 12:14:41 -04:00
legacyredirect redirect stackato app to heroku host 2015-07-24 12:38:55 -07:00
.buildpacks Switch to stable Heroku buildpacks 2021-03-16 16:16:56 -04:00
.gitignore Move SSLify to wsgi app. Add ProxyFix for https detection. 2015-07-24 13:01:26 -04:00
.travis.yml Disable Travis Deployment 2019-01-09 10:21:33 -05:00
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct file 2019-03-29 11:32:47 -04:00
Gruntfile.js Deploy via Heroku. 2015-05-12 22:24:33 -04:00
LICENSE Switch to standard Mozilla license and use SPDX identifier. (#116) 2021-06-07 14:36:24 -04:00
Procfile Deploy via Heroku. 2015-05-12 22:24:33 -04:00
README.md Add 'chat' to the 'participate' object (#107) 2020-02-12 11:33:06 -05:00
contribute.json Switch to standard Mozilla license and use SPDX identifier. (#116) 2021-06-07 14:36:24 -04:00
knownurls.txt Add 'chat' to the 'participate' object (#107) 2020-02-12 11:33:06 -05:00
package.json Use Node.js v14 2021-03-16 16:25:58 -04:00
requirements.txt Upgrade MarkupSafe to fix setuptools error 2021-03-16 16:16:56 -04:00
runtime.txt Switch to python 3.6.13 runtime 2021-03-16 16:16:56 -04:00
schema.json Add 'chat' to the 'participate' object (#107) 2020-02-12 11:33:06 -05:00
setup.cfg travis test with py 3.6 instead 2018-09-04 14:23:11 -04:00
stackato.yml redirect stackato app to heroku host 2015-07-24 12:38:55 -07:00

README.md

contribute.json

A JSON schema for open-source project contribution data.

This is currently a proposal and is not yet stable. Suggestions and pull-requests welcome.

This is the current draft. I'm presenting the schema as an example instance using mozilla/bedrock as the subject. Previous discussion can be found in the comments of the original gist.

{
    // required
    "name": "Bedrock",
    "description": "The app powering (most of) www.mozilla.org.",
    "repository": {
        "url": "https://github.com/mozilla/bedrock",
        "license": "MPL2",
        // optional
        "type": "git",
        "tests": "https://ci.mozilla.org/job/bedrock/",
        "clone": "https://github.com/mozilla/bedrock.git"
    },

    // optional
    "participate": {
        "home": "https://wiki.mozilla.org/Mozilla.org",
        "docs": "http://bedrock.readthedocs.org/",
        // optional
        "mailing-list": "https://www.mozilla.org/about/forums/#dev-mozilla-org",
        "irc": "irc://irc.mozilla.org/#www",
        "irc-contacts": [
            "pmac",
            "jgmize",
            "malexis",
            "cmore"
        ],
        "chat": {
            "url": "irc://irc.mozilla.org/#www",
            "contacts": [
                "pmac",
                "jgmize",
                "malexis",
                "cmore"
            ]
        }
    },
    "bugs": {
        "list": "https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&product=www.mozilla.org",
        "report": "https://bugzilla.mozilla.org/enter_bug.cgi?product=www.mozilla.org&component=Bedrock",
        "mentored": "https://bugzilla.mozilla.org/buglist.cgi?f1=bug_mentor&o1=isnotempty&query_format=advanced&bug_status=NEW&product=www.mozilla.org&list_id=10866041"
    },
    "urls": {
        "prod": "https://www.mozilla.org",
        "stage": "https://www.allizom.org",
        "dev": "https://www-dev.allizom.org",
        "demo1": "https://www-demo1.allizom.org"
    },
    "keywords": [
        "python",
        "less-css",
        "django",
        "html5",
        "jquery"
    ]
}

Validation

We're currently using the JSON Schema standard and we publish our schema at schema.json.

You can, for example, use the json-schema-validator to validate your own contribute.json against this schema.

Flask app

There's a server-side app that is currently available on https://www.contributejson.org

Running the Flask app locally

# clone from the main repo
git clone https://github.com/mozilla/contribute.json.git

# go into the directory
cd contribute.json

# using virtualenv wrapper, create a new virtual environment for the project.
mkvirtualenv contribute.json

# intall the requirements
pip install -r requirements.txt

# install the npm dependencies
npm install

# generate the CSS files (use `grunt watch` to work on the LESS files)
grunt less

# You can run the app with
DEBUG=true python app

open http://localhost:5000/

NB! Most of the functionality is built as an AngularJS app.

Sentry

To use Sentry you just need to create an environment variable called SENTRY_DSN and it will be used.