Skip to content

Commit

Permalink
Merge pull request #7184 from learningequality/release-v0.14.x
Browse files Browse the repository at this point in the history
Develop <- v0.14.x
  • Loading branch information
rtibbles committed Jul 2, 2020
2 parents 94ed588 + fa9ea9e commit 1b8c60b
Show file tree
Hide file tree
Showing 433 changed files with 13,482 additions and 10,065 deletions.
68 changes: 27 additions & 41 deletions .buildkite/build_worksheet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,32 @@

set -euo pipefail

SCRIPTPATH=$(pwd)
PIP_PATH="$SCRIPTPATH/env/bin/pip"
PYTHON_PATH="$SCRIPTPATH/env/bin/python"

echo "Now creating virtualenv..."
virtualenv -p python3 env
if [ $? -ne 0 ]; then
echo ".. Abort! Can't create virtualenv."
exit 1
fi

PIP_CMD="$PIP_PATH install gspread==3.1.0"
echo "Running $PIP_CMD..."
$PIP_CMD
if [ $? -ne 0 ]; then
echo ".. Abort! Can't install '$PIP_CMD'."
exit 1
fi

PIP_CMD="$PIP_PATH install --upgrade oauth2client"
echo "Running $PIP_CMD..."
$PIP_CMD
if [ $? -ne 0 ]; then
echo ".. Abort! Can't install '$PIP_CMD'."
exit 1
fi

PIP_CMD="$PIP_PATH install PyOpenSSL"
echo "Running $PIP_CMD..."
$PIP_CMD
if [ $? -ne 0 ]; then
echo ".. Abort! Can't install '$PIP_CMD'."
exit 1
fi

PYTHON_CMD="$PYTHON_PATH .buildkite/create_integration_testing_worksheet.py"
$PYTHON_CMD
if [ $? -ne 0 ]; then
echo ".. Abort! Can't execute '$PYTHON_CMD'."
exit 1
fi
docker build \
--iidfile build_test_iid \
-t testing_worksheet \
-f docker/build_test_worksheet.dockerfile \
.

CIDFILE=build_test_cid

# If any error occurs, remove the CIDFILE that's about to be generated
trap "rm $CIDFILE" err

docker run \
--cidfile $CIDFILE \
-e GOOGLE_SPREADSHEET_CREDENTIALS \
-e BUILDKITE_TAG \
-e BUILDKITE_PULL_REQUEST_BASE_BRANCH \
-v $GOOGLE_SPREADSHEET_CREDENTIALS:$GOOGLE_SPREADSHEET_CREDENTIALS \
$(cat ./build_test_iid)

CID=$(cat $CIDFILE)

# Now that we know a container was created, remove it on exit
trap "rm build_test_iid && docker rm $CID" exit

docker cp \
$CID:/kolibri/.buildkite/spreadsheet-link.txt \
$PWD/.buildkite/

buildkite-agent artifact upload '.buildkite/spreadsheet-link.txt'
23 changes: 13 additions & 10 deletions .buildkite/create_integration_testing_worksheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,18 @@
SPREADSHEET_TPL_KEY = "1kVhg0evo9EV2aDo10KdIIjwqsoT4rISR7dJzf6s_-RM"
SPREADSHEET_TITLE = "Integration testing with Gherkin scenarios"


# Use to get the Kolibri version, for the integration testing spreadsheet
SHEET_TAG = os.getenv("BUILDKITE_TAG")
def get_tag_name():
if os.getenv("BUILDKITE_TAG"):
return os.getenv("BUILDKITE_TAG")
elif os.getenv("BUILDKITE_PULL_REQUEST_BASE_BRANCH"):
return os.getenv("BUILDKITE_PULL_REQUEST_BASE_BRANCH")
else:
return "develop"


SHEET_TAG = get_tag_name()
SHEET_TPL_COLUMN = "B"
SHEET_TPL_START_VALUE = 5
SHEET_INDEX = 0
Expand All @@ -34,13 +44,6 @@
if SHEET_PARENT_CONTAINER_ID == "" or SHEET_PARENT_CONTAINER_ID is None:
SHEET_PARENT_CONTAINER_ID = "10bMsasxKvpi_9U1NU9rq7YBnFBiCkYrc"

