Skip to content

Commit

Permalink
🔖(chore) release minor version
Browse files Browse the repository at this point in the history
Added
- On self-paced courses with single run display a simplified
  version of the syllabus.

Changed
- Improve lyra error catching management

Fixed
- Fix LyraPopIn critical error
- Fix typo in page-admin autocomplete url path
- Fix course enrollment count shouldn't include the hidden runs.
- Fix RDFa errors on Google Search Console
- fix npm development version generated by setuptools_scm

Removed
- csrftoken in richie context
  • Loading branch information
jbpenrath committed Aug 21, 2024
1 parent 6248ab4 commit b944adc
Show file tree
Hide file tree
Showing 32 changed files with 2,313 additions and 13 deletions.
15 changes: 9 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ Versioning](https://semver.org/spec/v2.0.0.html).

## [Unrealeased]

## [2.29.0]

### Added

- On self-paced courses with single run display a simplified
version of the syllabus.

### Changed

- Improve lyra error catching management
Expand All @@ -24,11 +31,6 @@ Versioning](https://semver.org/spec/v2.0.0.html).

- csrftoken in richie context

### Added

- On self-paced courses with single run display a simplified
version of the syllabus.

## [2.28.1]

### Fixed
Expand Down Expand Up @@ -2157,7 +2159,8 @@ us:
- finish integrating the missing pages and improve the sandbox environment;
- test and polish the use of richie as a django app / node dependency.

[unreleased]: https://github.com/openfun/richie/compare/v2.28.1...master
[unreleased]: https://github.com/openfun/richie/compare/v2.29.0...master
[2.29.0]: https://github.com/openfun/richie/compare/v2.28.1...v2.29.0
[2.28.1]: https://github.com/openfun/richie/compare/v2.28.0...v2.28.1
[2.28.0]: https://github.com/openfun/richie/compare/v2.27.0...v2.28.0
[2.27.0]: https://github.com/openfun/richie/compare/v2.26.0...v2.27.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ django-storages==1.13.2
dockerflow==2022.8.0
gunicorn==22.0.0
psycopg2-binary==2.9.9
richie==2.28.1
richie==2.29.0
unidecode==1.3.6 # required by django-check-seo
sentry-sdk==2.11.0
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"CMS"
],
"dependencies": {
"richie-education": "2.28.1"
"richie-education": "2.29.0"
},
"devDependencies": {
"@formatjs/cli": "6.2.4",
Expand Down
4 changes: 2 additions & 2 deletions docs/cookiecutter.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ If you chose to install Cookiecutter, you can now run it against our
[template][2] as follows:

```bash
cookiecutter gh:openfun/richie --directory cookiecutter --checkout v2.28.1
cookiecutter gh:openfun/richie --directory cookiecutter --checkout v2.29.0
```

If you didn't want to install it on your machine, we provide a Docker image
built with our [own repository][4] that you can use as follows:

```bash
docker run --rm -it -u $(id -u):$(id -g) -v $PWD:/app \
fundocker/cookiecutter gh:openfun/richie --directory cookiecutter --checkout v2.28.1
fundocker/cookiecutter gh:openfun/richie --directory cookiecutter --checkout v2.29.0
```

The `--directory` option is to indicate that our Cookiecutter template is in
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "richie-education",
"version": "2.28.1",
"version": "2.29.0",
"description": "A CMS to build learning portals for Open Education",
"main": "sandbox/manage.py",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion tests_e2e/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "richie-tests-e2e",
"version": "2.28.1",
"version": "2.29.0",
"description": "End-to-end tests for the Richie project",
"repository": "https://github.com/openfun/richie",
"author": "Open FUN (France Université Numérique)",
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "richie-education-docs",
"version": "2.28.1",
"version": "2.29.0",
"description": "Documentation website for the Richie project",
"scripts": {
"build": "docusaurus build",
Expand Down
46 changes: 46 additions & 0 deletions website/versioned_docs/version-2.29.0/accessibility-testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
id: accessibility-testing
title: Automated accessibility checks
sidebar_label: Accessibility testing
---

Richie includes automated accessibility checks built through a `Cypress` end-to-end testing infrastructure.

Automated accessibility checks can only surface around 30% of possible problems on any given page. This does not mean they are not useful, but they cannot replace human audits and developer proficiency.

We use `axe` to run these checks. You can find more about axe on the [`axe-core` GitHub repository](https://github.com/dequelabs/axe-core).

## Testing environment setup

Both `Cypress` and `axe` are used through their respective NPM packages. This means everything goes through `yarn` commands. You need to have `node` and `yarn` installed locally to run the tests.

```bash
cd tests_e2e
yarn install
```

This should install everything you need.

## Running the tests

There are two ways to use the `Cypress` tests: through a terminal-based runner and through the `Cypress` UI. Both are started through `yarn` but they have different use cases.

```bash
yarn cypress run
```

You can start by running the tests directly from the terminal. This is the quickest way to make sure all views pass checks (or find out which ones do not). This is also the starting point for work on running `Cypress` in the CI.

```bash
yarn cypress open
```

This command simply opens the `Cypress` UI. From there, you can run all or some of the test suites with live reloading. This is a great way to understand why some tests are failing, especially when it comes to a11y violations.

When there are a11y violations, an assertion fails and prints out a list in the `Cypress` UI. You can then click on a violation to print more information in the browser console.

## Documentation reference

- [List of all possible violations covered by `axe`](https://dequeuniversity.com/rules/axe/3.4)
- [`Cypress` documentation](https://docs.cypress.io)
- [`axe` and `Cypress` integration](https://github.com/avanslaars/cypress-axe)
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
id: course-run-synchronization-api
title: Course run synchronization API
sidebar_label: course run sync
---

API endpoint allowing remote systems to synchronize their course runs with a Richie instance.

## Synchronization endpoint [/api/1.0/course-runs-sync]

This documentation describes version "1.0" of this API endpoint.

### Synchronize a course run [POST]

It takes a JSON object containing the course run details:

- resource_link: `https://lms.example.com/courses/course-v1:001+001+001/info` (string, required) -
url of the course syllabus on the LMS from which a unique course identifier can be extracted
- start: `2018-02-01T06:00:00Z` (string, optional) - ISO 8601 date, when this session of the
course starts
- end: `2018-02-28T06:00:00Z` (string, optional) - ISO 8601 date, when this session of the course
ends
- enrollment_start: `2018-01-01T06:00:00Z` (string, optional) - ISO 8601 date, when enrollment
for this session of the course starts
- enrollment_end: `2018-01-31T06:00:00Z` (string, optional) - ISO 8601 date, when enrollment for
this session of the course ends
- languages: ['fr', 'en'] (array[string], required) - ISO 639-1 code (2 letters) for the course's
languages


+ Request (application/json)
+ Headers
+ Authorization: `SIG-HMAC-SHA256 xxxxxxx` (string, required) - Authorization header
containing the digest of the utf-8 encoded json representation of the submitted data
for the given secret key and SHA256 digest algorithm (see [synchronizing-course-runs]
for an example).
+ Body
```json
{
"resource_link": "https://lms.example.com/courses/course-v1:001+001+001/info",
"start": "2021-02-01T00:00:00Z",
"end": "2021-02-31T23:59:59Z",
"enrollment_start": "2021-01-01T00:00:00Z",
"enrollment_end": "2021-01-31T23:59:59Z",
"languages": ["en", "fr"]
}
```

+ Response 200 (application/json)

+ Body
```json
{
"success": True
}
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 81 additions & 0 deletions website/versioned_docs/version-2.29.0/building-the-frontend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
id: building-the-frontend
title: Building Richie's frontend in your own project
sidebar_label: Building the frontend
---

Richie offers plenty of opportunities to customize the way it works and make it suit the needs of your own project. Most of these go through Django settings.

Part of Richie is a React frontend however. If you want to change how it works in ways that cannot be changed from the Django settings, you will need to build your own frontend.

## Installing `richie-education`

If you have not already, you should create a directory for the frontend in your project. We recommend you mirror Richie's file structure so it's easier to keep track of the changes you make.

```bash
mkdir -p src/frontend
```

Then, you need to bootstrap your own frontend project in this new directory.

```bash
cd src/frontend
yarn init
```

With each version of Richie, we build and publish an `NPM` package to enable Richie users to build their own Javascript and CSS. You're now ready to install it.

```bash
yarn add richie-education
```

In your `package.json` file, you should see it in the list of dependencies. Also, there's a `node_modules` directory where the package and its dependencies are actually installed.

```json
"dependencies": {
"richie-education": "1.12.0"
},
```

## Building the Javascript bundle

You are now ready to run your own frontend build. We'll just be using webpack directly.

```bash
yarn webpack --config node_modules/richie-education/webpack.config.js --output-path ./build --richie-dependent-build
```

Here is everything that is happening:

- `yarn webpack` — run the webpack CLI;
- `--config node_modules/richie-education/webpack.config.js` — point webpack to `richie-education`'s webpack config file;
- `--output-path ./build` — make sure we get our output where we need it to be;
- `--richie-dependent-build` — enable some affordances with import paths. We pre-configured Richie's webpack to be able to run it from a dependent project.

You can now run your build to change frontend settings or override frontend components with your own.

## Building the CSS

If you want to change styles in Richie, or add new styles for components & templates you develop yourself, you can run the SASS/CSS build yourself.

Start by creating your own `main` file. The `_` underscore at the beginning is there to prevent sass from auto-compiling the file.

```bash
mkdir -p src/frontend/scss
touch src/frontend/scss/_mains.scss
```

Start by importing Richie's main scss file. If you prefer, you can also directly import any files you want to include — in effect re-doing Richie's `_main.scss` on your own.

```sass
@import "richie-education/scss/main";
```

You are now ready to run the CSS build:

```
cd src/frontend
yarn build-sass
```

This gives you one output CSS file that you can put in the static files directory of your project and use to override Richie's style or add your own parts.
65 changes: 65 additions & 0 deletions website/versioned_docs/version-2.29.0/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
id: contributing-guide
title: Contributing guide
sidebar_label: Contributing guide
---

This project is intended to be community-driven, so please, do not hesitate to get in touch if you have any question related to our implementation or design decisions.

We try to raise our code quality standards and expect contributors to follow the recommandations
from our [handbook](https://openfun.gitbooks.io/handbook/content).

## Checking your code

We use strict flake8, pylint, isort and black linters to check the validity of our backend code:

$ make lint-back

We use strict eslint and prettier to check the validity of our frontend code:

$ make lint-front

## Running tests

On the backend, we use pytest to run our test suite:

$ make test-back

On the frontend, we use karma to run our test suite:

$ make test-front

## Running migrations

The first time you start the project with `make bootstrap`, the `db` container automatically
creates a fresh database named `richie` and performs database migrations. Each time a new
**database migration** is added to the code, you can synchronize the database schema by running:

$ make migrate

## Handling new dependencies

Each time you add new front-end or back-end dependencies, you will need to rebuild the
application. We recommend to use:

$ make bootstrap

## Going further

To see all available commands, run:

$ make

We also provide shortcuts for docker compose commands as sugar scripts in the
`bin/` directory:

```
bin
├── exec
├── pylint
├── pytest
└── run
```

More details and tips & tricks can be found in our [development with Docker
documentation](docker-development.md)
Loading

0 comments on commit b944adc

Please sign in to comment.