Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/static-assets-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:

- name: Install Full Python Deps for Collection
run: |
pip install -r requirements/edx/base.txt -e .
pip install -e .

- name: Check Assets Collection
env:
Expand Down
15 changes: 4 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.PHONY: base-requirements check-types clean \
compile-requirements detect_changed_source_translations dev-requirements \
docs extract_translations \
guides help lint-imports local-requirements migrate migrate-lms migrate-cms \
guides help lint-imports migrate migrate-lms migrate-cms \
pre-requirements pull pull_xblock_translations pull_translations push_translations \
requirements shell swagger \
technical-docs test-requirements ubuntu-requirements upgrade-package upgrade
Expand Down Expand Up @@ -67,23 +67,16 @@ detect_changed_source_translations: ## check if translation files are up-to-date
pre-requirements: ## install Python requirements for running pip-tools
pip install -r requirements/pip-tools.txt

local-requirements:
# edx-platform installs some Python projects from within the edx-platform repo itself.
pip install -e .

dev-requirements: pre-requirements
@# The "$(wildcard..)" is to include private.txt if it exists, and make no mention
@# of it if it does not. Shell wildcarding can't do that with default options.
pip-sync requirements/edx/development.txt $(wildcard requirements/edx/private.txt)
make local-requirements
pip install -e '.[development]' $(wildcard requirements/edx/private.txt)

base-requirements: pre-requirements
pip-sync requirements/edx/base.txt
make local-requirements
pip install -e '.'

test-requirements: pre-requirements
pip-sync --pip-args="--exists-action=w" requirements/edx/testing.txt
make local-requirements
pip install -e '.[testing]'

requirements: dev-requirements ## install development environment requirements

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ Language Packages:

* Backend application:

- ``pip install -r requirements/edx/base.txt`` (production)
- ``pip install -r requirements/edx/development.txt`` (development)
- ``pip install -e '.'`` (production)
- ``pip install -e '.[dev]'`` (development)

Some Python packages have system dependencies. For example, installing these packages on Debian or Ubuntu will require first running ``sudo apt install python3-dev default-libmysqlclient-dev build-essential pkg-config`` to satisfy the requirements of the ``mysqlclient`` Python package.

Expand Down
2 changes: 1 addition & 1 deletion docs/references/static-assets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ skip this section.
First, ensure you have a Python enironment with all edx-platform dependencies
installed::

pip install -r requirements/edx/base.txt -e .
pip install -e .

Next, download localized versions of edx-platform assets. Under the hood, this
command uses the `Open edX Atlas`_ tool, which manages aggregated translations
Expand Down
1 change: 0 additions & 1 deletion lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,6 @@
############################# SET PATH INFORMATION #############################

PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /edx-platform/lms
NODE_MODULES_ROOT = REPO_ROOT / "node_modules" # noqa: F405

# Where to look for a status message
STATUS_MESSAGE_PATH = ENV_ROOT / "status_message.json" # noqa: F405
Expand Down
5 changes: 4 additions & 1 deletion openedx/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def _make_locale_paths(settings):
COURSES_ROOT = ENV_ROOT / "data"
XMODULE_ROOT = REPO_ROOT / "xmodule"
DATA_DIR = COURSES_ROOT
NODE_MODULES_ROOT = REPO_ROOT / "node_modules"

############################# Django Built-Ins #############################

Expand Down Expand Up @@ -1533,6 +1534,8 @@ def add_optional_apps(optional_apps, installed_apps):
# For more information, check https://github.com/openedx/edx-platform/pull/13388 and
# https://github.com/openedx/edx-platform/pull/14571.
TASK_MAX_RETRIES=5,

STORAGE_CLASS=None, # Resolved to default storage.
)