if SHEET_TAG == "" or SHEET_TAG is None:
buildkite_branch = os.getenv("BUILDKITE_PULL_REQUEST_BASE_BRANCH")
if buildkite_branch != "" or buildkite_branch is not None:
SHEET_TAG = buildkite_branch
else:
SHEET_TAG = "develop"

if SPREADSHEET_CREDENTIALS == "" or SPREADSHEET_CREDENTIALS is None:
logging.info("Spreadsheet credentials not exist")
sys.exit()
Expand All @@ -61,8 +64,8 @@


def get_feature_name(str_arg):
str_name = str_arg.replace("-", " ").replace(".feature", " ").capitalize()
return str_name.strip()
str_name = str_arg.replace("-", " ").replace(".feature", " ").strip().split("/")[-1]
return str_name.capitalize()


def get_role_name(str_arg):
Expand Down
7 changes: 3 additions & 4 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ steps:
env:
LE_TRIGGERED_FROM_BUILD_ID: "${BUILDKITE_BUILD_ID}"
LE_TRIGGERED_FROM_JOB_ID: "${BUILDKITE_JOB_ID}"
LE_TRIGGERED_FROM_KOLIBRI_VERSION_TAG: "${BUILDKITE_TAG}"
LE_KOLIBRI_RELEASE: "${BUILDKITE_TAG:-false}"

- label: Build Windows installer
command: .buildkite/build_windows_installer.sh
Expand Down Expand Up @@ -54,13 +54,12 @@ steps:
depends_on:
- deb-build

- label: Build Windows installer
command: .buildkite/build_windows_installer.sh

- wait

- label: Upload Release Artifacts
command: .buildkite/setup_and_upload_artifact.sh
agents:
vader=true
if: build.tag != null

- wait
Expand Down
8 changes: 1 addition & 7 deletions .buildkite/setup_and_upload_artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

PIP_CMD="$PIP_PATH install -r requirements/pipeline.txt"
PIP_CMD="$PIP_PATH install -r requirements/release_upload.txt"
echo "Running $PIP_CMD..."
$PIP_CMD
if [ $? -ne 0 ]; then
Expand All @@ -26,12 +26,6 @@ echo "Now excuting upload artifacts script..."
mkdir -p dist
buildkite-agent artifact download 'dist/*' dist/

{
buildkite-agent artifact download '*.exe' dist/ --step "Sign Windows installer"
} || {
echo "No signed Windows installer found"
}

$PYTHON_CMD
if [ $? -ne 0 ]; then
echo ".. Abort! Can't execute '$PYTHON_CMD'."
Expand Down
2 changes: 2 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,5 @@ Please feel free to add your name to this list if you make a PR
* Brandon Nguyen (bransgithub)
* Chris Castle (crcastle)
* Julián Duque (julianduque)
* Brian Kwon (br-kwon)
* Jacob Pierce (nucleogenesis)
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# List most target names as 'PHONY' to prevent Make from thinking it will be creating a file of the same name
.PHONY: help clean clean-assets clean-build clean-pyc clean-docs lint test test-all assets coverage docs release test-namespaced-packages staticdeps staticdeps-cext writeversion setrequirements buildconfig pex i18n-extract-frontend i18n-extract-backend i18n-transfer-context i18n-extract i18n-django-compilemessages i18n-upload i18n-pretranslate i18n-pretranslate-approve-all i18n-download i18n-regenerate-fonts i18n-stats i18n-install-font i18n-download-glossary i18n-upload-glossary docker-whl docker-windows docker-demoserver docker-devserver docker-envlist
.PHONY: help clean clean-assets clean-build clean-pyc clean-docs lint test test-all assets coverage docs release test-namespaced-packages staticdeps staticdeps-cext writeversion setrequirements buildconfig pex i18n-extract-frontend i18n-extract-backend i18n-transfer-context i18n-extract i18n-django-compilemessages i18n-upload i18n-pretranslate i18n-pretranslate-approve-all i18n-download i18n-regenerate-fonts i18n-stats i18n-install-font i18n-download-translations i18n-download-glossary i18n-upload-glossary docker-whl docker-windows docker-demoserver docker-devserver docker-envlist

help:
@echo "Usage:"
Expand Down Expand Up @@ -210,7 +210,7 @@ i18n-pretranslate-approve-all:
i18n-convert:
python build_tools/i18n/crowdin.py convert-files

