Skip to content

Commit

Permalink
Merge branch 'master' into jenkins/rsgraber/advertise-constraints-in-…
Browse files Browse the repository at this point in the history
…setup-py-a05c98c
  • Loading branch information
UsamaSadiq authored Feb 19, 2024
2 parents 50d49ee + 08db0e3 commit ff03068
Show file tree
Hide file tree
Showing 49 changed files with 529 additions and 653 deletions.
8 changes: 4 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ** DO NOT EDIT THIS FILE **
# ***************************
#
# This file was generated by edx-lint: https://github.com/edx/edx-lint
# 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
Expand All @@ -28,7 +28,7 @@
# CENTRAL CHANGE:
#
# 1. Edit the .editorconfig file in the edx-lint repo at
# https://github.com/edx/edx-lint/blob/master/edx_lint/files/.editorconfig
# https://github.com/openedx/edx-lint/blob/master/edx_lint/files/.editorconfig
#
# 2. install the updated version of edx-lint (in edx-lint):
#
Expand Down Expand Up @@ -64,7 +64,7 @@
# SERIOUSLY.
#
# ------------------------------
# Generated by edx-lint version: 5.1.0
# Generated by edx-lint version: 5.2.5
# ------------------------------
[*]
end_of_line = lf
Expand Down Expand Up @@ -97,4 +97,4 @@ max_line_length = 72
[*.rst]
max_line_length = 79

# fd998e7f45c151ca267f60fe64480f1e44da2d77
# f2f02689fced7a2e0c62c2f9803184114dc2ae4b
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

6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [pylint, pylint24]
toxenv: [py38, pylint]

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 Down
31 changes: 2 additions & 29 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,10 @@
# Run commitlint on the commit messasges in a pull request.
# Run commitlint on the commit messages in a pull request.

name: Lint Commit Messages

on:
- pull_request

defaults:
run:
shell: bash

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Check for a local configuration file
id: check
run: |
if [[ ! -f commitlint.config.js ]]; then
echo "::set-output name=need::yes"
fi
- name: Download configuration if needed
if: steps.check.outputs.need == 'yes'
uses: wei/wget@v1
with:
args: -O commitlint.config.js https://raw.githubusercontent.com/edx/edx-lint/HEAD/edx_lint/files/commitlint.config.js

- name: Run commitlint
uses: wagoid/commitlint-github-action@v4
with:
helpURL: https://open-edx-proposals.readthedocs.io/en/latest/oep-0051-bp-conventional-commits.html
uses: openedx/.github/.github/workflows/commitlint.yml@master
6 changes: 3 additions & 3 deletions .github/workflows/pypi-publish.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 All @@ -25,7 +25,7 @@ jobs:
run: python setup.py sdist bdist_wheel

- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_UPLOAD_TOKEN }}
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
80 changes: 18 additions & 62 deletions .github/workflows/upgrade-python-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,23 @@ name: Upgrade Requirements

on:
schedule:
# will start the job at 03:00 UTC every Monday
- cron: "0 3 * * 1"
- cron: "0 3 * * 1"
workflow_dispatch:
inputs:
branch:
description: "Target branch to create requirements PR against"
required: true
default: 'master'

inputs:
branch:
description: 'Target branch to create requirements PR against'
required: true
default: 'master'
jobs:
upgrade_requirements:
runs-on: ubuntu-20.04

strategy:
matrix:
python-version: ["3.8"]

steps:
- name: setup target branch
run: echo "target_branch=$(if ['${{ github.event.inputs.branch }}' = '']; then echo 'master'; else echo '${{ github.event.inputs.branch }}'; fi)" >> $GITHUB_ENV

- uses: actions/checkout@v1
with:
ref: ${{ env.target_branch }}

- name: setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: make upgrade
run: |
cd $GITHUB_WORKSPACE
make upgrade
- name: setup testeng-ci
run: |
git clone https://github.com/edx/testeng-ci.git
cd $GITHUB_WORKSPACE/testeng-ci
pip install -r requirements/base.txt
- name: create pull request
env:
GITHUB_TOKEN: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }}
GITHUB_USER_EMAIL: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }}
run: |
cd $GITHUB_WORKSPACE/testeng-ci
python -m jenkins.pull_request_creator --repo-root=$GITHUB_WORKSPACE \
--target-branch="${{ env.target_branch }}" --base-branch-name="upgrade-python-requirements" \
--commit-message="chore: Updating Python Requirements" --pr-title="Python Requirements Update" \
--pr-body="Python requirements update.Please review the [changelogs](https://openedx.atlassian.net/wiki/spaces/TE/pages/1001521320/Python+Package+Changelogs) for the upgraded packages." \
--user-reviewers="" --team-reviewers="arbi-bom" --delete-old-pull-requests
- name: Send failure notification
if: ${{ failure() }}
uses: dawidd6/action-send-mail@v3
with:
server_address: email-smtp.us-east-1.amazonaws.com
server_port: 465
username: ${{secrets.EDX_SMTP_USERNAME}}
password: ${{secrets.EDX_SMTP_PASSWORD}}
subject: Upgrade python requirements workflow failed in ${{github.repository}}
to: [email protected]
from: github-actions <[email protected]>
body: Upgrade python requirements workflow in ${{github.repository}} failed! For details see "github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
call-upgrade-python-requirements-workflow:
with:
branch: ${{ github.event.inputs.branch }}
team_reviewers: "arbi-bom"
email_address: [email protected]
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 }}
uses: edx/.github/.github/workflows/upgrade-python-requirements.yml@master
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ coverage.xml
*~
build/
dist/
.DS_Store

