Skip to content

Commit

Permalink
Merge branch 'master' into jenkins/zshkoor/setup-py-updated-a1db0c1
Browse files Browse the repository at this point in the history
  • Loading branch information
BilalQamar95 authored Dec 10, 2024
2 parents ec14d1b + 96b6a67 commit 4360472
Show file tree
Hide file tree
Showing 27 changed files with 303 additions and 265 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [quality, django32, django42]
os: [ubuntu-latest]
python-version: ['3.11']
toxenv: [quality, django42, check_keywords]
steps:
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

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

- name: Run Coverage
if: matrix.python-version == '3.8' && matrix.toxenv=='django42'
uses: codecov/codecov-action@v3
if: matrix.python-version == '3.11' && matrix.toxenv=='django42'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
fail_ci_if_error: true
8 changes: 4 additions & 4 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ on:
jobs:

push:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

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

- name: Install pip
run: pip install -r requirements/pip.txt
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 }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,4 @@ tests/__init__.py

# Development task artifacts
default.db
venv
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ Change Log

.. There should always be an "Unreleased" section for changes pending release.
[2.4.0] - 2024-03-29
====================

* Added support for Python 3.11
* Dropped support for Django 3.2, Django 4.0 and Django 4.1

[2.3.0] - 2023-08-02
====================

Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: clean coverage help quality requirements test test-all upgrade validate selfcheck
.PHONY: clean coverage help quality requirements test test-all upgrade validate selfcheck check_keywords

.DEFAULT_GOAL := help

Expand Down Expand Up @@ -75,3 +75,6 @@ validate: quality test ## run tests and quality checks

selfcheck: ## check that the Makefile is well-formed
@echo "The Makefile is well-formed."

