Commit Graph

928 Commits

Author SHA1 Message Date
Feanil Patel
623061fde5 chore: Run make upgarde with Python 3.11 2024-06-11 11:30:22 -04:00
Muhammad Soban Javed
31572c2f13 chore: upgrade edx-django-utils to 5.14.2 (#34881) 2024-06-04 16:31:19 +05:00
Muhammad Soban Javed
d8675f8a06 feat: add FrontendMonitoringMiddleware in lms and studio (#34823)
* feat: add FrontendMonitoringMiddleware in lms and studio

* chore: upgrade edx-django-utils to 5.14.1
2024-05-23 16:29:59 +05:00
Kyle McCormick
11626148d9 refactor: switch from mock to unittest.mock (#34844)
As of Python 3.3, the 3rd-party `mock` package has been subsumed into the
standard `unittest.mock` package. Refactoring tests to use the latter will
allow us to drop `mock` as a dependency, which is currently coming in
transitively through requirements/edx/paver.in.

We don't actually drop the `mock` dependency in this PR. That will happen
naturally in:

* https://github.com/openedx/edx-platform/pull/34830
2024-05-22 13:52:24 -04:00
Kyle D. McCormick
c4a1f800e9 feat!: remove paver docs, i18n, servers, and pylint
This is the first step of Paver removal.
These are the parts that we are confident are unused.

Part of: https://github.com/openedx/edx-platform/issues/34467
2024-05-21 15:14:38 -04:00
Kyle McCormick
51274af916 fix: use the correct environment variable in watch_sass (#34805)
EDX_PLAFORM_THEME_DIRS was the original name,
but it was changed to COMPREHENSIVE_THEME_DIRS
in https://github.com/openedx/edx-platform/pull/34700.
2024-05-16 15:08:05 -04:00
github-actions[bot]
73d3995dae feat: Upgrade Python dependency edx-enterprise, and introduce importlib-metadata (#34794)
* feat: Upgrade Python dependency edx-enterprise

Version bump

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`

* fix: reintroduce importlib_metadata

* chore: Updating Python Requirements (#34798)

---------

Co-authored-by: brobro10000 <82611798+brobro10000@users.noreply.github.com>
Co-authored-by: Hamzah Ullah <hamzahullah@yahoo.com>
Co-authored-by: edX requirements bot <49161187+edx-requirements-bot@users.noreply.github.com>
2024-05-14 15:22:06 -04:00
Feanil Patel
6e715782b6 Merge pull request #34685 from openedx/feanil/make_upgrade
chore: Run `make upgrade`
2024-05-09 10:02:28 -04:00
Irtaza Akram
427f436e25 chore: update actions runner (#34731)
* fix: update actions runner
2024-05-09 16:48:58 +05:00
Feanil Patel
7734f023c8 chore: Run make upgrade 2024-05-08 15:49:14 -04:00
feanil
1d3fb01d3e feat: Upgrade Python dependency pytz
Routine requirement upgrade.  Doing it individually because there are too many changes in `make upgrade`.

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-05-08 12:21:12 -04:00
magajh
4d87410890 chore: upgrade Django to 4.2.13 2024-05-08 11:19:11 -04:00
feanil
9c3fb1ee12 feat: Upgrade Python dependency certifi
Routine requirement upgrade.  Doing it individually because there are too many changes in `make upgrade`.

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-05-08 11:01:32 -04:00
Feanil Patel
6f45093af2 chore: Upgrade cryptography and pyopenssl
Ran 'make upgrade-package package="cryptography --upgrade-package pyopenssl"`
2024-05-08 08:50:48 -04:00
feanil
a92c215d70 feat: Upgrade Python dependency Jinja2
Routine requirement upgrade.  Doing it individually because there are too many changes in `make upgrade`.

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-05-07 18:18:21 -04:00
feanil
e94b942ec9 feat: Upgrade Python dependency cachetools
Routine requirement upgrade.  Doing it individually because there are too many changes in `make upgrade`.

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/feanil/fix_one_upgrade`
2024-05-07 15:39:08 -04:00
Muhammad Farhan Khan
d3d3225fa6 Move user-retirement scripts docs near code (#34695)
* chore: Move user-retirement scripts docs near code

---------

Co-authored-by: Feanil Patel <feanil@axim.org>
2024-05-07 14:45:04 -04:00
Feanil Patel
468a30e2d5 Merge pull request #34693 from openedx/feanil/remove-sqlparse-dependency
Update sqlparse dependency
2024-05-07 11:07:16 -04:00
Kyle D. McCormick
21a1235a28 revert: revert: build: finish replacing paver assets
This reverts commit 4c0284b87d.
2024-05-07 08:40:40 -04:00
Feanil Patel
25ecaa8f76 chore: Run package=sqlparse make upgrade-package 2024-05-06 14:44:13 -04:00
Kyle McCormick
4c0284b87d Revert "build: finish replacing paver assets (#34554)" (#34700)
Reverts #34554, which causes compilation of edX.org's
legacy comprehensive theme to be skipped in their deployment pipeline.
We have not determined the precise cause yet, but it seems like the
compile_sass management command is not correctly getting the
list of comprehensive theme directories from Django settings.
2024-05-06 12:57:51 -04:00
Kyle McCormick
3f0f7ce705 build: finish replacing paver assets (#34554)
Together, these changes make it so that all features of the Paver-based
asset compilation system are supported with drop-in Paver-free
replacements. The remaining Paver asset functions are trivial wrappers,
which can be comfortably deleted before Sumac.

* Turn `./manage.py ... compile_sass` into a simple wrapper around `npm
  run compile-sass`
* Turn `paver webpack` into a simple wrapper around `npm run webpack`
* Turn `pavelib.assets:collect_assets` into a simple wrapper around
  `./manage.py ... collectstatic`
* Add/improve deprecation warnings for all Paver asset commands.
* Load defaults for asset-related Django settings from environment
  variables. This allows the build to work without Python. For the
  settings which will be removed in Sumac, I've added deprecation
  warnings.
* Change EDX_PLATFORM_THEME_DIRS env var to COMPREHENSIVE_THEME_DIRS.
  This simplifies the migration instructions, because all the new env
  vars now match their corresponding Django settings. This amends an
  ADR, but it should not be a breaking change because the  env var was
  recently added (since Quince) and nobody should be using it yet.
* Future-proof the static assets ADR with links. The linked pages will
  be kept up-to-date even if the ADR isn't.

Part of: https://github.com/openedx/edx-platform/issues/34467
2024-05-06 08:29:45 -04:00
Feanil Patel
1d485ca2b8 build: Don't require the backports.zoneinfo package for newer python.
We do this so that we can build requirements files that could work to
`pip install` on both the old (3.8) and new (3.11) versions of python.
2024-05-01 10:03:42 -04:00
Usama Sadiq
188e486699 fix: fix lxml constraint issue (#34652)
* fix: pin lxml<5.0 version
* fix: update lxml constraint comment
---------
Co-authored-by: UsamaSadiq <UsamaSadiq@users.noreply.github.com>
2024-04-30 20:08:29 +05:00
Tim McCormack
afe93559b9 Revert "build: Python requirements upgrade and lxml build without binary (#34…" (#34661)
This reverts commit 52adce48d1 because we were getting this in the build pipeline:

```
WARNING: lxml 5.2.1 does not provide the extra 'html-clean'
ERROR: Exception:
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 173, in _main
    status = self.run(options, args)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 203, in wrapper
    return func(self, options, args)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 315, in run
    requirement_set = resolver.resolve(
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve
    result = self._result = resolver.resolve(
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 472, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 366, in resolve
    failure_causes = self._attempt_to_pin_criterion(name)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 221, in _attempt_to_pin_criterion
    satisfied = all(
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 222, in <genexpr>
    self._p.is_satisfied_by(requirement=r, candidate=candidate)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 178, in is_satisfied_by
    return requirement.is_satisfied_by(candidate)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/requirements.py", line 84, in is_satisfied_by
    assert candidate.name == self.name, (
AssertionError: Internal issue: Candidate is not for this requirement lxml[html-clean,html-clean] vs lxml[html-clean]
WARNING: You are using pip version 21.2.1; however, version 24.0 is available.
You should consider upgrading via the '/edx/app/edxapp/venvs/edxapp/bin/python -m pip install --upgrade pip' command.
```
2024-04-29 21:06:45 +00:00
edX requirements bot
52adce48d1 build: Python requirements upgrade and lxml build without binary (#34655)
* build: build lxml without binary in requirements and CI workflows
---------
Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
2024-04-29 23:48:57 +05:00
Usama Sadiq
734a5508ee fix: fix constraints path (#34638) 2024-04-26 21:15:51 +05:00
Usama Sadiq
9630d4080a build: use constraints in scripts requirements as well (#34635) 2024-04-26 16:17:40 +05:00
Usama Sadiq
7cf97ec0de fix: pin moto<5.0 (#34595) 2024-04-24 18:08:58 +05:00
Kyle D. McCormick
2cd3dc844d fix: NameErrors in compile_sass.py
Fixes three NameErrors which were introduced by the previous commit,
leading to it being reverted.

These NameErrors slipped through because the script was not tested on
any themes that had zero SCSS overrides.
2024-04-12 11:33:31 -04:00
Kyle D. McCormick
f57d412c71 revert: revert: build: remove dependency on Python sass module
This reverts commit a27cda2fd9.
2024-04-12 11:33:31 -04:00
Feanil Patel
dbce490906 chore: Update edx-rest-api-client to a python 3.11 compatible version. 2024-04-09 11:24:09 -04:00
Kyle McCormick
a27cda2fd9 revert: "build: remove dependency on Python sass module (#34439)" (#34476)
This reverts commit a08a10c396.

compile_sass.py had a bug which was caught by 2U's pipeline, but not
by local testing.
2024-04-05 11:59:58 -04:00
Kyle McCormick
a08a10c396 build: remove dependency on Python sass module (#34439)
Instead of using libsass-python's `sass` module, which is incompatible
with Python 3.11, we now directly use libsass-python's `_sass` module,
which directly binds to the underlying C++ libsass library.

This ensures that the Sass build will not a blocker for the edx-platform
Python 3.11 upgrade, which needs to land in Redwood.

For more details, see the docstring at scripts/compile_sass.py#L167
2024-04-05 10:50:05 -04:00
Kyle D. McCormick
bd82b1d75a docs: npm scripts for static assets are no longer experimental :) 2024-04-04 10:31:02 -04:00
Kyle D. McCormick
3b8d018e4b fix: simplify npm run watch-sass so that it is more reliable
The implementation of `npm run watch-sass` was trying really hard
to recompile precisely only the Sass that needed to be recompiled, but in
order to do so, it had to spin up several `watchmedo` processes
per theme. These processes would trigger one another sometimes, leading
to infinite recompilation loops.

Rather than figure out all the dependency directions and messing with
`watchmedo`, I've opted to simplify the script to invoke a single
`watchmedo` process per theme. A single theme recompiles within
seconds, so I think this is a good compromise, one which makes the
script easier to reason about will help me move pass this legacy
assets work.
2024-04-04 10:31:02 -04:00
Kyle McCormick
5a785482ab test: remove some unused paver references from CI scripts (#34468)
All CI used to go through scripts/generic-ci-tests.sh, which is a
wrapper around various `paver` test/linting/check invocations.
These days, most edx-platform CI checks just invoke their tools (pylint,
pycodestyle, pytest, etc.) directly.

In anticipation of the proposed Paver deprecation [1], let's remove
the parts of this script that aren't used any more, including several
`paver` command invocations. This should have no impact on CI.

Furthermore, we are able to remove the SHARD environment variable,
which was formely used to split unit and quality checks up into
smaller pieces. Unit tests and pylint checks now have their own
separate sharding logic, so there is only one "quality" shard remaining
(SHARD=4, ie generic quality checks), thus we don't need a SHARD
variable at all.

[1] https://github.com/openedx/edx-platform/issues/34467
2024-04-04 10:05:04 -04:00
Feanil Patel
aa8497f260 chore: Update edx-django-utils to a python 3.11 compatible version. 2024-04-01 13:42:52 -04:00
Muhammad Farhan Khan
7808913916 chore: Moved structures.py from tubular repository (#34328)
* chore: Moved structures.py from tubular repository
2024-03-12 09:46:34 -04:00
Muhammad Farhan Khan
65ea55c8aa Move user retirement scripts code from the tubular repo (#34063)
* refactor: Migragte user retirement scripts code from the tubular repo
2024-02-22 11:09:00 -05:00
edX requirements bot
255292a2c0 chore: Updating Python Requirements (#34258) 2024-02-20 16:14:17 +05:00
edX requirements bot
d2dc8cd0ac chore: Updating Python Requirements (#34183) 2024-02-06 18:23:44 +05:00
Pooja Kulkarni
f5b246d0e9 feat: copy/paste unit from within a unit in Studio - feature flagged (#33724)
(requires the contentstore.enable_copy_paste_units waffle flag)
2023-12-01 11:33:34 -08:00
edX requirements bot
b2cc7f8f7e chore: Updating Python Requirements (#33843)
Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
2023-11-30 16:43:46 +05:00
edX requirements bot
c240fd8b52 Python Requirements Update (#33737)
* chore: Updating Python Requirements
* fix: fix test failure occurring due to faker upgrade
---------

Co-authored-by: UsamaSadiq <usama7274@gmail.com>
2023-11-17 23:56:24 +05:00
edX requirements bot
e46c1d1e61 Python Requirements Update (#33695)
* chore: Updating Python Requirements
* fix: fix completion test query count
---------

Co-authored-by: UsamaSadiq <usama7274@gmail.com>
2023-11-13 14:37:53 +05:00
Feanil Patel
66e987997c Revert "Revert "chore: remove bok-choy settings"" 2023-11-01 13:41:37 -04:00
Robert Raposa
083ccbf09b Revert "chore: remove bok-choy settings" 2023-10-31 15:27:44 -04:00
salman2013
9452cef97d chore: resolve conflicts 2023-10-23 12:05:25 +05:00
Kyle McCormick
c1163717df build: log npm run postinstall steps to STDOUT so they are visible in CI (#33142)
Without this change, `npm run postinstall` (aka
scripts/copy-node-modules.sh) uses `set -x`, which echo steps to STDERR.
By default, it seems that GitHub Actions doesn't show STDERR.

Having the steps visible in CI was very useful while debugging some
Tutor build improvements, so I figured it would be good to upstream the
change.
2023-10-04 17:34:16 +00:00