diff --git a/.github/workflows/add-remove-label-on-comment.yml b/.github/workflows/add-remove-label-on-comment.yml index 0f369db7d2..a658064f09 100644 --- a/.github/workflows/add-remove-label-on-comment.yml +++ b/.github/workflows/add-remove-label-on-comment.yml @@ -17,4 +17,3 @@ on: jobs: add_remove_labels: uses: openedx/.github/.github/workflows/add-remove-label-on-comment.yml@master - diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5972eb8083..ff60960a1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: branches: [master] pull_request: branches: - - '**' + - "**" jobs: run_tests: @@ -15,44 +15,44 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ['3.8', '3.11'] + python-version: ["3.8", "3.11"] node-version: [18, 20] toxenv: [quality, js, django42] continue-on-error: ${{ matrix.node == 20 }} steps: - - uses: actions/checkout@v4 - - name: setup python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install pip - run: pip install -r requirements/pip.txt - - - name: Set env variable - run: export AWS_CONFIG_FILE=/dev/null - - - name: Install Dependencies - run: pip install -r requirements/ci.txt - - - name: Install GNU gettext - run: sudo apt-get install gettext - - - name: Setup Node - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - - - name: Run Tests - env: - TOXENV: ${{ matrix.toxenv }} - run: tox - - - name: Run Coverage - if: matrix.python-version == '3.8' && matrix.toxenv=='django42' - uses: codecov/codecov-action@v4 - with: - flags: unittests - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} + - uses: actions/checkout@v4 + - name: setup python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install pip + run: pip install -r requirements/pip.txt + + - name: Set env variable + run: export AWS_CONFIG_FILE=/dev/null + + - name: Install Dependencies + run: pip install -r requirements/ci.txt + + - name: Install GNU gettext + run: sudo apt-get install gettext + + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + + - name: Run Tests + env: + TOXENV: ${{ matrix.toxenv }} + run: tox + + - name: Run Coverage + if: matrix.python-version == '3.8' && matrix.toxenv=='django42' + uses: codecov/codecov-action@v4 + with: + flags: unittests + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 46b87e3af4..dddc8ab9e6 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -3,10 +3,9 @@ name: Publish package to PyPi on: push: tags: - - '*' + - "*" jobs: - push: runs-on: ubuntu-latest diff --git a/.github/workflows/upgrade-python-requirements.yml b/.github/workflows/upgrade-python-requirements.yml index 5d97885974..cca44ad808 100644 --- a/.github/workflows/upgrade-python-requirements.yml +++ b/.github/workflows/upgrade-python-requirements.yml @@ -8,7 +8,7 @@ on: branch: description: "Target branch against which to create requirements PR" required: true - default: 'master' + default: "master" jobs: call-upgrade-python-requirements-workflow: @@ -24,4 +24,4 @@ jobs: 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 }} \ No newline at end of file + edx_smtp_password: ${{ secrets.EDX_SMTP_PASSWORD }} diff --git a/Makefile b/Makefile index 68cc2a6367..4d015dd14e 100644 --- a/Makefile +++ b/Makefile @@ -85,9 +85,9 @@ update-npm-requirements: ## update NPM requrements static: ## Webpack JavaScript and SASS source files npm run build -################ -#Translations Handling -################ +####################### +# Translations Handling +####################### extract_translations: ## creates the django-partial.po & django-partial.mo files cd ./openassessment && django-admin makemessages -l en -v1 -d django @@ -113,9 +113,9 @@ push_translations: ## push source translation files (.po) to Transifex check_translations_up_to_date: extract_translations compile_translations generate_dummy_translations detect_changed_source_translations ## extract, compile, and check if translation files are up-to-date -################ -#Tests and checks -################ +################## +# Tests and checks +################## quality: ## Run linting and code quality checks npm run lint @@ -142,9 +142,9 @@ install-osx-requirements: ## Install OSX specific requirements using Homebrew brew install gettext brew link gettext --force -################## -#Devstack commands -################## +################### +# Devstack commands +################### install-local-ora: ## installs your local ORA2 code into the LMS and Studio python virtualenvs docker exec -t edx.devstack.lms bash -c '. /edx/app/edxapp/venvs/edxapp/bin/activate && cd /edx/app/edxapp/edx-platform && pip uninstall -y ora2 && pip install -e /edx/src/edx-ora2 && pip freeze | grep ora2' diff --git a/docs/conf.py b/docs/conf.py index 5889d686a9..3f7b960f52 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,35 +6,36 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information import os +from datetime import datetime -project = 'edx-ora2' -copyright = '2023, Open edX Community' -author = 'Open edX Community' -release = 'latest' +project = "edx-ora2" +current_year = datetime.now().year +copyright = f"{current_year}, Open edX Community" +author = "Open edX Community" +release = "latest" # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [ - 'sphinxcontrib.contentui', - 'sphinx_copybutton', - 'sphinx.ext.graphviz', - 'sphinxcontrib.mermaid', + "sphinxcontrib.contentui", + "sphinx_copybutton", + "sphinx.ext.graphviz", + "sphinxcontrib.mermaid", ] -templates_path = ['_templates'] -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +templates_path = ["_templates"] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] -language = 'en' +language = "en" # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -html_theme = 'sphinx_book_theme' -html_static_path = ['_static'] +html_theme = "sphinx_book_theme" +html_static_path = ["_static"] html_theme_options = { - "repository_url": "https://github.com/openedx/edx-ora2", "repository_branch": "master", "path_to_docs": "docs/", @@ -61,7 +62,7 @@ rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/" >Creative Commons Attribution-ShareAlike 4.0 International License. - """ + """, } # Note the logo won't show up properly yet because there is an upstream @@ -72,8 +73,8 @@ html_favicon = "https://logos.openedx.org/open-edx-favicon.ico" # Set the DJANGO_SETTINGS_MODULE if it's not set. -if not os.environ.get('DJANGO_SETTINGS_MODULE'): - os.environ['DJANGO_SETTINGS_MODULE'] = 'settings.base' +if not os.environ.get("DJANGO_SETTINGS_MODULE"): + os.environ["DJANGO_SETTINGS_MODULE"] = "settings.base" # -- Read the Docs Specific Configuration # Define the canonical URL if you are using a custom domain on Read the Docs @@ -84,4 +85,3 @@ if "html_context" not in globals(): html_context = {} html_context["READTHEDOCS"] = True -