Commit Graph

121 Commits

Author SHA1 Message Date
Kyle McCormick
151c4fcfb2 build: move collectstatic ignore patterns into configuration (#31934)
Adds a tiny `openedx.core.djangoapps.staticfiles` app so that
static asset ignore patterns can be coded into configuration rather
than supplied on the command line or coded into pavelib.
Makes it easier to run static asset collection without Paver.

See ADR for details:
openedx/core/djangoapps/staticfiles/docs/decisions/0001-purpose-of-app.rst

Closes: https://github.com/openedx/edx-platform/issues/31658
2023-04-21 08:26:48 -04:00
Tim McCormack
66b8b1dd79 build: Remove workarounds for missing packages (#32088)
We'd prefer to install the OS packages rather than have these workarounds
for missing system libraries.
2023-04-18 18:29:52 +00:00
Usama Sadiq
0ec7b8cc30 fix: fix make upgrade job and _mysql issue (#32084)
* fix: upgrade pip & pip-tools versions
* fix: install libmysqlclient-dev system package again
* fix: skip reinstalling mysqlclient package
* fix: add pytz package constraint

---------

Co-authored-by: edX requirements bot <49161187+edx-requirements-bot@users.noreply.github.com>
2023-04-18 18:10:01 +05:00
Braden MacDonald
2dc79bcab4 feat: New django app for copying and pasting OLX content in Studio (#31904)
[FC-0009]
2023-04-14 11:41:41 -07:00
SaadYousaf
dc63e525f8 feat: add platform notification app and models 2023-04-14 14:32:17 +05:00
Kyle McCormick
cd24534653 build: run ShellCheck in CI (#31809)
build: run ShellCheck

Adds a ShellCheck check to edx-platform PRs and master,
using the shared workflow & template from the .github repo.
This will become a "required" check once it passes for 2 straight weeks on master.

Brings all existing shell scripts into compliance with ShellCheck.
2023-03-10 16:10:56 +00:00
Feanil Patel
c28f36cf6a build: Updating a missing workflow file add-depr-ticket-to-depr-board.yml.
The .github/workflows/add-depr-ticket-to-depr-board.yml workflow is missing or needs an update to stay in
sync with the current standard for this workflow as defined in the
`.github` repo of the `openedx` GitHub org.
2023-02-23 15:34:10 -05:00
Feanil Patel
f8e3fd35dc build: Creating a missing workflow file add-remove-label-on-comment.yml.
The .github/workflows/add-remove-label-on-comment.yml workflow is missing or needs an update to stay in
sync with the current standard for this workflow as defined in the
`.github` repo of the `openedx` GitHub org.
2023-02-23 15:34:09 -05:00
Feanil Patel
faf5fc28b8 build: Creating a missing workflow file self-assign-issue.yml.
The .github/workflows/self-assign-issue.yml workflow is missing or needs an update to stay in
sync with the current standard for this workflow as defined in the
`.github` repo of the `openedx` GitHub org.
2023-02-23 15:34:08 -05:00
Tim McCormack
197fef9c2b docs: Various cleanup of outdated comments and docstrings (#31754)
- Remove pylint warning suppression from SHAKE-128 hexdigest calls; these
  are no longer needed as of astroid 2.12.12. For background, see issue
  <https://github.com/PyCQA/pylint/issues/4039>. Also, correct a comment
  that referred to SHAKE-256 instead of SHAKE-128.
- Replace "released" with "beta" in several places where there was a copy
  & paste error in dark_lang. Add mention of `beta_lang` to a docstring
  where it was omitted.
- Remove comment regarding Mongo startup; the code it referred to has since
  been removed.
- Fix typos.
2023-02-14 18:11:57 +00:00
Zubair Shakoor
59a19957a0 Code coverage added (#31630)
* fix: code coverage added

* fix: .coverage folder added

* fix: .coverage folder location changed

* fix: combine folder modified

* fix: combine command updated

* fix: .coverage folder rollback

* fix: path commented

* fix: upload path modified

* fix: path updated to root

* fix: .coveragerc added

* fix: new coverage folder added

* fix: combine path removed

* fix: coverage files path changed

* fix: data files path updated

* fix: .coverage added as path

* fix: coveragerc updated

* fix: env TEST_SUIT rollbacked

* fix: renaming coverage files step added

* fix: ls added for testing

* fix: debugging commands added

* fix: triggeering cov command in tox.in

* fix: cd coverage added

* fix: commands modified

* fix: triggering coverage using command

* fix: removed omitteed files

* fix: removed all omited files

* fix: skipped all omitted files

* fix: source updated to root in coveragern

* fix: coveragerc files rolledback

* fix: source changed to edx-platform

* fix: cms-2 shard name reemoved

* fix: rmeoved coveragee trigger

* fix: removed shard added back

* fix: --cov-config=setup.cfg added

* fix: combining cov paths format changed to comma

* fix: bash changeeed for coveerage

* fix: paths updateed for testing

* fix: coverage combine command fixed

* fix: final check applied

* fix: final coveragee step addeed and tested

* fix: actions version upgraded in unit tests

* fix: testing space separated commands

* fix: coverage data files path removeed from combine command

* fix: coverage combine reports/* addedd

* fix: updated --cov path

* fix: data_file path updated by removing TEST_SUIT variable

---------

Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
2023-02-03 14:14:09 +05:00
Shafqat Farhan
68acdca9d7 feat: VAN-1221 - POC: Course skills based recommendations from Algolia 2023-01-23 12:10:28 +05:00
Awais Qureshi
90f4f6543d build: Adding constraints to avoid multiple major upgrades. (#31551)
* build: Adding constraints to avoid multiple major upgrades
2023-01-16 16:24:34 +05:00
Muhammad Umar Khan
23975b0263 build: run lint import check on master branch (#31494) 2023-01-04 18:24:03 +05:00
Tim McCormack
b8a34f0c57 build: Set Django version for tests more safely; drop support for non-GHA (#31387)
We have a need to lock the version of Django for production and tests, but
also to test on newer versions of Django so that we can get the repo ready
for long-term-support releases.

We've been doing that by extracting the `django==x.y.z` from the
pip-compiled files and moving it to a django.txt that is then co-installed
but can be overridden during tests. The problem is that this can result
in broken packages.

The approach here is to have `make test-requirements` continue to
ensure a consistent set of packages, and then install a different
Django on top of that in the CI script -- and call `pip check` to make
sure that combination isn't broken.

Adding Django 4.0 to the unit-tests.yml matrix will now correctly
result in this error and a failing job:
`django-splash 1.2.1 has requirement Django<4.0, but you have django 4.0.8.`

The other half of this is to change other CI runners to remove their
ability to control the Django version, since it's complicated to make
this work, and we probably only need it in unit-tests.yml. Convert them
to just use `make test-requirements`.

Also:

- Simplify handling of `pip --src` by setting `PIP_SRC` (rather than our
  own `PIP_SRC_DIR`, which pip ignores because `--src-dir` isn't an option
  that it knows). This is needed to allow `make test-requirements` to do
  the pip calls. An alternative would be to set a pip-options env var for
  the make target to use, but `PIP_SRC` already exists.
- Remove outdated modifications to common_constraints
- Add comment explaining why pylint tests need dev-requirements
2022-12-12 21:45:15 +00:00
Muhammad Umar Khan
9c279444df build: add import linter check (#31062)
* build: add import linter check
2022-12-07 12:07:09 +05:00
Soban Javed
89ce1a52a7 build: run tests for open-release branches on GH hosted runners 2022-11-17 16:40:41 +05:00
Usama Sadiq
4734f9f16e fix: bump pylint version (#31084) 2022-10-27 12:19:09 +05:00
Ned Batchelder
f3031d0b2a build(fix): use alls-green to correctly aggregate earlier steps
If a job "needs" earlier jobs, and one of the earlier jobs fails, then
the "needs" job will be marked as Skipped.  A required check that is
skipped doesn't block merging.

The alls-green action has the correct logic to fail the aggregation job
if any of its required jobs fail.
2022-10-06 04:22:42 -07:00
Kyle McCormick
56961ce0e6 build: fix syntax error in GH-hosted tests workflow (#31105)
We were seeing this error whenever unit tests
were run from a fork (only forks use the GH-hosted
workflow, which is why this was able to merge
into master):

  You have an error in your yaml syntax on line 65

The comment hash (#) needs to be aligned
with the rest of the text block.
2022-10-05 13:30:01 -04:00
Tim McCormack
2edbdcf7f4 build: Clear out stale dependencies when installing requirements (#31080)
We've been seeing some cross-version caching issues in the
edx-platform-runner unit tests, which apparently run on a "dirty"
environment—the virtualenv does not get cleared out between runs,
which probably improves performance but allows installed dependencies
to "leak" between runs. This results in errors between master and older
open-releases but could also prevent us from noticing missing deps.

By using pip-sync in the new CI Make targets (as we already do for
the regular `make requirements` target) we can ensure that any stale
dependencies from runs by other branches (or older versions of the
code) are removed.

Calling `make local-requirements` at the end of each `*-requirements`
target rather than making it a prerequisite is necessary for using sync,
since otherwise the local reqs would be wiped out.

The `requirements` target is also deduplicated into the newer
`dev-requirements` (aliased to it, with both installing private deps now.)

Adding a prerequisite of `pre-requirements` allows us to simplify some
workflow calls slightly. This ends up being the bulk of the commit by
line count. The pip lockfile also wasn't being used in the Makefile, so
I added that to pre-requirements as well.

Also fix leading whitespace issue in Makefile.
2022-10-03 20:26:40 +00:00
Ned Batchelder
a5f687bf70 build: add a success aggregation step to simplify required check configuration 2022-10-03 07:11:53 -07:00
Ned Batchelder
63f6baf528 style: make action style more uniform 2022-10-03 07:11:53 -07:00
Ned Batchelder
a78f8f9496 style: make action style more uniform 2022-10-03 07:11:53 -07:00
Ned Batchelder
1e0f0e344b build: add a collection step so we can simplify required checks 2022-09-30 12:48:21 -07:00
Ned Batchelder
18fcbc33ef style: make the action syntax more uniform 2022-09-30 12:48:21 -07:00
UsamaSadiq
897cb3617f refactor!: delete common/lib and related usages 2022-09-22 14:16:34 +05:00
Sarina Canelake
69f0849165 fix: update path to .github workflows to read from openedx org 2022-09-15 14:52:28 -04:00
Sarina Canelake
b0143c0e43 build: add check for Open edX tutorial changes 2022-09-01 16:08:30 -04:00
Nathan Sprenkle
e025463872 feat: Learner Dashboard get enrollments (#30808)
* feat: fill out enrollment serializer

* test: add basic integration tests for enrollments

* feat: get info for user account activation

* test: test integrating user account activation

* feat: get course enrollments

* feat: get course email settings

* feat: add ecommerce info

* feat: add resume urls

* refactor: move learner home to separate app

* refactor: remove course limit

Co-authored-by: nsprenkle <nsprenkle@2u.com>
2022-08-11 11:05:07 -04:00
Muhammad Soban Javed
d053bba952 Revert "Revert "refactor: move common/lib/capa/capa to xmodule/capa" (#30762)"
This reverts commit 4463ee751d.
2022-07-27 15:36:08 +05:00
Muhammad Soban Javed
4463ee751d Revert "refactor: move common/lib/capa/capa to xmodule/capa" (#30762) 2022-07-21 18:22:15 +05:00
Muhammad Soban Javed
06064b237b Merge pull request #30403 from openedx/iamsobanjaved/BOM-2582-move-common-lib-capa
refactor: move common/lib/capa/capa to xmodule/capa
2022-07-21 16:27:47 +05:00
M Umar Khan
91f4585166 build: add doc build check 2022-07-20 15:39:05 +05:00
Soban Javed
9eba9f983a refactor!: move common/lib/capa/capa to xmodule/capa
As part of dissolving our sub-projects in edx-platform, we are moving this package under the xmodule directory.
We have fixed all the occurences of import of this package and also fixed all documents related references.
This might break your platform if you have any reference of `import capa` or `from capa import` in your codebase or in any Xblock.

Ref: https://openedx.atlassian.net/browse/BOM-2582
2022-07-19 12:20:04 +05:00
Maria Fernanda Magallanes Zubillaga
f6f66d0f39 refactor!: change the api naming and url 2022-07-08 00:05:10 -04:00
María Fernanda Magallanes Z
7f5eb296a3 feat: add mfe_api v1
This PR adds MFE API. This is part of the work that is being done to obtain the MFE Runtime Configurations and that has been discussed in the BTR WG.

Discussion: https://discuss.openedx.org/t/how-to-use-microfrontend-in-a-multitenant-instance/6936/14?u=mafermazu
MFE Runtime configuration - eduNEXT: https://docs.google.com/document/d/1-FHIQmyeQZu3311x8eYUNMru4JX7Yb3UlqjmJxvM8do/edit?usp=sharing

feat: add lms setting to set mfe config cache (#262)

Co-authored-by: María Fernanda Magallanes Z <maria.magallanes@edunext.co>

feat: make mfe config api disabled by default (#263)

* feat: make mfe config api disabled by default

* fix: simple is better than complex

test: add mfe config tests (#264)

* test: add mfe config tests

* test: fix it and simplify it

* test: correct pylint issues

fix: correct pep 8 violations

fix: add mfe api unit test in github workflow

fix: correct unit tests

refactor: move mfe api to lms

fix: try mfe api urls without regex

fix: add app_namespace in lms urls

fix: try url without conditional

Revert "fix: try url without conditional"

This reverts commit 694aab546134b4bd9ad2642e24927b42cac24459.

fix: set enable_mfe_config_api feature to true in the tests

test: try to add failed test case

Revert "test: try to add failed test case"

This reverts commit cee6bf656ab1b96492b0b6199ddff32a6d6a65bd.

docs: improve explanation and documentation

fix: ensure the response is a json object

refactor: be consistent with the variable names

fix: allow overriding mfe api config cache timeout in production

fix: handle 404 response in view

refactor: use a guard instead if-else

feat: add the possibility to show mfe specific config
2022-07-07 23:57:36 -04:00
Awais Qureshi
872c951417 build: new check for static assets. (#30599)
* build: static assets check for lms and cms.
2022-06-21 19:55:13 +05:00
Muhammad Umar Khan
a389a9ff10 Revert "Revert "refactor: move xmodule folder to root"" 2022-06-20 18:20:06 +05:00
Muhammad Umar Khan
d890f06507 Revert "refactor: move xmodule folder to root" 2022-06-20 16:03:48 +05:00
M Umar Khan
a91df0c40f refactor: move xmodule folder to root
- Moving xmodule folder to root as we're dissolving sub-projects of common folder in edx-platform
    - More info: https://openedx.atlassian.net/browse/BOM-2579
- -e common/lib/xmodule has been removed from the requirements as xmodule has itself become the part of edx-platform and not being installed through requirements
- The test files common/lib/xmodule/test_files/ have been removed as they are not being used anymore
2022-06-20 14:33:45 +05:00
Sagirov Eugeniy
92ca176fde refactor: Remove legacy course info page & related code 2022-06-05 19:00:05 +03:00
Mohammad Ahtasham ul Hassan
79b3c82e5f build!: drop node12 support (#30468) 2022-05-30 17:38:31 +05:00
Mohammad Ahtasham ul Hassan
7deea6ec6e feat: add lockfile check (#30440) 2022-05-19 17:54:09 +05:00
Mohammad Ahtasham ul Hassan
f801deaae5 Node Upgrade (#30420)
* feat: Node16 upgrade
2022-05-18 16:12:34 +05:00
Mohammad Ahtasham ul Hassan
fee54bf424 Revert "Node 16 Upgrade (#30354)" (#30399)
This reverts commit f4c3c3fb4d.
2022-05-16 18:42:42 -04:00
Mohammad Ahtasham ul Hassan
f4c3c3fb4d Node 16 Upgrade (#30354)
* feat: Node16 upgrade
2022-05-16 16:53:37 +05:00
Muneeb Ur Rehman
20a0e6e9e1 feat: create learner pathway skeleton (#30355)
* feat: create skeleton for learner_pathway app

* feat: add learner_pathway app for quality checks

* feat: add verbose name and dir for tests

* feat: add docstrings for files in app

* fix: remove unused imports

* refactor: resolve quality issues
2022-05-10 13:19:45 +05:00
Ned Batchelder
e7caec5ab8 build: the Django matrix needs to use the pinned version also.
The logic here seems to work, but Django 4.0 won't install over our
other pinned requirements, so tests fail for Django 4.0.
2022-04-28 02:28:32 -07:00
Tim McCormack
8bcec1a7c9 build: Remove empty coursegraph module (and the pylint reference to it) (#30273)
Coursegraph was moved from openedx to cms in commit 92552e50/PR #29156;
module init file was reintroduced in commit 80f9f1de/PR #30197, I think
by accident.
2022-04-21 19:33:38 +00:00