i18n-download:
i18n-download-translations:
python build_tools/i18n/crowdin.py rebuild-translations ${branch}
python build_tools/i18n/crowdin.py download-translations ${branch}
node build_tools/i18n/intl_code_gen.js
Expand All @@ -224,7 +224,12 @@ i18n-regenerate-fonts:
python build_tools/i18n/fonts.py generate-full-fonts
python build_tools/i18n/fonts.py generate-subset-fonts

i18n-update: i18n-download i18n-regenerate-fonts i18n-transfer-context
i18n-download: i18n-download-translations i18n-regenerate-fonts i18n-transfer-context

i18n-update:
echo "WARNING: i18n-update has been renamed to i18n-download"
$(MAKE) i18n-download
echo "WARNING: i18n-update has been renamed to i18n-download"

i18n-stats:
python build_tools/i18n/crowdin.py translation-stats ${branch}
Expand Down
11 changes: 9 additions & 2 deletions build_tools/i18n/intl_code_gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ const generateVueIntlItems = language => {
* we strip off the territory code if it's there.
*/
const vue_intl_code = language.intl_code.split('-')[0];
return `data.push(require('vue-intl/locale-data/${vue_intl_code}.js'));`;

// Exclude ach-ug language that is defined in language_info.json
if (vue_intl_code !== 'ach') {
return `data.push(require('vue-intl/locale-data/${vue_intl_code}.js'));`;
}
};

const vueIntlFooter = `
Expand Down Expand Up @@ -87,7 +91,9 @@ const generateIntlItems = language => {
filename += codes[4];
}

return `
// Exclude ach-ug language that is defined in language_info.json
if (language.intl_code !== 'ach-ug') {
return `
case '${language.intl_code}':
return new Promise(function(resolve) {
require.ensure(
Expand All @@ -97,6 +103,7 @@ const generateIntlItems = language => {
}
);
});`;
}
};