################################ Bulk Email ################################
Expand Down Expand Up @@ -2275,7 +2278,7 @@ def add_optional_apps(optional_apps, installed_apps):
# Don't wrap JavaScript as there is code that depends upon updating the global namespace
'DISABLE_WRAPPER': True,
# Specify the UglifyJS binary to use
'UGLIFYJS_BINARY': 'node_modules/.bin/uglifyjs',
'UGLIFYJS_BINARY': Derived(lambda settings: settings.NODE_MODULES_ROOT / ".bin" / "uglifyjs"),
}

STATICFILES_STORAGE_KWARGS = {}
Expand Down
20 changes: 15 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
[build-system]
requires = ["setuptools>=61.0"]
requires = ["setuptools>=61.0", "setuptools<82"]
build-backend = "setuptools.build_meta"

[project]
name = "openedx-platform"
version = "0.13"
version = "0.14"
requires-python = ">=3.12"
dependencies = ["setuptools"]
dynamic = ["dependencies", "optional-dependencies"]

[tool.setuptools]
packages = ["cms", "common", "lms", "openedx", "xmodule"]
[tool.setuptools.packages.find]
where = ["."]
include = ["cms*", "common*", "lms*", "openedx*", "xmodule*"]
exclude = ["*.tests", "*.tests.*"]

[tool.setuptools.dynamic]
dependencies = { file = ["requirements/edx/base.txt"] }

[tool.setuptools.dynamic.optional-dependencies]
development = { file = ["requirements/edx/development.txt"] }
testing = { file = ["requirements/edx/testing.txt"] }
doc = { file = ["requirements/edx/doc.txt"] }

[tool.setuptools.package-data]
xmodule = ["js/module/*"]
Expand Down
10 changes: 5 additions & 5 deletions scripts/copy-node-modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ log_and_run mkdir -p "$vendor_js"
log_and_run mkdir -p "$vendor_css"

log "Copying certain JS modules from node_modules into vendor directory..."
log_and_run cp --force \
log_and_run cp -f \
"$node_modules/backbone.paginator/lib/backbone.paginator.js" \
"$node_modules/backbone/backbone.js" \
"$node_modules/bootstrap/dist/js/bootstrap.bundle.js" \
Expand All @@ -61,8 +61,8 @@ log_and_run cp --force \

log "Copying certain JS developer modules into vendor directory..."
if [[ "${NODE_ENV:-production}" = development ]] ; then
log_and_run cp --force "$node_modules/sinon/pkg/sinon.js" "$vendor_js"
log_and_run cp --force "$node_modules/squirejs/src/Squire.js" "$vendor_js"
log_and_run cp -f "$node_modules/sinon/pkg/sinon.js" "$vendor_js"
log_and_run cp -f "$node_modules/squirejs/src/Squire.js" "$vendor_js"
else
# TODO: https://github.com/openedx/edx-platform/issues/31768
# In the old implementation of this scipt (pavelib/assets.py), these two
Expand All @@ -72,8 +72,8 @@ else
# However, in the future, it would be good to only copy them for dev
# builds. Furthermore, these libraries should not be `npm install`ed
# into prod builds in the first place.
log_and_run cp --force "$node_modules/sinon/pkg/sinon.js" "$vendor_js" || true # "|| true" means "tolerate errors"; in this case,
log_and_run cp --force "$node_modules/squirejs/src/Squire.js" "$vendor_js" || true # that's "tolerate if these files don't exist."
log_and_run cp -f "$node_modules/sinon/pkg/sinon.js" "$vendor_js" || true # "|| true" means "tolerate errors"; in this case,
log_and_run cp -f "$node_modules/squirejs/src/Squire.js" "$vendor_js" || true # that's "tolerate if these files don't exist."
fi

log "-------------------------------------------------------------------------------"
Expand Down
2 changes: 1 addition & 1 deletion scripts/watch_sass.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ fi
if ! type watchmedo 1>/dev/null 2>&1 ; then
error "command not found: watchmedo"
log "The \`watchdog\` Python package is probably not installed. You can install it with:"
log " pip install -r requirements/edx/development.txt"
log " pip install -e '.[dev]'"
exit 1
fi

Expand Down
Loading
Loading