Skip to content

WHForks/lms

 
 

Repository files navigation

JetBrains Academy Learning Management System

built with nix built with garnix

Local Development Setup

These instructions mostly repeat the process scripted in the Dockerfile, with some minor adjustments for the local development.

Local environment uses Nix and only supports Nix as an official method. Consult Nix installation instructions if you don't have Nix installed yet.

If you don't want to install Nix, consult default.nix file to see what packages you need to install manually.

Building frontend code

These commands are expected to be run from the frontend directory.

In order to build the frontend, you need to

  1. Run yarn install
  2. Run yarn run local:1 to build the frontend code.
  3. Run yarn run build:css to only build the CSS. local:1 task also runs this command.

It is expected that frontend/assets/v1/dist folder will contain the output artifacts.

Create Python environment

Create and edit a local copy of the environment config

Copy the environment config: cp lms/settings/.env.example .env and fill AWS.* variables with some non-empty strings, e.g. AWS_S3_ACCESS_KEY_ID=asd

Append the localhost domain name at the end of the file, if you want to access the LMS in dev mode using "localhost:8001" URL:

LMS_DOMAIN=localhost
SITE_ID=1

Run process compose for local development

Run process-compose with the .env file you created to build frontend, run migrations and start the development server:

ENV_FILE=.env process-compose up

Run tests

Run tests using pytest. If you want to run tests from some specific folders, append the folder names to the command: pytest apps/core

Testing the JetBrains Academy integration locally

  1. Run https://code.jetbrains.team/p/edu/repositories/educational-server locally
  2. Set the SUBMISSION_SERVICE_URL and SUBMISSION_SERVICE_TOKEN variables to the values from the .env.example file
  3. Enable internal mode in your IDE: https://plugins.jetbrains.com/docs/intellij/enabling-internal.html
  4. Install the JetBrains Academy plugin
  5. Open any JBA course
  6. Use the "Change Submissions Service URL" action to set the URL to http://localhost:8080

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 79.2%
  • HTML 9.0%
  • JavaScript 6.6%
  • SCSS 3.3%
  • Nix 0.8%
  • TypeScript 0.8%
  • Other 0.3%