Skip to content
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

Core Structure for supporting multiple XBlocks #2

Merged
merged 25 commits into from
Oct 7, 2024
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: test issues
  • Loading branch information
irtazaakram committed Aug 29, 2024
commit 949cc02bd7aea2798660e392e5b1c97a737fa584
9 changes: 5 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -43,6 +43,7 @@ deps =
allowlist_externals =
mkdir
commands =
pip install -e .
mkdir -p var
pytest {posargs}

@@ -78,8 +79,8 @@ allowlist_externals =
deps =
-r{toxinidir}/requirements/quality.txt
commands =
pylint xblocks_contrib manage.py
pycodestyle xblocks_contrib manage.py
pydocstyle xblocks_contrib manage.py
isort --check-only --diff xblocks_contrib manage.py
pylint xblocks_contrib
pycodestyle xblocks_contrib
pydocstyle xblocks_contrib
isort --check-only --diff xblocks_contrib
make selfcheck

Unchanged files with check annotations Beta

Create primary view of the PollBlock, shown to students when viewing courses.
"""
if context:
pass # TO-DO: do something based on the context.

Check warning on line 41 in xblocks_contrib/poll/poll.py

Codecov / codecov/patch

xblocks_contrib/poll/poll.py#L41

Added line #L41 was not covered by tests
frag = Fragment()
frag.add_content(resource_loader.render_django_template(
Increments data. An example handler.
"""
if suffix:
pass # TO-DO: Use the suffix when storing data.

Check warning on line 65 in xblocks_contrib/poll/poll.py

Codecov / codecov/patch

xblocks_contrib/poll/poll.py#L65

Added line #L65 was not covered by tests
# Just to show data coming in...
assert data["hello"] == "world"

Check warning on line 67 in xblocks_contrib/poll/poll.py

Codecov / codecov/patch

xblocks_contrib/poll/poll.py#L67

Added line #L67 was not covered by tests
self.count += 1
return {"count": self.count}

Check warning on line 70 in xblocks_contrib/poll/poll.py

Codecov / codecov/patch

xblocks_contrib/poll/poll.py#L69-L70

Added lines #L69 - L70 were not covered by tests
# TO-DO: change this to create the scenarios you'd like to see in the
# workbench while developing your XBlock.
@staticmethod
def workbench_scenarios():
"""Create canned scenario for display in the workbench."""
return [

Check warning on line 77 in xblocks_contrib/poll/poll.py

Codecov / codecov/patch

xblocks_contrib/poll/poll.py#L77

Added line #L77 was not covered by tests
(
"PollBlock",
"""<poll_xblock/>
"""
Generate initial i18n with dummy method.
"""
return translation.gettext_noop("Dummy")

Check warning on line 99 in xblocks_contrib/poll/poll.py

Codecov / codecov/patch

xblocks_contrib/poll/poll.py#L99

Added line #L99 was not covered by tests