- "Developer Documentation"
- https://edx.readthedocs.io/projects/edx-developer-docs
- Repo: https://github.com/edx/edx-developer-docs
- « This the landing page for documentation relevant to developers of the Open edX platform. »
- Linked from https://docs.edx.org/ as "Developers"
- Declares itself the new (vs. legacy) developer docs
- Links to https://edx.readthedocs.io/projects/edx-developer-guide
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python3 ./first.py | |
import second | |
import builtins | |
builtins.magic = "wow" | |
second.some_func() |
Have the following been addressed in the branch, if appropriate?
- Tests (unit, API, integration)
- Docs (source comments, doc directory, elsewhere)
- Changelog
- Compatibility with previous versions (calls, shared files or DBs, data formats -- backward and forward compatibility)
- Rollback friendly?
- Feature switches?
edX-specific considerations:
- Why did [mistaken action] seem like the correct action at the time?
- Why was the problem not detected automatically?
- Why was the mistake caught late, not early?
- Why was the problem not fixed automatically?
- Why did this require manual intervention?
- Why did this require human detection?
- Were any of the contributing factors already known problems?
- Why were they not addressed earlier?
- Have we seen these in previous RCAs?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Place in a Python package with this in the setup.py: | |
# | |
# entry_points={ | |
# 'console_scripts': [ | |
# 'make = SOME_MODULE.instrument_make:wrapper', | |
# ], | |
# }, | |
import re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import collections | |
import datetime | |
import os | |
import sys | |
tz = datetime.timezone(offset=datetime.timedelta(hours=-5)) | |
logfile = os.path.expanduser("~/context-switches.log") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function git_default_branch { | |
# Guess the name of the remote -- either origin or the first other remote | |
guessed_remote="$( | |
( | |
git remote | grep -P '^origin$' | |
git remote | grep -P '^origin$' -v | |
) | head -n1 | tr -d '\n' | |
)" | |
git symbolic-ref "refs/remotes/$guessed_remote/HEAD" \ | |
| sed 's|^refs/remotes/[^/]\+/||' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Build and display a graph of classes in a module. | |
Call from virtualenv of repo you're inspecting. | |
Example call, from inside edx-platform: | |
DJANGO_SETTINGS_MODULE=lms.envs.test python3 ./class_graph.py xmodule.modulestore BulkOperationsMixin | dot -Tsvg > BulkOperationsMixin.svg | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# This script records an action we took to leave a comment on (almost) | |
# every open edx-platform PR to let people know that they needed to | |
# rebase onto master (or merge it into their branch) to avoid breaking | |
# the build. | |
# | |
# The script requires a Github access token and finds all open PRs | |
# against master on edx-platform which do not have a specific commit | |
# in their ancestors, then leaves a comment on each one. This should | |
# be done from a bot account; the bot will then be subscribed to all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -Prl 'JWT_PUBLIC_SIGNING_JWK_SET(?!.*\}\})' ~/edx-repos/*-internal | while IFS= read -r fp; do | |
cat -- "$fp" | yq '.. | .JWT_PUBLIC_SIGNING_JWK_SET? | select(. != null)' -r | jq . -c --sort-keys || echo "Error in file $fp" | |
done | sort | uniq -c | sort -rn | less -Sn |
OlderNewer