Skip to content

Commit

Permalink
fix: makefile & tox
Browse files Browse the repository at this point in the history
  • Loading branch information
irtazaakram committed Sep 20, 2023
1 parent f65b35d commit 91204ad
Show file tree
Hide file tree
Showing 14 changed files with 975 additions and 138 deletions.
28 changes: 11 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,25 @@ upgrade: ## update the requirements/*.txt files with the latest packages satisfy
pip install -qr requirements/pip.txt
pip install -qr requirements/pip-tools.txt
$(PIP_COMPILE) -o requirements/base.txt requirements/base.in
$(PIP_COMPILE) -o requirements/test.txt requirements/test.in
$(PIP_COMPILE) -o requirements/quality.txt requirements/quality.in
$(PIP_COMPILE) -o requirements/ci.txt requirements/ci.in
$(PIP_COMPILE) -o requirements/dev.txt requirements/dev.in
sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp
mv requirements/test.tmp requirements/test.txt

quality: ## check coding style with pycodestyle and pylint
pycodestyle poll --max-line-length=120
pylint poll
tox -e quality

node_requirements: ## Install requirements for handlebar templates i18n extraction
npm install

python_requirements: install_linux_dev_firefox ## install development environment requirements
pip install wheel
pip install -r requirements/base.txt --exists-action w
pip install -r requirements/dev.txt --exists-action w
ifeq ($(VIRTUAL_ENV),)
cd ./src/xblock-sdk && \
pip install -r requirements/base.txt && \
pip install -r requirements/test.txt
else
cd $(VIRTUAL_ENV)/src/xblock-sdk && \
pip install -r requirements/base.txt && \
pip install -r requirements/test.txt
endif
pip uninstall -y selenium
pip install selenium==3.4.1
piptools: ## install pinned version of pip-compile and pip-sync
pip install -r requirements/pip.txt
pip install -r requirements/pip-tools.txt

python_requirements: install_linux_dev_firefox piptools ## install development environment requirements
pip-sync requirements/dev.txt requirements/private.*

requirements: node_requirements python_requirements ## install development environment requirements
@echo "Finished installing requirements."
Expand Down
5 changes: 2 additions & 3 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
-c constraints.txt

markdown
-e git+https://github.com/openedx/xblock-utils.git@v3.4.1#egg=xblock-utils
ddt
mock
django-statici18n
xblock-utils
bleach[css]
18 changes: 10 additions & 8 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,28 @@
#
# make upgrade
#
-e git+https://github.com/openedx/xblock-utils.git@v3.4.1#egg=xblock-utils
# via -r requirements/base.in
appdirs==1.4.4
# via fs
asgiref==3.7.2
# via django
bleach[css]==6.0.0
# via -r requirements/base.in
boto3==1.28.50
boto3==1.28.51
# via fs-s3fs
botocore==1.31.50
botocore==1.31.51
# via
# boto3
# s3transfer
ddt==1.6.0
# via -r requirements/base.in
django==3.2.21
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# django-appconf
# django-statici18n
# openedx-django-pyfs
django-appconf==1.0.5
# via django-statici18n
django-statici18n==2.4.0
# via -r requirements/base.in
fs==2.4.16
# via
# fs-s3fs
Expand All @@ -49,8 +51,6 @@ markupsafe==2.1.3
# via
# mako
# xblock
mock==5.1.0
# via -r requirements/base.in
openedx-django-pyfs==3.4.0
# via xblock
python-dateutil==2.8.2
Expand Down Expand Up @@ -93,6 +93,8 @@ webob==1.8.7
# via xblock
xblock[django]==1.7.0
# via xblock-utils
xblock-utils==3.4.1
# via -r requirements/base.in
zipp==3.17.0
# via importlib-metadata

Expand Down
2 changes: 0 additions & 2 deletions requirements/ci.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@

tox # Virtualenv management for tests
tox-battery # Makes tox aware of requirements file changes
pycodestyle==2.11.0
pylint
30 changes: 2 additions & 28 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,30 @@
#
# make upgrade
#
astroid==2.15.6
# via pylint
dill==0.3.7
# via pylint
distlib==0.3.7
# via virtualenv
filelock==3.12.4
# via
# tox
# virtualenv
isort==5.12.0
# via pylint
lazy-object-proxy==1.9.0
# via astroid
mccabe==0.7.0
# via pylint
packaging==23.1
# via tox
platformdirs==3.10.0
# via
# pylint
# virtualenv
# via virtualenv
pluggy==1.3.0
# via tox
py==1.11.0
# via tox
pycodestyle==2.11.0
# via -r requirements/ci.in
pylint==2.17.5
# via -r requirements/ci.in
six==1.16.0
# via tox
tomli==2.0.1
# via
# pylint
# tox
tomlkit==0.12.1
# via pylint
# via tox
tox==3.28.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/ci.in
# tox-battery
tox-battery==0.6.2
# via -r requirements/ci.in
typing-extensions==4.8.0
# via
# astroid
# pylint
virtualenv==20.24.5
# via tox
wrapt==1.15.0
# via astroid
5 changes: 4 additions & 1 deletion requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@
# linking to it here is good.

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

selenium==3.4.1
bok-choy==0.7.1
15 changes: 4 additions & 11 deletions requirements/dev.in
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# Additional requirements for development of this application
-c constraints.txt
-r ci.txt # dependencies for setting up testing in CI

# Internationalization and Localization requirements
-e 'git+https://github.com/openedx/xblock-sdk.git@v0.7.0#egg=xblock-sdk==v0.7.0'

Django>=3.2, <4.0

django-appconf==1.0.5

django-statici18n==2.4.0
transifex-client==0.14.4
edx-i18n-tools==1.2.0
-r pip-tools.txt # pip-tools and its dependencies, for managing requirements files
-r quality.txt # Core and quality check dependencies
-r ci.txt # dependencies for setting up testing in CI
Loading

0 comments on commit 91204ad

Please sign in to comment.