Skip to content

Commit

Permalink
License-manager setup from django cookiecutter
Browse files Browse the repository at this point in the history
  • Loading branch information
bbaker6225 committed Apr 7, 2020
0 parents commit 3087097
Show file tree
Hide file tree
Showing 83 changed files with 3,905 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .annotation_safe_list.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This is a Code Annotations automatically-generated Django model safelist file.
# These models must be annotated as follows in order to be counted in the coverage report.
# See https://code-annotations.readthedocs.io/en/latest/safelist.html for more information.
#
# fake_app_1.FakeModelName:
# ".. no_pii:": "This model has no PII"
# fake_app_2.FakeModel2:
# ".. choice_annotation:": foo, bar, baz

admin.LogEntry:
".. no_pii:": "This model has no PII"
auth.Group:
".. no_pii:": "This model has no PII"
auth.Permission:
".. no_pii:": "This model has no PII"
contenttypes.ContentType:
".. no_pii:": "This model has no PII"
sessions.Session:
".. no_pii:": "This model has no PII"
social_django.Association:
".. no_pii:": "This model has no PII"
social_django.Code:
".. pii:": "Email address"
".. pii_types:": other
".. pii_retirement:": local_api
social_django.Nonce:
".. no_pii:": "This model has no PII"
social_django.Partial:
".. no_pii:": "This model has no PII"
social_django.UserSocialAuth:
".. no_pii:": "This model has no PII"
waffle.Flag:
".. no_pii:": "This model has no PII"
waffle.Sample:
".. no_pii:": "This model has no PII"
waffle.Switch:
".. no_pii:": "This model has no PII"
4 changes: 4 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"directory": "license_manager/static/bower_components",
"interactive": false
}
12 changes: 12 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[run]
branch = True
data_file = .coverage
source=license_manager
omit =
license_manager/settings*
license_manager/conf*
*wsgi.py
*migrations*
*admin.py
*static*
*templates*
94 changes: 94 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# ***************************
# ** DO NOT EDIT THIS FILE **
# ***************************
#
# This file was generated by edx-lint: http://github.com/edx/edx-lint
#
# If you want to change this file, you have two choices, depending on whether
# you want to make a local change that applies only to this repo, or whether
# you want to make a central change that applies to all repos using edx-lint.
#
# LOCAL CHANGE:
#
# 1. Edit the local .editorconfig_tweaks file to add changes just to this
# repo's file.
#
# 2. Run:
#
# $ edx_lint write .editorconfig
#
# 3. This will modify the local file. Submit a pull request to get it
# checked in so that others will benefit.
#
#
# CENTRAL CHANGE:
#
# 1. Edit the .editorconfig file in the edx-lint repo at
# https://github.com/edx/edx-lint/blob/master/edx_lint/files/.editorconfig
#
# 2. install the updated version of edx-lint (in edx-lint):
#
# $ pip install .
#
# 3. Run (in edx-lint):
#
# # uses .editorconfig_tweaks from edx-lint for linting in edx-lint
# # NOTE: Use Python 3.x, which no longer includes comments in the output file
# $ edx_lint write .editorconfig
#
# 4. Make a new version of edx_lint, submit and review a pull request with the
# .editorconfig update, and after merging, update the edx-lint version by
# creating a new tag in the repo (uses pbr).
#
# 5. In your local repo, install the newer version of edx-lint.
#
# 6. Run:
#
# # uses local .editorconfig_tweaks
# $ edx_lint write .editorconfig
#
# 7. This will modify the local file. Submit a pull request to get it
# checked in so that others will benefit.
#
#
#
#
#
# STAY AWAY FROM THIS FILE!
#
#
#
#
#
# SERIOUSLY.
#
# ------------------------------
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4
max_line_length = 120
trim_trailing_whitespace = true

[{Makefile, *.mk}]
indent_style = tab
indent_size = 8

[*.{yml,yaml,json}]
indent_size = 2

[*.js]
indent_size = 2

[*.diff]
trim_trailing_whitespace = false

