Skip to content

Commit

Permalink
Merge branch 'master' into arbabkhalil/PSRE-1253
Browse files Browse the repository at this point in the history
  • Loading branch information
rgraber authored Jan 12, 2024
2 parents 52b99b9 + 87f7c03 commit 7b3dee5
Show file tree
Hide file tree
Showing 28 changed files with 440 additions and 348 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
# Adding new check for github-actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
reviewers:
- "openedx/arbi-bom"
19 changes: 19 additions & 0 deletions .github/workflows/add-depr-ticket-to-depr-board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Run the workflow that adds new tickets that are either:
# - labelled "DEPR"
# - title starts with "[DEPR]"
# - body starts with "Proposal Date" (this is the first template field)
# to the org-wide DEPR project board

name: Add newly created DEPR issues to the DEPR project board

on:
issues:
types: [opened]

jobs:
routeissue:
uses: openedx/.github/.github/workflows/add-depr-ticket-to-depr-board.yml@master
secrets:
GITHUB_APP_ID: ${{ secrets.GRAPHQL_AUTH_APP_ID }}
GITHUB_APP_PRIVATE_KEY: ${{ secrets.GRAPHQL_AUTH_APP_PEM }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ISSUE_BOT_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/add-remove-label-on-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This workflow runs when a comment is made on the ticket
# If the comment starts with "label: " it tries to apply
# the label indicated in rest of comment.
# If the comment starts with "remove label: ", it tries
# to remove the indicated label.
# Note: Labels are allowed to have spaces and this script does
# not parse spaces (as often a space is legitimate), so the command
# "label: really long lots of words label" will apply the
# label "really long lots of words label"

name: Allows for the adding and removing of labels via comment

on:
issue_comment:
types: [created]

jobs:
add_remove_labels:
uses: openedx/.github/.github/workflows/add-remove-label-on-comment.yml@master

10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [quality, django32, django40, check_keywords]
toxenv: [quality, django32, django42, check_keywords]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -36,8 +36,8 @@ jobs:
run: tox

- name: Run Coverage
if: matrix.python-version == '3.8' && matrix.toxenv=='django32'
uses: codecov/codecov-action@v1
if: matrix.python-version == '3.8' && matrix.toxenv=='django42'
uses: codecov/codecov-action@v3
with:
flags: unittests
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ on:

jobs:
commitlint:
uses: edx/.github/.github/workflows/commitlint.yml@master
uses: openedx/.github/.github/workflows/commitlint.yml@master
4 changes: 2 additions & 2 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/self-assign-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This workflow runs when a comment is made on the ticket
# If the comment starts with "assign me" it assigns the author to the
# ticket (case insensitive)

name: Assign comment author to ticket if they say "assign me"
on:
issue_comment:
types: [created]

jobs:
self_assign_by_comment:
uses: openedx/.github/.github/workflows/self-assign-issue.yml@master
2 changes: 1 addition & 1 deletion .github/workflows/upgrade-python-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
requirements_bot_github_email: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }}
edx_smtp_username: ${{ secrets.EDX_SMTP_USERNAME }}
edx_smtp_password: ${{ secrets.EDX_SMTP_PASSWORD }}
uses: edx/.github/.github/workflows/upgrade-python-requirements.yml@master
uses: openedx/.github/.github/workflows/upgrade-python-requirements.yml@master
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ Change Log

.. There should always be an "Unreleased" section for changes pending release.
[2.3.0] - 2023-08-02
====================

* Added support for Django 4.2

[2.2.0] - 2022-01-20
====================

Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,19 @@ coverage: clean ## generate and view HTML coverage report
py.test --cov-report html
$(BROWSER) htmlcov/index.html

COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt
.PHONY: $(COMMON_CONSTRAINTS_TXT)
$(COMMON_CONSTRAINTS_TXT):
wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)"

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
upgrade: $(COMMON_CONSTRAINTS_TXT)
## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -q pip-tools
pip-compile --upgrade --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -qr requirements/pip.txt
pip install -qr requirements/pip-tools.txt
pip-compile --upgrade -o requirements/dev.txt requirements/base.in requirements/dev.in requirements/quality.in
pip-compile --upgrade -o requirements/quality.txt requirements/quality.in
pip-compile --upgrade -o requirements/test.txt requirements/base.in requirements/test.in
Expand Down
16 changes: 7 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,21 +116,19 @@ How To Contribute

Contributions are very welcome.

Please read `How To Contribute <https://github.com/edx/edx-platform/blob/master/CONTRIBUTING.rst>`_ for details.
Please read `How To Contribute <https://github.com/openedx/.github/blob/master/CONTRIBUTING.md>`_ for details.

Even though they were written with ``edx-platform`` in mind, the guidelines
should be followed for Open edX code in general.

PR description template should be automatically applied if you are sending PR from GitHub interface; otherwise you
can find it it at `PULL_REQUEST_TEMPLATE.md <https://github.com/edx/help-tokens/blob/master/.github/PULL_REQUEST_TEMPLATE.md>`_
can find it it at `PULL_REQUEST_TEMPLATE.md <https://github.com/openedx/help-tokens/blob/master/.github/PULL_REQUEST_TEMPLATE.md>`_

Issue report template should be automatically applied if you are sending it from GitHub UI as well; otherwise you
can find it at `ISSUE_TEMPLATE.md <https://github.com/edx/help-tokens/blob/master/.github/ISSUE_TEMPLATE.md>`_
can find it at `ISSUE_TEMPLATE.md <https://github.com/openedx/help-tokens/blob/master/.github/ISSUE_TEMPLATE.md>`_

Reporting Security Issues
*************************

Please do not report security issues in public. Please email security@edx.org.
Please do not report security issues in public. Please email security@openedx.org.

Getting Help
************
Expand All @@ -145,8 +143,8 @@ refer to this `list of resources`_ if you need any assistance.
:target: https://pypi.python.org/pypi/help-tokens/
:alt: PyPI

.. |ci-badge| image:: https://github.com/edx/help-tokens/workflows/Python%20CI/badge.svg?branch=master
:target: https://github.com/edx/help-tokens/actions?query=workflow%3A%22Python+CI%22
.. |ci-badge| image:: https://github.com/openedx/help-tokens/workflows/Python%20CI/badge.svg?branch=master
:target: https://github.com/openedx/help-tokens/actions?query=workflow%3A%22Python+CI%22
:alt: CI

.. |codecov-badge| image:: http://codecov.io/github/edx/help-tokens/coverage.svg?branch=master
Expand All @@ -158,6 +156,6 @@ refer to this `list of resources`_ if you need any assistance.
:alt: Supported Python versions

.. |license-badge| image:: https://img.shields.io/github/license/edx/help-tokens.svg
:target: https://github.com/edx/help-tokens/blob/master/LICENSE.txt
:target: https://github.com/openedx/help-tokens/blob/master/LICENSE.txt
:alt: License

4 changes: 1 addition & 3 deletions help_tokens/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

from .context_processor import context_processor

__version__ = '2.2.0'

default_app_config = 'help_tokens.apps.HelpTokensConfig' # pylint: disable=invalid-name
__version__ = '2.3.1'
2 changes: 1 addition & 1 deletion help_tokens/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def get_config_value(self, section_name, option, default_option="default"):
def url_for_token(self, token):
"""Find the full URL for a help token."""
book_url = self.get_config_value("pages", token)
book, _, url_tail = book_url.partition(':') # pylint: disable=no-member
book, _, url_tail = book_url.partition(':')
book_base = settings.HELP_TOKENS_BOOKS[book]

url = book_base
Expand Down
Loading

0 comments on commit 7b3dee5

Please sign in to comment.