diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..d0fde72 --- /dev/null +++ b/.github/dependabot.yml @@ -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" diff --git a/.github/workflows/add-depr-ticket-to-depr-board.yml b/.github/workflows/add-depr-ticket-to-depr-board.yml new file mode 100644 index 0000000..250e394 --- /dev/null +++ b/.github/workflows/add-depr-ticket-to-depr-board.yml @@ -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 }} diff --git a/.github/workflows/add-remove-label-on-comment.yml b/.github/workflows/add-remove-label-on-comment.yml new file mode 100644 index 0000000..0f369db --- /dev/null +++ b/.github/workflows/add-remove-label-on-comment.yml @@ -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 + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fefec36..135cfe4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} @@ -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 diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index e2b0661..fec11d6 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -7,4 +7,4 @@ on: jobs: commitlint: - uses: edx/.github/.github/workflows/commitlint.yml@master + uses: openedx/.github/.github/workflows/commitlint.yml@master diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index 585cd81..4358817 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -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 diff --git a/.github/workflows/self-assign-issue.yml b/.github/workflows/self-assign-issue.yml new file mode 100644 index 0000000..37522fd --- /dev/null +++ b/.github/workflows/self-assign-issue.yml @@ -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 diff --git a/.github/workflows/upgrade-python-requirements.yml b/.github/workflows/upgrade-python-requirements.yml index 5fb838d..6c6edfc 100644 --- a/.github/workflows/upgrade-python-requirements.yml +++ b/.github/workflows/upgrade-python-requirements.yml @@ -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 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 614219e..2bacd55 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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 ==================== diff --git a/Makefile b/Makefile index ef95aa3..54e1b6a 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.rst b/README.rst index 0515eb5..ec99622 100644 --- a/README.rst +++ b/README.rst @@ -116,21 +116,19 @@ How To Contribute Contributions are very welcome. -Please read `How To Contribute `_ for details. +Please read `How To Contribute `_ 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 `_ +can find it it at `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 `_ +can find it at `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 ************ @@ -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 @@ -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 diff --git a/help_tokens/__init__.py b/help_tokens/__init__.py index 78d5aa6..38fb5e7 100644 --- a/help_tokens/__init__.py +++ b/help_tokens/__init__.py @@ -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' diff --git a/help_tokens/core.py b/help_tokens/core.py index 6897c1c..64eac63 100644 --- a/help_tokens/core.py +++ b/help_tokens/core.py @@ -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 diff --git a/pylintrc b/pylintrc index 5507102..d7a19fe 100644 --- a/pylintrc +++ b/pylintrc @@ -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 @@ -28,7 +28,7 @@ # CENTRAL CHANGE: # # 1. Edit the pylintrc file in the edx-lint repo at -# https://github.com/edx/edx-lint/blob/master/edx_lint/files/pylintrc +# https://github.com/openedx/edx-lint/blob/master/edx_lint/files/pylintrc # # 2. install the updated version of edx-lint (in edx-lint): # @@ -64,7 +64,7 @@ # SERIOUSLY. # # ------------------------------ -# Generated by edx-lint version: 5.2.1 +# Generated by edx-lint version: 5.2.5 # ------------------------------ [MASTER] ignore = migrations @@ -102,20 +102,12 @@ enable = cell-var-from-loop, confusing-with-statement, continue-in-finally, - cyclical-import, dangerous-default-value, - dict-items-not-iterating, - dict-keys-not-iterating, - dict-values-not-iterating, duplicate-argument-name, duplicate-bases, duplicate-except, duplicate-key, - eq-without-hash, - exception-escape, - exception-message-attribute, expression-not-assigned, - filter-builtin-not-iterating, format-combined-specification, format-needs-mapping, function-redefined, @@ -123,33 +115,26 @@ enable = import-error, import-self, inconsistent-mro, - indexing-exception, inherit-non-class, init-is-generator, invalid-all-object, - invalid-encoded-data, invalid-format-index, invalid-length-returned, invalid-sequence-index, invalid-slice-index, invalid-slots-object, invalid-slots, - invalid-str-codec, invalid-unary-operand-type, logging-too-few-args, logging-too-many-args, logging-unsupported-format, lost-exception, - map-builtin-not-iterating, method-hidden, misplaced-bare-raise, misplaced-future, missing-format-argument-key, missing-format-attribute, missing-format-string-key, - missing-super-argument, - mixed-fomat-string, - model-unicode-not-callable, no-member, no-method-argument, no-name-in-module, @@ -158,8 +143,6 @@ enable = non-iterator-returned, non-parent-method-called, nonexistent-operator, - nonimplemented-raised, - nonstandard-exception, not-a-mapping, not-an-iterable, not-callable, @@ -167,35 +150,25 @@ enable = not-in-loop, pointless-statement, pointless-string-statement, - property-on-old-class, raising-bad-type, raising-non-exception, - raising-string, - range-builtin-not-iterating, redefined-builtin, - redefined-in-handler, redefined-outer-name, - redefined-variable-type, redundant-keyword-arg, - relative-import, repeated-keyword, return-arg-in-generator, return-in-init, return-outside-function, signature-differs, - slots-on-old-class, super-init-not-called, super-method-not-called, - super-on-old-class, syntax-error, - sys-max-int, test-inherits-tests, too-few-format-args, too-many-format-args, too-many-function-args, translation-of-non-string, truncated-format-string, - unbalance-tuple-unpacking, undefined-all-variable, undefined-loop-variable, undefined-variable, @@ -211,11 +184,8 @@ enable = used-before-assignment, using-constant-test, yield-outside-function, - zip-builtin-not-iterating, astroid-error, - django-not-available-placeholder, - django-not-available, fatal, method-check-failed, parse-error, @@ -237,7 +207,6 @@ enable = bad-classmethod-argument, bad-mcs-classmethod-argument, bad-mcs-method-argument, - bad-whitespace, bare-except, broad-except, consider-iterating-dictionary, @@ -247,16 +216,10 @@ enable = literal-used-as-attribute, logging-format-interpolation, logging-not-lazy, - metaclass-assignment, - model-has-unicode, - model-missing-unicode, - model-no-explicit-unicode, multiple-imports, multiple-statements, no-classmethod-decorator, no-staticmethod-decorator, - old-raise-syntax, - old-style-class, protected-access, redundant-unittest-assert, reimported, @@ -284,7 +247,6 @@ enable = wrong-import-position, missing-final-newline, - mixed-indentation, mixed-line-endings, trailing-newlines, trailing-whitespace, @@ -295,25 +257,7 @@ enable = deprecated-pragma, unrecognized-inline-option, useless-suppression, - - cmp-method, - coerce-method, - delslice-method, - dict-iter-method, - dict-view-method, - div-method, - getslice-method, - hex-method, - idiv-method, - next-method-called, - next-method-defined, - nonzero-method, - oct-method, - rdiv-method, - setslice-method, - using-cmp-argument, disable = - bad-continuation, bad-indentation, consider-using-f-string, duplicate-code, @@ -322,12 +266,7 @@ disable = global-statement, invalid-name, locally-disabled, - locally-enabled, - lowercase-l-suffix, - misplaced-comparison-constant, no-else-return, - no-init, - no-self-use, suppressed-message, too-few-public-methods, too-many-ancestors, @@ -346,54 +285,14 @@ disable = feature-toggle-needs-doc, illegal-waffle-usage, - apply-builtin, - backtick, - bad-python3-import, - basestring-builtin, - buffer-builtin, - cmp-builtin, - coerce-builtin, - deprecated-itertools-function, - deprecated-operator-function, - deprecated-str-translate-call, - deprecated-string-function, - deprecated-sys-function, - deprecated-types-field, - deprecated-urllib-function, - execfile-builtin, - file-builtin, - import-star-module-level, - input-builtin, - intern-builtin, - long-builtin, - long-suffix, - no-absolute-import, - non-ascii-bytes-literal, - old-division, - old-ne-operator, - old-octal-literal, - parameter-unpacking, - print-statement, - raw_input-builtin, - reduce-builtin, - reload-builtin, - round-builtin, - standarderror-builtin, - unichr-builtin, - unicode-builtin, - unpacking-in-except, - xrange-builtin, - logging-fstring-interpolation, [REPORTS] output-format = text -files-output = no reports = no score = no [BASIC] -bad-functions = map,filter,apply,input module-rgx = (([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ const-rgx = (([A-Z_][A-Z0-9_]*)|(__.*__)|log|urlpatterns)$ class-rgx = [A-Z_][a-zA-Z0-9]+$ @@ -413,7 +312,6 @@ docstring-min-length = 5 max-line-length = 120 ignore-long-lines = ^\s*(# )?((?)|(\.\. \w+: .*))$ single-line-if-stmt = no -no-space-check = trailing-comma,dict-separator max-module-lines = 1000 indent-string = ' ' @@ -484,4 +382,4 @@ int-import-graph = [EXCEPTIONS] overgeneral-exceptions = Exception -# 328afa875b05b4d6c38d033c86c057c92d34aab1 +# 264bfbfd3e646c58ffea0db9e4f1e268f0c8704d diff --git a/requirements/ci.in b/requirements/ci.in index ee2c001..91dbf54 100644 --- a/requirements/ci.in +++ b/requirements/ci.in @@ -4,4 +4,3 @@ codecov # Code coverage reporting tox # Virtualenv management for tests -tox-battery # Makes tox aware of requirements file changes diff --git a/requirements/ci.txt b/requirements/ci.txt index 263b4ac..460afa3 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,50 +1,52 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -certifi==2021.10.8 +cachetools==5.3.2 + # via tox +certifi==2023.11.17 # via requests -charset-normalizer==2.0.10 +chardet==5.2.0 + # via tox +charset-normalizer==3.3.2 # via requests -codecov==2.1.12 +codecov==2.1.13 # via -r requirements/ci.in -coverage==6.2 +colorama==0.4.6 + # via tox +coverage==7.3.3 # via codecov -distlib==0.3.4 +distlib==0.3.8 # via virtualenv -filelock==3.4.2 +filelock==3.13.1 # via # tox # virtualenv -idna==3.3 +idna==3.6 # via requests -packaging==21.3 - # via tox -platformdirs==2.4.1 - # via virtualenv -pluggy==1.0.0 - # via tox -py==1.11.0 - # via tox -pyparsing==3.0.6 - # via packaging -requests==2.27.1 - # via codecov -six==1.16.0 +packaging==23.2 + # via + # pyproject-api + # tox +platformdirs==4.1.0 # via # tox # virtualenv -toml==0.10.2 +pluggy==1.3.0 # via tox -tox==3.24.5 +pyproject-api==1.6.1 + # via tox +requests==2.31.0 + # via codecov +tomli==2.0.1 # via - # -r requirements/ci.in - # tox-battery -tox-battery==0.6.1 + # pyproject-api + # tox +tox==4.11.4 # via -r requirements/ci.in -urllib3==1.26.8 +urllib3==2.1.0 # via requests -virtualenv==20.13.0 +virtualenv==20.25.0 # via tox diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt new file mode 100644 index 0000000..15aafb2 --- /dev/null +++ b/requirements/common_constraints.txt @@ -0,0 +1,23 @@ +# A central location for most common version constraints +# (across edx repos) for pip-installation. +# +# Similar to other constraint files this file doesn't install any packages. +# It specifies version constraints that will be applied if a package is needed. +# When pinning something here, please provide an explanation of why it is a good +# idea to pin this package across all edx repos, Ideally, link to other information +# that will help people in the future to remove the pin when possible. +# Writing an issue against the offending project and linking to it here is good. +# +# Note: Changes to this file will automatically be used by other repos, referencing +# this file from Github directly. It does not require packaging in edx-lint. + + +# using LTS django version +Django<4.0 + +# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process. +# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html +elasticsearch<7.14.0 + +# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected +django-simple-history==3.0.0 diff --git a/requirements/constraints.txt b/requirements/constraints.txt index f9ea41a..194646a 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -9,4 +9,4 @@ # linking to it here is good. # This file contains all common constraints for edx-repos --c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt +-c common_constraints.txt diff --git a/requirements/dev.in b/requirements/dev.in index 64636c9..3a43379 100644 --- a/requirements/dev.in +++ b/requirements/dev.in @@ -5,8 +5,6 @@ diff-cover # Changeset diff test coverage edx-lint # For updating pylintrc edx-i18n-tools # For i18n_tool dummy -pip-tools # Requirements file management tox # virtualenv management for tests -tox-battery # Makes tox aware of requirements file changes twine # Utility for PyPI package uploads wheel # For generation of wheels for PyPI diff --git a/requirements/dev.txt b/requirements/dev.txt index 6378036..5d86f11 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,123 +1,138 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -asgiref==3.4.1 +asgiref==3.7.2 # via django -astroid==2.9.3 +astroid==3.0.2 # via # pylint # pylint-celery -bleach==4.1.0 - # via readme-renderer -certifi==2021.10.8 +build==1.0.3 + # via -r requirements/quality.in +cachetools==5.3.2 + # via tox +certifi==2023.11.17 # via requests -cffi==1.15.0 +cffi==1.16.0 # via cryptography -chardet==4.0.0 - # via diff-cover -charset-normalizer==2.0.10 +chardet==5.2.0 + # via + # diff-cover + # tox +charset-normalizer==3.3.2 # via requests -click==8.0.3 +click==8.1.7 # via # click-log # code-annotations # edx-lint - # pip-tools -click-log==0.3.2 +click-log==0.4.0 # via edx-lint -code-annotations==1.2.0 +code-annotations==1.5.0 # via edx-lint -colorama==0.4.4 - # via twine -cryptography==36.0.1 +colorama==0.4.6 + # via tox +cryptography==41.0.7 # via secretstorage -diff-cover==6.4.4 +diff-cover==8.0.2 # via -r requirements/dev.in -distlib==0.3.4 +dill==0.3.7 + # via pylint +distlib==0.3.8 # via virtualenv -django==3.2.11 +django==3.2.23 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -c requirements/common_constraints.txt # -r requirements/base.in # edx-i18n-tools -docutils==0.18.1 +docutils==0.20.1 # via readme-renderer -edx-i18n-tools==0.8.1 +edx-i18n-tools==1.3.0 # via -r requirements/dev.in -edx-lint==5.2.1 +edx-lint==5.3.6 # via # -r requirements/dev.in # -r requirements/quality.in -filelock==3.4.2 +filelock==3.13.1 # via # tox # virtualenv -idna==3.3 +idna==3.6 # via requests -importlib-metadata==4.10.1 +importlib-metadata==7.0.0 # via + # build # keyring # twine -isort==5.10.1 +importlib-resources==6.1.1 + # via keyring +isort==5.13.2 # via # -r requirements/quality.in # pylint -jeepney==0.7.1 +jaraco-classes==3.3.0 + # via keyring +jeepney==0.8.0 # via # keyring # secretstorage -jinja2==3.0.3 +jinja2==3.1.2 # via # code-annotations # diff-cover -keyring==23.5.0 +keyring==24.3.0 # via twine -lazy-object-proxy==1.7.1 - # via astroid -markupsafe==2.0.1 +lxml==4.9.4 + # via edx-i18n-tools +markdown-it-py==3.0.0 + # via rich +markupsafe==2.1.3 # via jinja2 -mccabe==0.6.1 +mccabe==0.7.0 # via pylint -packaging==21.3 +mdurl==0.1.2 + # via markdown-it-py +more-itertools==10.1.0 + # via jaraco-classes +nh3==0.2.15 + # via readme-renderer +packaging==23.2 # via - # bleach + # build + # pyproject-api # tox -path==16.3.0 +path==16.9.0 # via edx-i18n-tools -pbr==5.8.0 +pbr==6.0.0 # via stevedore -pep517==0.12.0 - # via pip-tools -pip-tools==6.4.0 - # via -r requirements/dev.in -pkginfo==1.8.2 +pkginfo==1.9.6 # via twine -platformdirs==2.4.1 +platformdirs==4.1.0 # via # pylint + # tox # virtualenv -pluggy==1.0.0 +pluggy==1.3.0 # via # diff-cover # tox -polib==1.1.1 +polib==1.2.0 # via edx-i18n-tools -py==1.11.0 - # via tox -pycodestyle==2.8.0 +pycodestyle==2.11.1 # via -r requirements/quality.in pycparser==2.21 # via cffi pydocstyle==1.1.1 # via -r requirements/quality.in -pygments==2.11.2 +pygments==2.17.2 # via # diff-cover # readme-renderer -pylint==2.12.2 + # rich +pylint==3.0.3 # via # edx-lint # pylint-celery @@ -125,83 +140,76 @@ pylint==2.12.2 # pylint-plugin-utils pylint-celery==0.3 # via edx-lint -pylint-django==2.5.0 +pylint-django==2.5.5 # via edx-lint -pylint-plugin-utils==0.7 +pylint-plugin-utils==0.8.2 # via # pylint-celery # pylint-django -pyparsing==3.0.6 - # via packaging -python-slugify==5.0.2 +pyproject-api==1.6.1 + # via tox +pyproject-hooks==1.0.0 + # via build +python-slugify==8.0.1 # via code-annotations -pytz==2021.3 +pytz==2023.3.post1 # via django -pyyaml==6.0 +pyyaml==6.0.1 # via # code-annotations # edx-i18n-tools -readme-renderer==32.0 - # via - # -r requirements/quality.in - # twine -requests==2.27.1 +readme-renderer==42.0 + # via twine +requests==2.31.0 # via # requests-toolbelt # twine -requests-toolbelt==0.9.1 +requests-toolbelt==1.0.0 # via twine rfc3986==2.0.0 # via twine -secretstorage==3.3.1 +rich==13.7.0 + # via twine +secretstorage==3.3.3 # via keyring six==1.16.0 - # via - # bleach - # edx-lint - # tox - # virtualenv -sqlparse==0.4.2 + # via edx-lint +sqlparse==0.4.4 # via django -stevedore==3.5.0 +stevedore==5.1.0 # via code-annotations text-unidecode==1.3 # via python-slugify -toml==0.10.2 +tomli==2.0.1 # via + # build # pylint + # pyproject-api + # pyproject-hooks # tox -tomli==2.0.0 - # via pep517 -tox==3.24.5 +tomlkit==0.12.3 + # via pylint +tox==4.11.4 + # via -r requirements/dev.in +twine==4.0.2 # via # -r requirements/dev.in - # tox-battery -tox-battery==0.6.1 - # via -r requirements/dev.in -tqdm==4.62.3 - # via twine -twine==3.7.1 - # via -r requirements/dev.in -typing-extensions==4.0.1 + # -r requirements/quality.in +typing-extensions==4.9.0 # via + # asgiref # astroid # pylint -urllib3==1.26.8 - # via requests -virtualenv==20.13.0 + # rich +urllib3==2.1.0 + # via + # requests + # twine +virtualenv==20.25.0 # via tox -webencodings==0.5.1 - # via bleach -wheel==0.37.1 +wheel==0.42.0 + # via -r requirements/dev.in +zipp==3.17.0 # via - # -r requirements/dev.in - # pip-tools -wrapt==1.13.3 - # via astroid -zipp==3.7.0 - # via importlib-metadata - -# The following packages are considered to be unsafe in a requirements file: -# pip -# setuptools + # importlib-metadata + # importlib-resources diff --git a/requirements/pip-tools.in b/requirements/pip-tools.in new file mode 100644 index 0000000..f99de0e --- /dev/null +++ b/requirements/pip-tools.in @@ -0,0 +1,3 @@ +-c constraints.txt + +pip-tools diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt new file mode 100644 index 0000000..93a9cee --- /dev/null +++ b/requirements/pip-tools.txt @@ -0,0 +1,31 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# make upgrade +# +build==1.0.3 + # via pip-tools +click==8.1.7 + # via pip-tools +importlib-metadata==7.0.0 + # via build +packaging==23.2 + # via build +pip-tools==7.3.0 + # via -r requirements/pip-tools.in +pyproject-hooks==1.0.0 + # via build +tomli==2.0.1 + # via + # build + # pip-tools + # pyproject-hooks +wheel==0.42.0 + # via pip-tools +zipp==3.17.0 + # via importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +# pip +# setuptools diff --git a/requirements/pip.txt b/requirements/pip.txt index 44960f0..d798b87 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,16 +1,14 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -wheel==0.37.1 +wheel==0.42.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==21.3.1 +pip==23.3.2 + # via -r requirements/pip.in +setuptools==69.0.2 # via -r requirements/pip.in -setuptools==59.8.0 - # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -r requirements/pip.in diff --git a/requirements/quality.in b/requirements/quality.in index 44f8591..92a763b 100644 --- a/requirements/quality.in +++ b/requirements/quality.in @@ -6,4 +6,5 @@ edx-lint # edX pylint rules and plugins isort # to standardize order of imports pycodestyle # PEP 8 compliance validation pydocstyle<2.0 # PEP 257 compliance validation: 2.0 doesn't know Google style, and tries to correct my grammar... :( -readme_renderer # Validates README.rst for usage on PyPI +build # Build needs to be created for README validation +twine # Needed to validate README.rst for usage on PyPI diff --git a/requirements/quality.txt b/requirements/quality.txt index 7002393..7457813 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -1,53 +1,92 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -astroid==2.9.3 +astroid==3.0.2 # via # pylint # pylint-celery -bleach==4.1.0 - # via readme-renderer -click==8.0.3 +build==1.0.3 + # via -r requirements/quality.in +certifi==2023.11.17 + # via requests +cffi==1.16.0 + # via cryptography +charset-normalizer==3.3.2 + # via requests +click==8.1.7 # via # click-log # code-annotations # edx-lint -click-log==0.3.2 +click-log==0.4.0 # via edx-lint -code-annotations==1.2.0 +code-annotations==1.5.0 # via edx-lint -docutils==0.18.1 +cryptography==41.0.7 + # via secretstorage +dill==0.3.7 + # via pylint +docutils==0.20.1 # via readme-renderer -edx-lint==5.2.1 +edx-lint==5.3.6 # via -r requirements/quality.in -isort==5.10.1 +idna==3.6 + # via requests +importlib-metadata==7.0.0 + # via + # build + # keyring + # twine +importlib-resources==6.1.1 + # via keyring +isort==5.13.2 # via # -r requirements/quality.in # pylint -jinja2==3.0.3 +jaraco-classes==3.3.0 + # via keyring +jeepney==0.8.0 + # via + # keyring + # secretstorage +jinja2==3.1.2 # via code-annotations -lazy-object-proxy==1.7.1 - # via astroid -markupsafe==2.0.1 +keyring==24.3.0 + # via twine +markdown-it-py==3.0.0 + # via rich +markupsafe==2.1.3 # via jinja2 -mccabe==0.6.1 +mccabe==0.7.0 # via pylint -packaging==21.3 - # via bleach -pbr==5.8.0 +mdurl==0.1.2 + # via markdown-it-py +more-itertools==10.1.0 + # via jaraco-classes +nh3==0.2.15 + # via readme-renderer +packaging==23.2 + # via build +pbr==6.0.0 # via stevedore -platformdirs==2.4.1 +pkginfo==1.9.6 + # via twine +platformdirs==4.1.0 # via pylint -pycodestyle==2.8.0 +pycodestyle==2.11.1 # via -r requirements/quality.in +pycparser==2.21 + # via cffi pydocstyle==1.1.1 # via -r requirements/quality.in -pygments==2.11.2 - # via readme-renderer -pylint==2.12.2 +pygments==2.17.2 + # via + # readme-renderer + # rich +pylint==3.0.3 # via # edx-lint # pylint-celery @@ -55,38 +94,57 @@ pylint==2.12.2 # pylint-plugin-utils pylint-celery==0.3 # via edx-lint -pylint-django==2.5.0 +pylint-django==2.5.5 # via edx-lint -pylint-plugin-utils==0.7 +pylint-plugin-utils==0.8.2 # via # pylint-celery # pylint-django -pyparsing==3.0.6 - # via packaging -python-slugify==5.0.2 +pyproject-hooks==1.0.0 + # via build +python-slugify==8.0.1 # via code-annotations -pyyaml==6.0 +pyyaml==6.0.1 # via code-annotations -readme-renderer==32.0 - # via -r requirements/quality.in -six==1.16.0 +readme-renderer==42.0 + # via twine +requests==2.31.0 # via - # bleach - # edx-lint -stevedore==3.5.0 + # requests-toolbelt + # twine +requests-toolbelt==1.0.0 + # via twine +rfc3986==2.0.0 + # via twine +rich==13.7.0 + # via twine +secretstorage==3.3.3 + # via keyring +six==1.16.0 + # via edx-lint +stevedore==5.1.0 # via code-annotations text-unidecode==1.3 # via python-slugify -toml==0.10.2 +tomli==2.0.1 + # via + # build + # pylint + # pyproject-hooks +tomlkit==0.12.3 # via pylint -typing-extensions==4.0.1 +twine==4.0.2 + # via -r requirements/quality.in +typing-extensions==4.9.0 # via # astroid # pylint -webencodings==0.5.1 - # via bleach -wrapt==1.13.3 - # via astroid - -# The following packages are considered to be unsafe in a requirements file: -# setuptools + # rich +urllib3==2.1.0 + # via + # requests + # twine +zipp==3.17.0 + # via + # importlib-metadata + # importlib-resources diff --git a/requirements/test.txt b/requirements/test.txt index ce10073..c1a1a09 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,46 +1,46 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -asgiref==3.4.1 +asgiref==3.7.2 # via django -attrs==21.4.0 - # via pytest -coverage[toml]==6.2 - # via pytest-cov +coverage[toml]==7.3.3 + # via + # coverage + # pytest-cov # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -c requirements/common_constraints.txt # -r requirements/base.in -iniconfig==1.1.1 +exceptiongroup==1.2.0 # via pytest -packaging==21.3 +iniconfig==2.0.0 # via pytest -pluggy==1.0.0 +packaging==23.2 + # via pytest +pluggy==1.3.0 # via pytest py==1.11.0 - # via - # pytest - # pytest-catchlog -pyparsing==3.0.6 - # via packaging -pytest==6.2.5 + # via pytest-catchlog +pytest==7.4.3 # via # pytest-catchlog # pytest-cov # pytest-django pytest-catchlog==1.2.2 # via -r requirements/test.in -pytest-cov==3.0.0 +pytest-cov==4.1.0 # via -r requirements/test.in -pytest-django==4.5.2 +pytest-django==4.7.0 # via -r requirements/test.in -pytz==2021.3 +pytz==2023.3.post1 # via django -sqlparse==0.4.2 +sqlparse==0.4.4 # via django -toml==0.10.2 - # via pytest -tomli==2.0.0 - # via coverage +tomli==2.0.1 + # via + # coverage + # pytest +typing-extensions==4.9.0 + # via asgiref diff --git a/setup.py b/setup.py index d597804..2728e32 100644 --- a/setup.py +++ b/setup.py @@ -104,9 +104,10 @@ def is_requirement(line): version=VERSION, description="""Django app for linking to help pages with short tokens""", long_description=README + '\n\n' + CHANGELOG, + long_description_content_type='text/x-rst', author='edX', author_email='oscm@edx.org', - url='https://github.com/edx/help-tokens', + url='https://github.com/openedx/help-tokens', packages=[ 'help_tokens', ], diff --git a/tox.ini b/tox.ini index a39ae01..3563eff 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{32,40}, quality +envlist = py38-django{32,42}, quality [pycodestyle] exclude = .git,.tox,migrations @@ -17,7 +17,7 @@ norecursedirs = .* requirements [testenv] deps = django32: Django>=3.2,<4.0 - django40: Django>=4.0,<4.1 + django42: Django>=4.2,<4.3 -r{toxinidir}/requirements/test.txt commands = python -Wd -m pytest {posargs} @@ -25,7 +25,8 @@ commands = [testenv:quality] setenv = DJANGO_SETTINGS_MODULE = test_settings -whitelist_externals = + PYTHONPATH = . +allowlist_externals = make rm touch @@ -38,7 +39,8 @@ commands = rm tests/__init__.py pycodestyle help_tokens tests pydocstyle help_tokens tests - python setup.py check --restructuredtext --strict + python -m build --wheel + twine check dist/* isort --check-only tests help_tokens manage.py setup.py test_settings.py make selfcheck