[.git/*]
trim_trailing_whitespace = false

[*.rst]
max_line_length = 79

# 01d24285b953f74272f86b1e42a0235315085e59
54 changes: 54 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
## Description

TODO: Include a detailed description of the changes in the body of the PR

## Manual Test Plan

TODO: Include instructions for any required manual tests, and any manual testing that has
already been performed.

## Testing Checklist
- TODO: Include unit, integration, acceptance tests as appropriate
- TODO: Include accessibility (a11y) tests
- TODO: Include tests that capture the external-query scaling properties
- [ ] Check that Database migrations are backwards-compatible
- [ ] Manually test right-to-left languages and i18n
of the changes.

## Non-testing Checklist
- TODO: Tag DevOps on your PR (user `edx/devops`), either for review
(more specific to devops = better) or just a general FYI.
- TODO: Consider any documentation your change might need, and which
users will be affected by this change.
- TODO: Double-check that your commit messages will make a meaningful release note.

## Post-review
- TODO: Squash commits into discrete sets of changes (see the note about release notes above)

## Reviewers
If you've been tagged for review, please check your corresponding box once you've given the :+1:.
- [ ] Code review #1 (TODO: tag a specific user)
- [ ] Code review #2 (TODO: tag a specific user)
- [ ] Docs review (required for UI strings/error messages)
- [ ] UX review
- [ ] Accessibility review
- [ ] Product review

### Areas to Consider
- [ ] i18n
- Are all user-facing strings tagged?
- [ ] Right-to-left
- Will the feature work for right-to-left languages?
- [ ] Analytics
- Are any new events being emitted?
- Have any events been changed?
- Are there any new user actions that should be emitted as events?
- [ ] Performance
- What dimensions does this change scale over? Users? Courses? Course size?
- How does the feature scale over those dimensions? Sub-linear? Linear? Quadratic? Exponential?
- How does the scaling affect the number of external calls (database queries,
api requests, etc) that this code makes?
- [ ] Database migrations
- Are they backwards compatible?
- When they run on production, how long will they take? Will they lock the table?

86 changes: 86 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
*.py[cod]

*.log

# C extensions
*.so

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
__pycache__

# Installer logs
pip-log.txt

# Django
default.db

# Static assets
media/cache/
assets/

# Unit test / coverage reports
.coverage
htmlcov
.tox
nosetests.xml
unittests.xml

# PII annotation reports
pii_report

### Internationalization artifacts
*.mo
*.po
*.prob
!django.po
!django.mo
!djangojs.po
!djangojs.mo
license_manager/conf/locale/fake*/LC_MESSAGES/*.po
license_manager/conf/locale/fake*/LC_MESSAGES/*.mo
license_manager/conf/locale/messages.mo


# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# QA
coverage.xml
diff_*.html
*.report
report
venv
acceptance_tests.*.log
acceptance_tests.*.png

# Override config files
override.cfg
private.py

# JetBrains
.idea

# OS X
.DS_Store

# Editor Temp Files
*.swp

*.trace

docs/_build/
35 changes: 35 additions & 0 deletions .pii_annotations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
source_path: ./
report_path: pii_report
safelist_path: .annotation_safe_list.yml
coverage_target: 100.0
annotations:
".. no_pii:":
"pii_group":
- ".. pii:":
- ".. pii_types:":
choices:
- id # Unique identifier for the user which is shared across systems
- name # Used for any part of the user’s name
- username
- password
- location # Used for any part of any type address or country stored
- phone_number # Used for phone or fax numbers
- email_address
- birth_date # Used for any part of a stored birth date
- ip # IP address
- external_service # Used for external service ids or links such as social media links or usernames, website links, etc.
- biography # Any type of free-form biography field
- gender
- sex
- image
- video
- other
- ".. pii_retirement:":
choices:
- retained # Intentionally kept for legal reasons
- local_api # An API exists in this repository for retiring this information
- consumer_api # The data's consumer must implement an API for retiring this information
- third_party # A third party API exists to retire this data
extensions:
python:
- py
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: python
python:
- 3.6
sudo: false

cache: pip
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
install:
- make ci_requirements
- pip install -U pip wheel codecov
script:
- make validate_translations
- make validate
after_success:
- codecov
14 changes: 14 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[main]
host = https://www.transifex.com

[edx-platform.license_manager]
file_filter = license_manager/conf/locale/<lang>/LC_MESSAGES/django.po
source_file = license_manager/conf/locale/en/LC_MESSAGES/django.po
source_lang = en
type = PO

[edx-platform.license_manager-js]
file_filter = license_manager/conf/locale/<lang>/LC_MESSAGES/djangojs.po
source_file = license_manager/conf/locale/en/LC_MESSAGES/djangojs.po
source_lang = en
type = PO
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# How to contribute

This is an Open edX repo, and we welcome your contributions!
Please read the [contributing guidelines](http://edx.readthedocs.org/projects/edx-developer-guide/en/latest/process/index.html).



Loading

0 comments on commit 3087097

Please sign in to comment.