Commit Graph

28 Commits

Author SHA1 Message Date
Kyle McCormick
303bf5ef3c build: npm run watch (experimental) (#32866)
Implements the `npm run watch` section of the assets ADR [1], plus some
modifications since I decided to switch from pywatchman to watchdog (see
ADR changes for justification). This will replace `paver watch_assets`
(edx-platform) and `openedx-assets watch-themes` (Tutor).

Specifically, this PR adds three experimental commands:

* `npm run watch-sass` : Watch for Sass changes with watchdog.
* `npm run watch-webpack` : Invoke Webpack-watch for JS changes.
* `npm run watch` : Invoke both `watch-sass` and `watch-webpack` simultaneously.

These commands are only intended to work in development mode. They have
been tested both on bare-metal edx-platform and through `tutor dev run`
on on Linux.

Before removing the "experimental" label, we need to:

* Test through Devstack on Linux.
* Test through Devstack and `tutor dev run` on macOS.
* Test on bare-metal macOS. Might not work, which is OK, but we should
  document that.
* Document the commands in edx-platform's README.
* Confirm that this not only works through `tutor dev run`, but also as
  a suitable replacement in the `watchthemes` service that Tutor runs
  automatically as part of `tutor dev start`. Tweak if necessary.

References:

1. https://github.com/openedx/edx-platform/blob/master/docs/decisions/0017-reimplement-asset-processing.rst

Part of: https://github.com/openedx/edx-platform/issues/31612
2023-07-27 16:33:32 +00:00
Kyle McCormick
3e67719a24 build: npm run build (experimental) (#32823)
This PR implements much of the static assets rework ADR [1], including:

* `npm run build[-dev]`, and its subcommands,
* `npm run webpack[-dev]` and
* `npm run compile-sass[-dev]`.

This is backwards-compatible. `paver update_assets` should not be affected.
The new command warns that it is "experimental" for a few reasons:

* `npm run build` will fail in the webpack phase unless you first
run  `xmodule_assets`. This will be changed soon [2].

* We have tested the new build, but not quite so thoroughly that we'd
recommend it as the production default yet. Once the xmodule_assets
work lands, we'll share this on the forums so early adopters can try it
out.

* The commands lack some top-level documentation. Once they stabilize more,
we'll add a section to the README that explains how and when to use `npm run
build` and its subcommands and its env vars.

* `npm run watch` is not yet implemented.

References:
1. https://github.com/openedx/edx-platform/blob/master/docs/decisions/0017-reimplement-asset-processing.rst
2. https://github.com/openedx/edx-platform/pull/32685

Part of: https://github.com/openedx/edx-platform/issues/31604
2023-07-26 08:04:45 -04:00
Braden MacDonald
57420ed613 feat: expand mypy static type checking (#32591)
* chore: typing + fixes for content_staging
* chore: typing + fixes for learning_sequences
* chore: typing + fixes for content_libraries
* chore: typing + fixes for new XBlock runtime
* feat: type hinting more code with mypy
2023-07-19 09:58:19 -07:00
Feanil Patel
eba2856293 build: Re-org docs deps.
Some doc buildig deps were in development.in explicitly while others
weren't.  Update development.in to pull in doc.txt and then remove
direct additions of the doc requirements from development.in
2023-07-12 15:06:23 -04:00
Kshitij Sobti
457fd46599 chore: replace edx-shinx-theme with sphinx-book-theme in dev dependencies
As part of the deprecation process for edx-sphinx-theme a previous PR switched
to sphinx-book-theme, however edx-sphinx-theme still remained as a dependency in
one place, which is now removed in this PR.
2023-06-19 15:22:25 +05:30
Tim McCormack
b852344fcf build: Deduplicate mismatched pip.txt files that caused build failure (#32081)
There was a `requirements/pip.txt` with old versions, and a newer
`requirements/edx/pip.txt` managed via a `pip.in` file. The old one was
used in most places, but came out of sync with pip-tools.txt, which was
managed properly. Eventually this caused a `pip check` failure due to the
mismatch.

This should resolve at least part of https://github.com/edx/edx-arch-experiments/issues/267

This PR moves pip.in and pip-tools.in and their corresponding pin files
up to the `requirements/` dir, since they should be shared between the edx
and sandbox environments. This also has the effect of upgrading pip to
match the version in the file we've been uselessly upgrading.

Other improvements:

- Remove `-q` option from pip and pip-sync calls, as it was hiding some
  debugging information that would have resolved this sooner.
- Depend on `pre-requirements` from `compile-requirements`, rather than
  from `upgrade`. (The base target is the one that actually needs it.)
  This also lets us remove the explicit `pip install pip-tools` line.
- Install the recompiled pip and pip-tools files right away, not after the
  loop. When we upgrade pip-tools, we want to use the upgraded version,
  not the previous version. This requires moving the pip-tools.txt
  recompilation outside of the loop and into its own explicit line.
- Don't upgrade pip if we're not running `make upgrade` (respect the
  compile options).
- Remove apparently-unneeded `--no-emit-trusted-host --no-emit-index-url`
  options (we don't pass trusted-host or index-url options).
2023-04-17 17:21:48 +00:00
Usama Sadiq
7296c06b49 Update docutils & Sphinx constraints (#31152)
* fix: remove sphinx and docutils constraint
* fix: pin docutils<0.19 version

Co-authored-by: edX requirements bot <devops+edx-requirements-bot@edx.org>
2022-10-14 11:44:18 +05:00
Régis Behmo
a131d63608 feat: run mypy as part of testing the codebase
The edx-platform codebase already includes quite a few type annotations, but
they were not regularly checked. This may cause problems, when the annotations
themselves include errors (as we found out in some of the learning_sequences
annotations). So here, we add mypy as a dev requirement and introduce a make
command to run mypy regularly. Mypy runs on a very small portion of the total
edx-platform, as configured in mypy.ini. Our hope is that developers will add
more and more modules to this configuration file, until we can eventually run
mypy on the full code base.

See discussion: https://discuss.openedx.org/t/dev-notes-running-mypy-on-edx-platform/4860
2021-05-27 13:54:37 -04:00
Adam Stankiewicz
c7b510241a upgrade edx-enterprise to 3.2.10 2020-05-08 16:13:36 -04:00
Alex Dusenbery
1b1c6c756f Add pywatchman and remove pyinotify as a local requirement. 2020-04-24 13:33:39 -04:00
Jeremy Bowman
0cb7539999 Python dependencies cleanup (#22612) 2019-12-27 11:00:46 -05:00
Jeremy Bowman
b2046f6674 Switch make upgrade to Python 3.5 (#22609)
* Switch make upgrade to Python 3.5

* bok-choy fixes, constrain django-debug-toolbar

* Remove flaky bok-choy test
2019-12-26 15:13:02 -05:00
Awais Qureshi
222523ec24 BOM-1083
Upgrade django-debug-toolbar
2019-12-13 16:08:00 +05:00
Ned Batchelder
9e50a83196 Use latest sphinxcontrib-openapi on GitHub to get a feature we need 2019-11-01 07:26:20 -04:00
Ned Batchelder
d71224e0a1 Use sphinxcontrib-openapi to do the heavy lifting of Open API rendering. 2019-10-22 17:45:28 -04:00
Ned Batchelder
cdac1f4abb Doc tooling for static API docs 2019-09-17 16:53:07 -04:00
Feanil Patel
dfe77a968e Remove the mongo plugin for the djnago-debug-toolbar.
We are currently running this plugin from a has directly off of master
to get support for a newer version of DJDT.  However even on master
there is not yet support for python 3.  We're running into this when
running runserver and when collecting static assets.

A quick survey of the development team at edX shows that people are no
longer actively using this debug panel.(14 responders all saying no to
the question "In the last year have you used the mongo portion of the
django-debug-toolbar in edx-platform?")

This makes sense since the module store and courseware related
developement is not very active right now.  Given all this, I'm removing
this toolbar for now and if we need it again we can survey what's
available at that time to choose the best tool.
2019-09-12 10:18:46 -04:00
Feanil Patel
9acad23fc4 Remove snakefood and our usage of it.
Unfortunately snakefood is not supported in python3 so I'm removing it
and the tools built on top of it for now as they are not in active use.

If you're looking at this wishing it still existed,

Check out https://github.com/bwohlberg/jonga or https://pypi.org/project/findimports/
2019-09-12 10:18:46 -04:00
Mushtaq Ali
fc8f7da68e edx-enterprise version bump to 1.3.9 - ENT-1736 2019-03-29 19:36:04 +05:00
singuliere
631c173b1b INCR-82 remove dependency on code_block_timer 2019-02-14 00:51:04 +01:00
Ned Batchelder
75b051b336 Use a contraints.txt file to force versions. 2018-12-11 17:13:41 -05:00
Squirrel18
48e6ce6336 add python-modernize to development dependencies file. 2018-06-25 16:56:13 -05:00
Stuart Young
bfd2f1c8f8 add script to detect dead code 2018-06-08 14:53:17 -04:00
Jeremy Bowman
1f3f0e2fb9 TE-2547 Add dependency analysis scripts 2018-04-19 13:48:08 -04:00
Jeremy Bowman
28d291dce7 TE-2527 Move test and dev dependencies out of base.in 2018-04-18 14:44:31 -04:00
Jeremy Bowman
9ca9aa44c6 PLAT-2060 Use pip-tools to manage requirements files (take 2)
This reverts commit a7fa0c211d.
2018-04-12 17:22:48 -04:00
Feanil Patel
a7fa0c211d Revert "PLAT-2060 Use pip-tools to manage requirements files" 2018-04-10 12:54:41 -04:00
Jeremy Bowman
432347b881 PLAT-2060 Use pip-tools to manage requirements files 2018-04-09 17:07:02 -04:00