const intlFooter = `
Expand Down
14 changes: 4 additions & 10 deletions build_tools/i18n/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@
KEY_ENG_NAME = "english_name"
KEY_DEFAULT_FONT = "default_font"

IN_CTXT_LANG = {
KEY_CROWDIN_CODE: "ach",
KEY_INTL_CODE: "ach-ug",
KEY_LANG_NAME: "In-context translation",
KEY_ENG_NAME: "In-context translation",
KEY_DEFAULT_FONT: "NotoSans",
}


def to_locale(language):
"""
Expand Down Expand Up @@ -77,8 +69,10 @@ def available_languages(include_in_context=False, include_english=False):
for lang in languages:
if include_english or lang[KEY_INTL_CODE] != "en":
result.append(lang)
if include_in_context:
result.append(IN_CTXT_LANG)
# in-context language has been included in language_info.json,
# remove it if the parameter include_in_context is False
if lang[KEY_INTL_CODE] == "ach-ug" and not include_in_context:
result.remove(lang)
return result


Expand Down
14 changes: 14 additions & 0 deletions docker/build_test_worksheet.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM python:3.5-slim

WORKDIR /kolibri

COPY integration_testing integration_testing/

WORKDIR /kolibri/.buildkite

COPY .buildkite/create_integration_testing_worksheet.py \
requirements/build_test_worksheet.txt ./

RUN pip install -r build_test_worksheet.txt

CMD ["python", "create_integration_testing_worksheet.py"]
3 changes: 1 addition & 2 deletions docker/build_windows.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@ VOLUME /kolibridist/

# TODO(cpauya): Verify the checksums of the downloaded Python installers.

# Build the Kolibri Windows installer
CMD git clone https://github.com/learningequality/kolibri-installer-windows.git && \
cd kolibri-installer-windows && \
git checkout $KOLIBRI_WINDOWS_INSTALLER_VERSION && \
cd src && \
cp /kolibridist/kolibri-$KOLIBRI_VERSION*.whl . && \
export KOLIBRI_BUILD_VERSION=$KOLIBRI_VERSION && \
make && \
curl -sS https://www.python.org/ftp/python/3.4.3/python-3.4.3.msi --output "python-setup/python-3.4.3.msi" && \
curl -sS https://www.python.org/ftp/python/3.4.3/python-3.4.3.amd64.msi --output "python-setup/python-3.4.3.amd64.msi" && \
wine inno-compiler/ISCC.exe installer-source/KolibriSetupScript.iss && \
mv *.exe kolibri-$KOLIBRI_VERSION-unsigned.exe && \
cp *.exe /kolibridist/
2 changes: 1 addition & 1 deletion docker/env.list
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
KOLIBRI_VERSION

# Set the default version of the Windows Installer
KOLIBRI_WINDOWS_INSTALLER_VERSION=v1.4.0-beta1
KOLIBRI_WINDOWS_INSTALLER_VERSION=v1.4.0-beta2

# Make sure we don't record these docker runs in pingbacks
KOLIBRI_RUN_MODE="docker"
Expand Down
4 changes: 2 additions & 2 deletions docs/i18n.rst
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ Next, we download the latest translations from Crowdin and rebuild a number of d
.. code-block:: bash
make i18n-update branch=[release-branch-name]
make i18n-download branch=[release-branch-name]
This will do a number of things for you:
Expand Down Expand Up @@ -375,7 +375,7 @@ The language must be described using the following keys, with everything in lowe
If the language doesn't exist in Django, you may get errors when trying to view the language. In this case it needs to be added to ``EXTRA_LANG_INFO`` in ``base.py``.
For the new language to work, the ``django.mo`` files for the language must also be generated by running ``make i18n-update`` and committed to the repo.
For the new language to work, the ``django.mo`` files for the language must also be generated by running ``make i18n-download`` and committed to the repo.
To test unsupported languages, you can use the `Deployment` section `LANGUAGES` option in the Kolibri options.ini. Either set the value to ``all`` to activate all languages, or add the specific Intl language code as the value.
Expand Down
13 changes: 8 additions & 5 deletions docs/manual_testing/general_notes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,24 +133,27 @@ Create 2 facilities, with 2 classes per facility, with 20 learners per class, 2
Examples for a fresh Kolibri install (no imported channels)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For a fresh Kolibri installation, use this to automatically create superusers and skip on-boarding. The super user username is ``superuser`` and password is ``password``.
For a fresh Kolibri installation, use this to automatically create superusers and skip on-boarding (setup wizard). The superuser username is ``superuser`` and password is ``password``.

.. code-block:: bash
kolibri manage generateuserdata --no-onboarding
Create 2 facilities, with 2 classes per facility, with 20 learners per class, 2 interactions per learner.
Create 2 facilities, with 2 classes per facility, with 20 learners per class.

.. code-block:: bash
kolibri manage generateuserdata --facilities 2 --classes 2 --users 20 --num-content-items 2
kolibri manage generateuserdata --facilities 2 --classes 2 --users 20 --no-onboarding
Notes
~~~~~

1. If there are existing facilities, it will only create the remaining ones. So if you already have one facility, specifying ``--facilities 2`` will create one more facility and its subsequent sample data.
1. Use the `--max-channels` option to limit the number of channels for learners to interact with. This saves a lot of time specially on large data samples.
1. The ``--no-onboarding`` argument creates a super user for each facility with username ``superuser`` and password ``password``.

2. Use the `--max-channels` option to limit the number of channels for learners to interact with. This saves a lot of time specially on large data samples.

3. The ``--no-onboarding`` argument creates a super user for each facility with username ``superuser`` and password ``password``.


Collecting client and server errors using Sentry
Expand Down
2 changes: 2 additions & 0 deletions integration_testing/features/ORDER.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ admin
coach
learner
guest
app-context
common
debian
windows
4 changes: 4 additions & 0 deletions integration_testing/features/app-context/ORDER.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
app-context-manage-password-requirements.feature
app-context-manage-sign-in-options.feature
app-context-remote-network-access.feature
app-context-disable-device-network-access.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Feature: Multiple facility sign in
Given there is more than one facility on the device
And I am on the sign in page


Scenario: User accesses Kolibri for the first time on their browser and creates a new account
Given I am viewing Kolibri for the first time in my current browser
And there is no account that has signed in before on the device
Expand Down Expand Up @@ -131,6 +130,5 @@ Feature: Multiple facility sign in
Then I see the coach landing page
And I see my username in the app bar


Examples:
| username | facility |
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ Feature: Guest signs up for an account
And I click the *Finish* button
Then I am signed in and I can see the *Learn > Channels* page

Scenario: Accounts created on *Create an account* page do not see a notification to update profile
Given I completed the account creation workflow
When I am redirected to the *Learn* page
Then I don't see the *Update your profile* modal

Scenario: Username is already taken
Given A user already exists with some username
When I try to sign up for a new account with that same username
Expand Down

0 comments on commit 1b8c60b

Please sign in to comment.