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

fix: listen to audio display + ci #62

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 0 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,3 @@ jobs:
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pypi:
needs: Release
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):')
concurrency: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: python3 -m pip install --upgrade build && python3 -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build PyPi

# Only trigger, when the build workflow succeeded
on:
workflow_run:
workflows: ["CI"]
types:
- completed

jobs:
pypi:
concurrency: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: python3 -m pip install --upgrade build && python3 -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
4 changes: 2 additions & 2 deletions hebikani/hebikani.py
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ def process_answer(self, question: Question, answer_type: AnswerType):
elif answer_type == AnswerType.INEXACT:
print(
"\nTry again. We are looking for the",
f"{question.primary.type}.",
f"{question.primary.type}.\n",
)
# If the user answers incorrectly, we show the correct answer
else:
Expand Down Expand Up @@ -1414,7 +1414,7 @@ def ask_audio(self, question: Question):
and question.question_type == QuestionType.READING
and (
self.client.options.autoplay
or input("Would you like to hear the audio? [y/N] ") in ["y", "Y"]
or input("\nWould you like to hear the audio? [y/N] ") in ["y", "Y"]
)
):
audio = self.select_audio(question.subject.audios)
Expand Down