-
Notifications
You must be signed in to change notification settings - Fork 3
Core Structure for supporting multiple XBlocks #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
82a7f82
chore: initial commit
irtazaakram c0a4db7
fix: review changes
irtazaakram 7835810
fix: errors
irtazaakram 306dc59
Merge branch 'main' into core-xblocks
irtazaakram 7b1cee1
chore: add xblock script
irtazaakram 1ae58cb
fix: remove annotatable xblock
irtazaakram 27e052b
fix: review comments
irtazaakram 5dde2ae
fix: xblock path
irtazaakram 26207d4
fix: xblock path
irtazaakram b5c2a62
fix: add templates for package_data
irtazaakram 0d2006a
fix: added translation & review changes
irtazaakram 656d0e5
Merge branch 'main' into core-xblocks
irtazaakram 0d098f2
fix: testing issues
irtazaakram e3fb58a
fix: create xblock script
irtazaakram a1890e4
fix: translations
irtazaakram 439df11
fix: translation issues
irtazaakram 949cc02
fix: test issues
irtazaakram 028421f
fix: add all xblocks & update docker
irtazaakram 6eb8664
Merge branch 'main' into core-xblocks
irtazaakram f71c4f4
fix: review changes
irtazaakram bc8c2df
fix: cache ci issues
irtazaakram 928ef82
fix: review changes
irtazaakram de6a0dc
fix: review changes
irtazaakram 7650053
fix: refactor is_extracted
irtazaakram 844db57
fix: readme
irtazaakram File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[run] | ||
branch = True | ||
source = xblocks_contrib |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dockerfile |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# *************************** | ||
# ** DO NOT EDIT THIS FILE ** | ||
# *************************** | ||
# | ||
# This file was generated by edx-lint: https://github.com/openedx/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. | ||
# | ||
# Note: If your .editorconfig file is simply out-of-date relative to the latest | ||
# .editorconfig in edx-lint, ensure you have the latest edx-lint installed | ||
# and then follow the steps for a "LOCAL CHANGE". | ||
# | ||
# 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/openedx/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): | ||
# | ||
# $ 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 and | ||
# publish the new version. | ||
# | ||
# 5. In your local repo, install the newer version of edx-lint. | ||
# | ||
# 6. Run: | ||
# | ||
# $ 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. | ||
# | ||
# ------------------------------ | ||
# Generated by edx-lint version: 5.2.5 | ||
# ------------------------------ | ||
[*] | ||
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 | ||
|
||
[COMMIT_EDITMSG] | ||
max_line_length = 72 | ||
|
||
[*.rst] | ||
max_line_length = 79 | ||
|
||
# f2f02689fced7a2e0c62c2f9803184114dc2ae4b |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
**Merge checklist:** | ||
Check off if complete *or* not applicable: | ||
- [ ] Version bumped | ||
- [ ] Changelog record added | ||
- [ ] Documentation updated (not only docstrings) | ||
- [ ] Fixup commits are squashed away | ||
- [ ] Unit tests added/updated | ||
- [ ] Manual testing instructions provided | ||
- [ ] Noted any: Concerns, dependencies, migration issues, deadlines, tickets |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Python CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
|
||
jobs: | ||
run_tests: | ||
name: tests | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-20.04] | ||
python-version: ['3.11', '3.12'] | ||
toxenv: [quality, docs, django42, django50] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install pip | ||
run: pip install -r requirements/pip.txt | ||
|
||
- name: Install Dependencies | ||
run: pip install -r requirements/ci.txt | ||
|
||
- name: Run Tests | ||
env: | ||
TOXENV: ${{ matrix.toxenv }} | ||
run: tox | ||
|
||
- name: Run coverage | ||
if: matrix.python-version == '3.11' && matrix.toxenv == 'django42' | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
flags: unittests | ||
fail_ci_if_error: true |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Publish package to PyPi | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
|
||
push: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install pip | ||
run: pip install -r requirements/pip.txt | ||
|
||
- name: Build package | ||
run: python setup.py sdist bdist_wheel | ||
|
||
- name: Publish to PyPi | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_UPLOAD_TOKEN }} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Upgrade Python Requirements | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * 1" | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: "Target branch against which to create requirements PR" | ||
required: true | ||
default: 'main' | ||
|
||
jobs: | ||
call-upgrade-python-requirements-workflow: | ||
uses: openedx/.github/.github/workflows/upgrade-python-requirements.yml@master | ||
with: | ||
branch: ${{ github.event.inputs.branch || 'main' }} | ||
# optional parameters below; fill in if you'd like github or email notifications | ||
# user_reviewers: "" | ||
# team_reviewers: "" | ||
# email_address: "" | ||
# send_success_notification: false | ||
secrets: | ||
requirements_bot_github_token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }} | ||
requirements_bot_github_email: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }} | ||
edx_smtp_username: ${{ secrets.EDX_SMTP_USERNAME }} | ||
edx_smtp_password: ${{ secrets.EDX_SMTP_PASSWORD }} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
*.py[cod] | ||
__pycache__ | ||
.pytest_cache | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
/dist | ||
/build | ||
/eggs | ||
/parts | ||
/bin | ||
/var | ||
/sdist | ||
/develop-eggs | ||
/.installed.cfg | ||
/lib | ||
/lib64 | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
.cache/ | ||
.pytest_cache/ | ||
.coverage | ||
.coverage.* | ||
.tox | ||
coverage.xml | ||
htmlcov/ | ||
|
||
# Virtual environments | ||
/venv/ | ||
/venv-*/ | ||
/.venv/ | ||
/.venv-*/ | ||
|
||
# The Silver Searcher | ||
.agignore | ||
|
||
# OS X artifacts | ||
*.DS_Store | ||
|
||
# Logging | ||
log/ | ||
logs/ | ||
chromedriver.log | ||
ghostdriver.log | ||
|
||
# Complexity | ||
output/*.html | ||
output/*/index.html | ||
|
||
# Sphinx | ||
docs/_build | ||
docs/modules.rst | ||
docs/xblocks_contrib.rst | ||
docs/xblocks_contrib.*.rst | ||
|
||
# Private requirements | ||
requirements/private.in | ||
requirements/private.txt |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# .readthedocs.yml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/conf.py | ||
fail_on_warning: true | ||
|
||
# Set the version of python needed to build these docs. | ||
build: | ||
os: "ubuntu-22.04" | ||
tools: | ||
python: "3.11" | ||
|
||
python: | ||
install: | ||
- requirements: requirements/doc.txt | ||
|
||
# This will pip install this repo into the python environment | ||
# if you are using this in a repo that is not pip installable | ||
# then you should remove the following two lines. | ||
- method: pip | ||
path: . |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Change Log | ||
########## | ||
|
||
.. | ||
All enhancements and patches to xblocks-contrib will be documented | ||
in this file. It adheres to the structure of https://keepachangelog.com/ , | ||
but in reStructuredText instead of Markdown (for ease of incorporation into | ||
Sphinx documentation and the PyPI description). | ||
|
||
This project adheres to Semantic Versioning (https://semver.org/). | ||
|
||
.. There should always be an "Unreleased" section for changes pending release. | ||
|
||
Unreleased | ||
********** | ||
|
||
* | ||
|
||
0.1.0 – 2024-07-04 | ||
********************************************** | ||
|
||
Added | ||
===== | ||
|
||
* First release on PyPI. |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM openedx/xblock-sdk | ||
RUN mkdir -p /usr/local/src/xblocks-contrib | ||
VOLUME ["/usr/local/src/xblocks-contrib"] | ||
RUN apt-get update && apt-get install -y gettext | ||
RUN echo "pip install -r /usr/local/src/xblocks-contrib/requirements.txt" >> /usr/local/src/xblock-sdk/install_and_run_xblock.sh | ||
RUN echo "pip install -e /usr/local/src/xblocks-contrib" >> /usr/local/src/xblock-sdk/install_and_run_xblock.sh | ||
RUN echo "cd /usr/local/src/xblocks-contrib && make compile_translations && cd /usr/local/src/xblock-sdk" >> /usr/local/src/xblock-sdk/install_and_run_xblock.sh | ||
RUN echo "exec python /usr/local/src/xblock-sdk/manage.py \"\$@\"" >> /usr/local/src/xblock-sdk/install_and_run_xblock.sh | ||
RUN chmod +x /usr/local/src/xblock-sdk/install_and_run_xblock.sh | ||
ENTRYPOINT ["/bin/bash", "/usr/local/src/xblock-sdk/install_and_run_xblock.sh"] | ||
CMD ["runserver", "0.0.0.0:8000"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.