Skip to content

Commit

Permalink
chore: modernize repo supporting latest django-app cookiecutter changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mariajgrimaldi committed Feb 26, 2024
1 parent d40b1b4 commit 10dc3ee
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 40 deletions.
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,8 @@ docs: ## generate Sphinx HTML documentation, including API docs
# Define PIP_COMPILE_OPTS=-v to get more information during make upgrade.
PIP_COMPILE = pip-compile --upgrade $(PIP_COMPILE_OPTS)

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: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -r requirements/pip-tools.txt
# Make sure to compile files after any other files they include!
$(PIP_COMPILE) --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ click==8.1.7
# via edx-django-utils
django==3.2.24
# via
# -c requirements/common_constraints.txt
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/base.in
# django-crum
# django-waffle
Expand Down
23 changes: 0 additions & 23 deletions requirements/common_constraints.txt

This file was deleted.

4 changes: 3 additions & 1 deletion requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
# 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.
-c common_constraints.txt

# Common constraints for openedx repos
-c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt

# Temporary solution since this version raises RecursionError for test_generate_avro_schemas.py
# This should be removed once the issue is fixed with a new astroid release or with a test_generate_avro_schemas.py
Expand Down
4 changes: 2 additions & 2 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ cryptography==42.0.5
# via
# -r requirements/quality.txt
# secretstorage
ddt==1.7.1
ddt==1.7.2
# via -r requirements/quality.txt
diff-cover==8.0.3
# via -r requirements/dev.in
Expand All @@ -85,7 +85,7 @@ distlib==0.3.8
# virtualenv
django==3.2.24
# via
# -c requirements/common_constraints.txt
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/quality.txt
# django-crum
# django-waffle
Expand Down
4 changes: 2 additions & 2 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ coverage[toml]==7.4.3
# pytest-cov
cryptography==42.0.5
# via secretstorage
ddt==1.7.1
ddt==1.7.2
# via -r requirements/test.txt
django==3.2.24
# via
# -c requirements/common_constraints.txt
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/test.txt
# django-crum
# django-waffle
Expand Down
4 changes: 2 additions & 2 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ coverage[toml]==7.4.3
# pytest-cov
cryptography==42.0.5
# via secretstorage
ddt==1.7.1
ddt==1.7.2
# via -r requirements/test.txt
dill==0.3.8
# via pylint
django==3.2.24
# via
# -c requirements/common_constraints.txt
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/test.txt
# django-crum
# django-waffle
Expand Down
4 changes: 2 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ code-annotations==1.6.0
# via -r requirements/test.in
coverage[toml]==7.4.3
# via pytest-cov
ddt==1.7.1
ddt==1.7.2
# via -r requirements/test.in
django==3.2.24
# via
# -c requirements/common_constraints.txt
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/base.txt
# django-crum
# django-waffle
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{38}, quality, docs, pii_check
envlist = py{38}-django{32, 42}, quality, docs, pii_check


[doc8]
Expand Down Expand Up @@ -38,6 +38,8 @@ norecursedirs = .* docs requirements site-packages

[testenv]
deps =
django32: Django>=3.2,<3.3
django42: Django>=4.2,<4.3
-r{toxinidir}/requirements/test.txt
commands =
pytest openedx_events tests
Expand Down

0 comments on commit 10dc3ee

Please sign in to comment.