.eggs/

Expand Down
53 changes: 51 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,55 @@ Change Log
Unreleased
~~~~~~~~~~

5.3.5 - 2023-04-29
~~~~~~~~~~~~~~~~~~

* added support for pylint 3

5.3.2 - 2023-02-15
~~~~~~~~~~~~~~~~~~

* Removed pylint<2.15 constraint and updated tests for new version
* Removed CI tests for old pylint versions

5.3.1 - 2023-02-14
~~~~~~~~~~~~~~~~~~

* Disabled new warning from pylint 2.16.0: broad-exception-raised

5.3.0 - 2022-09-15
~~~~~~~~~~~~~~~~~~

* Improvements to the ``check`` command:

- It now exits with a failure status if something is wrong.
- With no file name arguments, it will check all of your files that edx_lint
can write.
- The messages are less chatty.

5.2.5 - 2022-09-08
~~~~~~~~~~~~~~~~~~

* Updated GitHub references from the ``edx`` GitHub organization to ``openedx``.

5.2.4 - 2022-06-10
~~~~~~~~~~~~~~~~~~

* Updated `pylintrc` template for `edx_lint write pylintrc` command for `pylint>=2.14.0`.

5.2.3 - 2022-06-09
~~~~~~~~~~~~~~~~~~

* Removed support of LegacyWaffle* checks, since the classes no longer exist.
* Removed deleted pylint messages from common pylintrc file

5.2.2 - 2022-03-25
~~~~~~~~~~~~~~~~~~

* fixed import path of a pylint protected function to make
edx-lint compatible with `pylint==2.13.0`.
* Updated testenvs in both tox and CI

5.2.1 - 2021-10-26
~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -103,7 +152,7 @@ edx-lint will now ignore the logging-fstring-interpolation warning in pylint.
* Here is a `link to additional commits`_ that may or may not warrant changelog entries, but were committed before reminding developers to update the changelog.

.. _link to additional commits: https://github.com/edx/edx-lint/compare/1.5.2...a29f286
.. _link to additional commits: https://github.com/openedx/edx-lint/compare/1.5.2...a29f286

[1.5.2] - 2020-08-20
~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -137,4 +186,4 @@ Older versions

Older versions were documented as `Github releases`_ only.

.. _Github releases: https://github.com/edx/edx-lint/releases
.. _Github releases: https://github.com/openedx/edx-lint/releases
9 changes: 0 additions & 9 deletions CONTRIBUTING.rst

This file was deleted.

6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ help: ## display this help message
@grep '^[a-zA-Z]' $(MAKEFILE_LIST) | sort | awk -F ':.*?## ' 'NF==2 {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'

test: ## run all the tests
tox -e py38-pylint24,coverage
tox

pylint: ## check our own code with pylint
tox -e pylint
Expand All @@ -28,8 +28,10 @@ requirements: ## install the developer requirements
compile-requirements: export CUSTOM_COMPILE_COMMAND=make upgrade
compile-requirements: ## compile the requirements/*.txt files with the latest packages satisfying requirements/*.in
# Make sure to compile files after any other files they include!
pip-compile -v --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
pip-compile -v ${COMPILE_OPTS} --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
pip-compile -v ${COMPILE_OPTS} -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -qr requirements/pip.txt
pip install -qr requirements/pip-tools.txt
pip-compile -v ${COMPILE_OPTS} -o requirements/base.txt requirements/base.in
pip-compile -v ${COMPILE_OPTS} -o requirements/dev.txt requirements/dev.in
pip-compile -v ${COMPILE_OPTS} -o requirements/test.txt requirements/test.in
Expand Down
9 changes: 3 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ How To Contribute

Contributions are very welcome.

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

Even though it was written with ``edx-platform`` in mind, the guidelines
should be followed for Open edX code in general.
Please read `How To Contribute <https://github.com/openedx/.github/blob/master/CONTRIBUTING.md>`_ for details.


Getting Help
Expand All @@ -113,5 +110,5 @@ The Open edX project has resources for developer support on the `Getting Help`_

.. _Getting Help: https://open.edx.org/getting-help

.. |CI| image:: https://github.com/edx/edx-lint/workflows/Python%20CI/badge.svg?branch=master
.. _CI: https://github.com/edx/edx-lint/actions?query=workflow%3A%22Python+CI%22
.. |CI| image:: https://github.com/openedx/edx-lint/workflows/Python%20CI/badge.svg?branch=master
.. _CI: https://github.com/openedx/edx-lint/actions?query=workflow%3A%22Python+CI%22
Loading

0 comments on commit ff03068

Please sign in to comment.