check_keywords: ## Scan the Django models in all installed apps in this project for restricted field names
python manage.py check_reserved_keywords --override_file db_keyword_overrides.yml
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ can find it at `ISSUE_TEMPLATE.md <https://github.com/openedx/help-tokens/blob/m
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 Down
18 changes: 18 additions & 0 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file records information about this repo. Its use is described in OEP-55:
# https://open-edx-proposals.readthedocs.io/en/latest/processes/oep-0055-proc-project-maintainers.html

apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: 'help-tokens'
description: "Django app for linking to help pages with short tokens."
links:
- url: "https://github.com/openedx/help-tokens"
title: "Help Tokens"
icon: "Web"
annotations:
openedx.org/arch-interest-groups: ""
spec:
owner: group:2u-arch-bom
type: 'library'
lifecycle: 'production'
10 changes: 10 additions & 0 deletions db_keyword_overrides.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file is used by the 'check_reserved_keywords' management command to allow specific field names to be overridden
# when checking for conflicts with lists of restricted keywords used in various database/data warehouse tools.
# For more information, see: https://github.com/edx/edx-django-release-util/release_util/management/commands/check_reserved_keywords.py
#
# overrides should be added in the following format:
# - ModelName.field_name
---
MYSQL:
SNOWFLAKE:
STITCH:
2 changes: 1 addition & 1 deletion help_tokens/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

from .context_processor import context_processor

__version__ = '2.3.1'
__version__ = '2.4.0'
2 changes: 1 addition & 1 deletion help_tokens/context_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def _get_online_help_info(token=None):

def context_processor(request):
"""
The help-tokens context processor.
help-tokens context processor.
The odd structure of the return is to maintain compatibility with the way
edx-platform uses it.
Expand Down
14 changes: 8 additions & 6 deletions help_tokens/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ def get_config_value(self, section_name, option, default_option="default"):
"""
Read a value from the configuration, with a default.
Args:
section_name (str): name of the section in the configuration from which
Args
----
section_name (str): Name of the section in the configuration from which
the option should be found.
option (str): name of the configuration option.
default_option (str): name of the default configuration option whose
option (str): Name of the configuration option.
default_option (str): Name of the default configuration option whose
value should be returned if the requested option is not found.
Returns:
str: the value from the ini file.
Returns
-------
str: The value from the ini file.
"""
if self.config is None:
Expand Down
23 changes: 17 additions & 6 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
#
# This file is autogenerated by pip-compile
# To update, run:
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --output-file requirements/base.txt requirements/base.in
# pip-compile --output-file=requirements/base.txt requirements/base.in
#
django==1.11
pytz==2017.2 # via django
six==1.10.0
asgiref==3.8.1
# via django
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# django
django==4.2.11
# via
# -c requirements/common_constraints.txt
# -r requirements/base.in
sqlparse==0.4.4
# via django
typing-extensions==4.10.0
# via asgiref
1 change: 0 additions & 1 deletion requirements/ci.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@

codecov # Code coverage reporting
tox # Virtualenv management for tests
tox-battery # Makes tox aware of requirements file changes
55 changes: 27 additions & 28 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -1,49 +1,48 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# make upgrade
#
certifi==2023.7.22
cachetools==5.5.0
# via tox
certifi==2024.8.30
# via requests
charset-normalizer==3.2.0
chardet==5.2.0
# via tox
charset-normalizer==3.4.0
# via requests
codecov==2.1.13
# via -r requirements/ci.in
coverage==7.3.0
colorama==0.4.6
# via tox
coverage==7.6.4
# via codecov
distlib==0.3.7
distlib==0.3.9
# via virtualenv
filelock==3.12.3
filelock==3.16.1
# via
# tox
# virtualenv
idna==3.4
idna==3.10
# via requests
packaging==23.1
# via tox
platformdirs==3.10.0
# via virtualenv
pluggy==1.3.0
packaging==24.1
# via
# pyproject-api
# tox
platformdirs==4.3.6
# via
# tox
# virtualenv
pluggy==1.5.0
# via tox
py==1.11.0
pyproject-api==1.8.0
# via tox
requests==2.31.0
requests==2.32.3
# via codecov
six==1.16.0
# via tox
tomli==2.0.1
# via tox
tox==3.28.0
# via
# -c requirements/common_constraints.txt
# -r requirements/ci.in
# tox-battery
tox-battery==0.6.2
tox==4.23.2
# via -r requirements/ci.in
typing-extensions==4.7.1
# via filelock
urllib3==2.0.4
urllib3==2.2.3
# via requests
virtualenv==20.24.4
virtualenv==20.27.1
# via tox
16 changes: 12 additions & 4 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,23 @@


# using LTS django version
Django<4.0
Django<5.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
# See https://github.com/openedx/edx-platform/issues/35126 for more info
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

# tox>4.0.0 isn't yet compatible with many tox plugins, causing CI failures in almost all repos.
# Details can be found in this discussion: https://github.com/tox-dev/tox/discussions/1810
tox<4.0.0
# Cause: https://github.com/openedx/event-tracking/pull/290
# event-tracking 2.4.1 upgrades to pymongo 4.4.0 which is not supported on edx-platform.
# We will pin event-tracking to do not break existing installations
# This can be unpinned once https://github.com/openedx/edx-platform/issues/34586
# has been resolved and edx-platform is running with pymongo>=4.4.0
event-tracking<2.4.1

# Cause: https://github.com/openedx/edx-lint/issues/458
# This can be unpinned once https://github.com/openedx/edx-lint/issues/459 has been resolved.
pip<24.3
3 changes: 3 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@

# This file contains all common constraints for edx-repos
-c common_constraints.txt

# For python greater than or equal to 3.9 backports.zoneinfo causing failures
backports.zoneinfo; python_version<'3.9'
1 change: 0 additions & 1 deletion requirements/dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ diff-cover # Changeset diff test coverage
edx-lint # For updating pylintrc
edx-i18n-tools # For i18n_tool dummy
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
Loading

0 comments on commit 4360472

Please sign in to comment.