Commit Graph

59 Commits

Author SHA1 Message Date
Kyle McCormick
29ed3d911a build: expose working openedx/lms and openedx/cms docker images (#29549)
This commits prepares edx-platform's experimental Dockerfile
for optional use in devstack. Presently, the image built by this
Dockerfile isn't used anywhere.

Notable changes:
* Drop the openedx/edx-platform image name in favor of
  openedx/lms and openedx/cms.
* Drop the newrelic stages and tags.
* Create openedx/lms-dev and openedx/cms-dev image
  variants which use Django devserver, install dev
  requirements, and specify devstack Django settings.
* Add config files at (lms,cms)/envs/devstack-experimental.yml,
  extracted from the existing edxapp docker image.
* Adds three new scripts, each of which replaces an Ansible
  or Paver-supported function with a pure bash + Django
  management command implementation.
2022-01-10 11:20:10 -05:00
Ned Batchelder
84b5d8dd28 build: keep Makefile comments from appearing while running make (#29669)
These comments are meant for the Makefile maintainers to read, not the
user running make.  We can prefix them with @ to keep make from echoing
them while running.
2021-12-22 15:52:22 -05:00
Usama Sadiq
5a6d056568 build: remove python 3.5 requirement files (#29070) 2021-10-20 15:59:35 +05:00
Soban Javed
8fbee9c23f feat: upgrade Django version to 3.2
Removing samesite cookies package as we dont need this on Django 3.2
2021-10-14 15:43:10 +05:00
Soban Javed
c40fb1e129 refactor: remove pyjwt related temporary solution
As we have upgraded pyjwt in edx-platform and also removed these pins from common constraint files in edx-l;int, so we don't need this anymore.

https://github.com/edx/edx-lint/pull/203
2021-10-14 13:02:22 +05:00
Feanil Patel
73478561a5 Revert "feat: upgrade Django version to 3.2" 2021-10-13 15:09:36 -04:00
Soban Javed
e4379e277e feat: upgrade Django version to 3.2
- Remove django-cookie-samesite as it isn't required on Django 3.2
2021-10-08 14:47:07 +05:00
Awais Qureshi
81bf0f75c9 chore: removing drf-jwt pin and checking tests. (#28516)
* chore: removing drf-jwt pin.
2021-10-05 16:50:14 +05:00
Awais Qureshi
57a033d0ae feat: Don't Use django-cookies-samesite on Django > 3.1 2021-09-22 09:49:03 +05:00
Awais Qureshi
708dbb71ec fix: removing jango-cookies-samesite package for django32. 2021-09-20 19:01:54 +05:00
Soban Javed
56d12bf230 feat!: upgrade pyjwt to version 2.1.0 2021-09-17 16:08:15 +05:00
DawoudSheraz
e986d360c9 refactor: move course location util to common djangoapp instead of xmodule 2021-09-03 12:40:28 +05:00
Dillon Dumesnil
b18f9df299 fix: Transifex fix for local requirements during paver setup
Pull Translations has been broken in edx-platform for a number of months
partially in part because of an import issue with local packages during
paver setup. This solves that problem by running make requirements as part
of the pull_translations make target.

Note: This should not be the default behavior. This is only a patch so the
translation job works again. The paver job being run (i18n_compilejs) does
the same install before it runs so we are doubling up there which is not
great.

PROD-2455
2021-08-12 14:39:06 -04:00
M. Zulqarnain
fb86d4111b BOM-2247 - Upgrade pip-tools (#27861)
* chore: upgrade pip-tools

* replace --no-index with --no-emit-index-url

* upgrade pip

Co-authored-by: edX requirements bot <49161187+edx-requirements-bot@users.noreply.github.com>
2021-06-15 17:02:22 +05:00
Usama Sadiq
b58e27b45e refactor: setup python38 requirements for codejail environments (#27768)
separate shared requirements between platform and sandbox
move python 3.5 constraints in sandbox requirements
2021-06-07 17:50:43 +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
Feanil Patel
16e4aa3c62 chore: Remove decentralized devstack config.
We have decided not to pursue the decentralized devstack design right
now and so we want to cleanup files and task that were built as a part
of the process.

Related Ticket: ARCHBOM-1685
2021-04-09 15:50:03 -04:00
Ned Batchelder
981ecb675e build: private.txt files weren't handled properly
The requirements/edx/private.txt file is for dev's own private package
needs.  There are two installation mechanisms in edx-platform, and
neither handled the file properly:

- `paver install_prereqs` had the wrong file name.  The file was moved
  almost three years ago, and paver wasn't kept up.

- `make requirements` used `private.*` which included private.in, which
  pip-sync balks at.
2021-02-26 22:19:47 -05:00
Régis Behmo
14cb7b6056 Add a make target to compile requirements (without upgrade)
I grew tired of modifying the Makefile to compile requirements without
upgrading them. Also, installing pip-tools should not be part of the
compile-requirements target, so a separate target was created.
2020-10-29 22:59:52 +01:00
Michael Terry
ca75c474e1 Use verbose output when validating new translations
When running "make pull_translations", this will print any
validation errors on the console, rather than stuffing them into
a .prob file.

This helps when looking at failing jenkins log files.
2020-10-20 11:20:34 -04:00
Régis Behmo
a41f2a5ca8 Rename "featuretoggles" docs target to "technical"
We also split the feature toggle and settings docs in different pages.
2020-10-01 16:35:48 +02:00
Kyle McCormick
b24cb48eb0 Decentralized Devstack changes: Add and push Dockerfile; add decentralized devstack settings (#24666)
* Add and push Dockerfile; add decentralized devstack settings

Co-Authored-By: Diana Huang <dkh@edx.org>
Co-Authored-By: Kyle McCormick <kmccormick@edx.org>

* Remove Python requirements hack

Remove the attempted optimization to the installation of Python
package dependencies.  The dependencies in edx-platform change
about three times per day, so this was of dubious value.  And
because npm is run through nodeenv, which is a Python package,
the Python dependencies installation has to happen first.

* ARCHBOM-1439: Changing workdir to /edx/app/edxapp/edx-platform (#24835)

Context: The Dockerfile tries to stay in sych with legacy stuff.
In the ansible we configure the directory structure such that things
relating to the app but not in the codebase,
such as the env file wind up in /edx/app/edxapp/.
And the codebase winds up in /edx/app/edxapp/edx-platform.

I think due to accident, the dockerfile does
/edx/app/edx-platform/edx-platform instead of /edx/app/edxapp/edx-platform.

This commit tries to have Dockerfile more reflect what is currently happening in production

* Update ports for decentralized devstack ARCHBOM-1447 (#24841)

Switch from the LMS ports we've historically used for NGINX to those used for gunicorn, and fix the Studio ports to match the ones we've historically used for its gunicorn service. Also removed some leftover bits of the requirements hack.

Co-authored-by: Adam Blackwell <ablackwell@edx.org>
Co-authored-by: Diana Huang <dkh@edx.org>
Co-authored-by: jinder1s <msingh@edx.org>
Co-authored-by: Jeremy Bowman <jbowman@edx.org>
Co-authored-by: Manjinder Singh <49171515+jinder1s@users.noreply.github.com>
2020-09-03 11:47:08 -04:00
Robert Raposa
2c8105f7ae [BD-21] Generate feature toggle documentation
We introduce a new documentation target, where we use the featuretoggles
Sphinx extension from code-annotations to generate human-readable
documentation of feature toggles in edx-platform. The annotation report
is generated on-the-fly based on the standard feature toggle
configuration file in code-annotations.

In addition, we add new doc.in & doc.txt requirement files that will be
pip-installed by readthedocs to generate the documentation targets.
2020-08-14 19:41:26 +02:00
Cory Lee
148b90358f Add Dockerfile (#23088)
* Add Dockerfile.
* Add gunicorn config files for local development.
* Add .dockerignore file.

Co-authored-by: Joseph Mulloy <jmulloy@edx.org>
Co-authored-by: Fred Smith <derf@edx.org>
Co-authored-by: Adam Blackwell <ablackwell@edx.org>
Co-authored-by: Kyle McCormick <kmccormick@edx.org>
Co-authored-by: Nadeem Shahzad <nshahzad@edx.org>
2020-07-22 17:45:23 -04:00
Jeremy Bowman
47d15ff1a8 Update tested versions of Python and Django (#24006)
Cleaned up a few more things about the testing configuration now that we've deployed Django 2.2 to production:

* Go back to a single version of django-oauth-toolkit, tox doesn't need to vary it anymore
* Go back to PyPI release of django-method-override
* Remove no longer needed dependency on python-oauth2 (we already removed the package it was used by)
* Update prepare_xdist_nodes.sh with new Django requirements file options
2020-05-19 12:19:20 -04:00
Tim McCormack
5bb89d95c5 Revert "Revert "Fix Jenkins virtualenv issue that masked stale dependency" (#23828)" (#23866)
This reverts commit 70600d79d7.
2020-05-01 17:33:38 +00:00
Tim McCormack
70600d79d7 Revert "Fix Jenkins virtualenv issue that masked stale dependency" (#23828)
* Revert "Use pip-sync to make sure that dep cache tarball can go safely stale"

This reverts commit d435f4cd3e.

* Revert "Extract worker setup into own shell script, as much as possible"

This reverts commit 0a079e757c.
2020-04-29 02:15:57 +00:00
Tim McCormack
d435f4cd3e Use pip-sync to make sure that dep cache tarball can go safely stale
This "fixes" egg-links in a really hacky way to compensate for the lack
of a real relocatable virtualenv.
2020-04-28 12:56:31 -04:00
Calen Pennington
fbd7507af5 Only --rebuild on the first call to pip-compile 2020-03-05 14:00:16 -05:00
Adeel Khan
21535759de Use django-statici18n to generate djangojs.js 2020-02-24 12:56:25 +05:00
Adeel Khan
5dae91bdf8 Removing paver command
This is not needed in Makefile as
all the logic and invocation of
compilejs would be done via
ecommerce-script repo.

PROD-960
2020-02-11 23:24:39 +05:00
Adeel Khan
9d6fd1d306 Adds compilejs task to paver.
This patch adds compilejs
management command to be executed
on pull translations enabling
availability of js/jsx translations
for  lms/cms code.

PROD-960
2020-01-29 22:34:53 +05:00
usamasadiq
1e33a4f3ba BOM-1143
Django-auth-toolkit update

Pinned the latest commit from github to get Django2.2 support in testing.
Pinned the zipp<2.0.0 to get Python<3.5 support too.
2020-01-24 11:52:23 +05:00
Ned Batchelder
079d17b899 Remove code that is now in edx_api_doc_tools 2020-01-21 11:15:41 -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
Ned Batchelder
d71224e0a1 Use sphinxcontrib-openapi to do the heavy lifting of Open API rendering. 2019-10-22 17:45:28 -04:00
Régis Behmo
ae216c8584 Rename API decorators to "apidocs" to be provider-agnostic
The API documentation decorators do not have to leak which solution we
use to generate the docs. Here, and as discussed in PR #21820, we rename
the `openapi` module to `apidocs`, and we make sure that this module
includes all the right functions to document API Views without referring
to Open API.
2019-10-14 08:14:18 +02:00
Ned Batchelder
cdac1f4abb Doc tooling for static API docs 2019-09-17 16:53:07 -04:00
Ned Batchelder
3b69fe0b47 Move existing docs down a level to make room for more 2019-07-23 08:31:15 -04:00
Feanil Patel
14c642dab6 Add a script requirements file to upgrade automation.
The xblock counting script had a requirements file that was not
previously being tracked and had an out of date version of requests.
Add it to the `upgrade` make target so that it stays up to date.
2019-06-07 15:10:40 -04:00
edX requirements bot
8022a7e3b2 Python Requirements Update (#20747)
* Updating Python Requirements

* Don't rely on pip-compile cache

* Fix tornado dependency resolution
2019-06-05 13:02:17 -04:00
Jeremy Bowman
34a0bd91e8 TE-2850 Resume RTD doc builds (#19910) 2019-04-18 15:41:13 -04:00
Jeremy Bowman
3b7817aec5 Add pull and shell make targets 2019-02-06 12:06:07 -05:00
Ned Batchelder
f90fd16523 Use loops for the requirements files 2018-12-07 11:53:27 -05:00
ayub-khan
d63fea78f3 make target to check if translations up-to-date 2018-11-23 09:54:50 +05:00
Calen Pennington
e1ebb8fe71 Use -v during pip-compiles to get more useful debug information in the case of failures 2018-11-02 15:36:01 -04:00
Ayub-khan
b42bd2bf7d Merge pull request #18565 from edx/fix-make-extract-translations
Fixed make extract_translations
2018-07-12 13:01:02 +05:00
ayub-khan
23dbb85007 Fixed make extract_translations 2018-07-12 11:32:47 +05:00
ayub-khan
6d193a4bc7 Remove i18n-tools strict generate to fix jenkins
job to work even if some resource is not available.
2018-07-12 11:12:45 +05:00
Jeremy Bowman
9311f268c1 TE-2593 Make pip-compile output whitespace consistent 2018-06-19 15:09:11 -04:00