Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing some code #35952

Closed
wants to merge 110 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
e140ef0
chore: replace paver quality tests
salman2013 Jul 23, 2024
337f085
fix: remove un-used code
salman2013 Jul 23, 2024
145f2a4
chore: fix some lint errors
salman2013 Jul 23, 2024
06c9ec7
fix: fix lint errors
salman2013 Jul 23, 2024
7ded572
fix: fix method error
salman2013 Jul 23, 2024
afa2f9f
fix: fix the lint errors
salman2013 Jul 23, 2024
5a6e526
chore: remove paver tests for quality commands
salman2013 Jul 24, 2024
b8557dc
chore: remove paver tests for quality commands
salman2013 Jul 24, 2024
b551990
chore: remove paver tests for quality commands
salman2013 Jul 24, 2024
316ea9c
chore: remove pycodestyle violations and run the direct command
salman2013 Jul 30, 2024
fc71d83
fix: fixing tests
salman2013 Jul 30, 2024
424e220
fix: fix tests
salman2013 Jul 30, 2024
6b851cc
fix: trying eslint command from make file
salman2013 Jul 30, 2024
17ae7a5
fix: fixing tests
salman2013 Jul 30, 2024
71a7c73
chore: add stylelint test in quality workflow
salman2013 Jul 31, 2024
ec42adf
chore: add stylelint test in quality workflow
salman2013 Jul 31, 2024
e4d2d0f
Merge remote-tracking branch 'upstream/master' into salman/remove-pav…
salman2013 Jul 31, 2024
ad2e053
chore: fix tests
salman2013 Jul 31, 2024
7f44491
chore: fix tests
salman2013 Jul 31, 2024
e963d3f
chore: fix tests
salman2013 Jul 31, 2024
98b3cd3
chore: fix tests
salman2013 Jul 31, 2024
da74ec7
chore: fix tests
salman2013 Aug 1, 2024
5a1d6be
chore: fix tests
salman2013 Aug 1, 2024
ce7bd66
chore: fix tests
salman2013 Aug 2, 2024
8be4263
chore: fix tests
salman2013 Aug 2, 2024
7f716d8
fix: fixing tests
salman2013 Aug 5, 2024
f968721
fix: fixing tests
salman2013 Aug 5, 2024
d110d78
chore: fix tests
salman2013 Aug 5, 2024
6219edf
chore: replacing paver script
salman2013 Aug 7, 2024
a760774
chore: replacing paver script
salman2013 Aug 7, 2024
391e623
chore: replacing paver script
salman2013 Aug 7, 2024
dbcb8c7
chore: replacing paver script
salman2013 Aug 7, 2024
fab999e
chore: replacing paver script
salman2013 Aug 7, 2024
389f78d
chore: replacing paver script
salman2013 Aug 7, 2024
4215965
chore: replacing paver script
salman2013 Aug 7, 2024
96c1fd6
chore: replacing paver script
salman2013 Aug 7, 2024
61ccb36
chore: replacing paver script
salman2013 Aug 7, 2024
1625794
chore: replace eslint
salman2013 Aug 8, 2024
cc1fad5
chore: replace stylelint
salman2013 Aug 8, 2024
e18bc16
chore: replace stylelint
salman2013 Aug 8, 2024
2b6affb
fix: fix tests
salman2013 Aug 8, 2024
87068e0
fix: fix tests
salman2013 Aug 8, 2024
e0ad851
chore: remove some code related to prereq installation of python pack…
salman2013 Aug 8, 2024
747522b
fix: fix tests
salman2013 Aug 8, 2024
73934b6
fix: fix tests
salman2013 Aug 8, 2024
bf1d732
fix: fix tests
salman2013 Aug 9, 2024
0341535
fix: fix tests
salman2013 Aug 9, 2024
3ef3383
fix: fix tests
salman2013 Aug 9, 2024
9317537
chore: replace paver js tests
salman2013 Aug 13, 2024
b17915a
chore: replace paver js tests
salman2013 Aug 13, 2024
4a8356a
fix: fix tests
salman2013 Aug 13, 2024
167660c
fix: fix tests
salman2013 Aug 13, 2024
8b7d600
fix: fix tests
salman2013 Aug 13, 2024
03120da
fix: fix tests
salman2013 Aug 14, 2024
8f9b41f
fix: fix tests
salman2013 Aug 14, 2024
d8dedf0
fix: fix tests
salman2013 Aug 14, 2024
8ead7cd
fix: fix tests
salman2013 Aug 14, 2024
f175679
fix: fix tests
salman2013 Aug 14, 2024
28d53e1
fix: fix tests
salman2013 Aug 14, 2024
4611635
fix: fix tests
salman2013 Aug 15, 2024
a1cd00e
fix: fix tests
salman2013 Aug 15, 2024
25c69f3
fix: fix tests
salman2013 Aug 16, 2024
988b77a
chore: remove un-used code
salman2013 Aug 16, 2024
7c12911
chore: remove un-used code
salman2013 Aug 16, 2024
0cb7226
fix: fix tests
salman2013 Aug 16, 2024
029a9d8
chore: replace paver coverage tests
salman2013 Aug 20, 2024
90d58a2
fix: remove files which was accidentally added
salman2013 Aug 20, 2024
b323c64
fix: fix the comments received on PR review
salman2013 Aug 26, 2024
515080e
fix: fix tests
salman2013 Aug 26, 2024
ba666b1
fix: fix tests
salman2013 Aug 26, 2024
75ee133
fix: fix tests
salman2013 Aug 26, 2024
c63892f
fix: fix the pylint and unit tests
salman2013 Aug 27, 2024
5309160
fix: code improvements
salman2013 Aug 27, 2024
2f3169a
fix: fix the comments found in PR review
salman2013 Sep 10, 2024
75cf11c
fix: fix the commands with check=True
salman2013 Sep 12, 2024
c05f932
Merge branch 'master' into salman/remove-paver-commands
kdmccormick Oct 24, 2024
2c68035
fix: fix the comments, code improvements
salman2013 Nov 11, 2024
f53eab8
fix: testing changes in commands
salman2013 Nov 11, 2024
77476dd
fix: fix the code for stylelint removal
salman2013 Nov 11, 2024
26d5153
fix: fix the pii_check command for django setting module
salman2013 Nov 11, 2024
36cce3f
fix: fix the command and testing it
salman2013 Nov 12, 2024
867adad
fix: remove stylelint
salman2013 Nov 13, 2024
7386397
fix: fix the eslint command as per comment and reduce the threshold
salman2013 Nov 13, 2024
6da731c
Merge remote-tracking branch 'upstream/master' into salman/remove-pav…
kdmccormick Nov 21, 2024
9a4b25a
fix: fixes as per review comments
salman2013 Dec 2, 2024
c35e0d6
fix: revert uglify-js update to 3.19.3 and restore version 2.7.0 (#35…
BilalQamar95 Nov 21, 2024
e8ee3a7
Revert "fix(deps): update dependency raw-loader to v4 (#35893)" (#35915)
jesperhodge Nov 21, 2024
5c3239d
chore: added anonymous id in user registered event (#35875)
muhammadadeeltajamul Nov 22, 2024
743f34b
chore(deps): update jest monorepo to v29 (major) (#35897)
renovate[bot] Nov 22, 2024
37bf835
feat: iframe messaging for component picker in problem bank (#35888)
navinkarkera Nov 22, 2024
9e6da13
feat!: upgrade get_issued_certificates to DRF ( 24 ) (#35534)
awais786 Nov 25, 2024
db244aa
feat: update logic for courseware search enabled endpoint (#35922)
alangsto Nov 25, 2024
fdf59a4
feat!: upgrading api to DRF. (#35584)
awais786 Nov 26, 2024
5468338
fix: Remove pointless Maintenance and Announcement apps (#35852)
kdmccormick Nov 26, 2024
bba6259
chore(deps): update dependency selenium-webdriver to v4.27.0 (#35930)
renovate[bot] Nov 27, 2024
f2c0b69
chore: removed new comment notification grouping (#35920)
AhtishamShahid Nov 27, 2024
f6e2ae6
chore: Bump openedx-learning to version 0.18.1
marslanabdulrauf Nov 26, 2024
c32598a
feat!: upgrade certificate_exception_view to DRF ( 28 ) (#35594)
awais786 Nov 28, 2024
388fb2b
fix: Don't add 'x-is-pointer-node' to capa problems on paste
bradenmacdonald Oct 22, 2024
a6558d5
feat: add has_course_author_access to CourseHomeMetadataView response
0x29a Sep 5, 2024
d9963c3
docs: explain why specifying 'cms' service
0x29a Sep 9, 2024
193fd6d
test: has_course_author_access correctness
0x29a Sep 9, 2024
08cb693
feat: added anonymous id in edx.bi.user.account.authenticated event (…
muhammadadeeltajamul Dec 2, 2024
10cf8de
feat!: upgrade start_certificate_regeneration to drf ( 29 ) (#35599)
awais786 Dec 2, 2024
1227ce4
fix: add infinity to code owners (#35937)
ayesha-waris Dec 2, 2024
96d1235
Add Django settings flags to roll out the extracted XBlocks (#35549)
farhan Dec 2, 2024
8c1f5b9
fix: fix the pi-check command with lint flag
salman2013 Dec 2, 2024
21b2b0b
fix: fix quality check
salman2013 Dec 2, 2024
80bf685
Merge remote-tracking branch 'upstream/master' into salman/remove-pav…
salman2013 Dec 3, 2024
ebacdda
chore: test code
salman2013 Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .annotation_safe_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ workflow.AssessmentWorkflowStep:
# Via edx-celeryutils
celery_utils.ChordData:
".. no_pii:": "No PII"
celery_utils.FailedTask:
".. no_pii:": "No PII"

# Via completion XBlock
completion.BlockCompletion:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/js-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ jobs:
make base-requirements

- uses: c-hive/gha-npm-cache@v1

- name: Install npm
run: npm ci

- name: Run JS Tests
env:
TEST_SUITE: js-unit
SCRIPT_TO_RUN: ./scripts/generic-ci-tests.sh
run: |
npm install -g jest
xvfb-run --auto-servernum ./scripts/all-tests.sh
xvfb-run --auto-servernum make test-js

- name: Save Job Artifacts
uses: actions/upload-artifact@v4
Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/quality-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,29 @@ jobs:
PIP_SRC: ${{ runner.temp }}
run: |
make test-requirements


- name: Install npm
env:
PIP_SRC: ${{ runner.temp }}
run: npm ci

- name: Install python packages
env:
PIP_SRC: ${{ runner.temp }}
run: |
pip install -e .

- name: Run Quality Tests
env:
TEST_SUITE: quality
SCRIPT_TO_RUN: ./scripts/generic-ci-tests.sh
PIP_SRC: ${{ runner.temp }}
TARGET_BRANCH: ${{ github.base_ref }}
run: |
./scripts/all-tests.sh

make pycodestyle
make eslint
make xsslint
make pii_check
make check_keywords

- name: Save Job Artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .pii_annotations.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source_path: ./
report_path: pii_report
safelist_path: .annotation_safe_list.yml
coverage_target: 94.5
coverage_target: 83.3
# See OEP-30 for more information on these values and what they mean:
# https://open-edx-proposals.readthedocs.io/en/latest/oep-0030-arch-pii-markup-and-auditing.html#docstring-annotations
annotations:
Expand Down
5 changes: 0 additions & 5 deletions .stylelintignore

This file was deleted.

43 changes: 43 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,46 @@ migrate: migrate-lms migrate-cms
# Part of https://github.com/openedx/wg-developer-experience/issues/136
ubuntu-requirements: ## Install ubuntu 22.04 system packages needed for `pip install` to work on ubuntu.
sudo apt install libmysqlclient-dev libxmlsec1-dev

eslint: ## check javascript for quality issues
python scripts/eslint.py

xsslint: ## check xss for quality issuest
python scripts/xsslint/xss_linter.py \
--rule-totals \
--config=scripts.xsslint_config \
--thresholds=scripts/xsslint_thresholds.json

pycodestyle: ## check python files for quality issues
pycodestyle .

## Re-enable --lint flag when this issue https://github.com/openedx/edx-platform/issues/35775 is resolved
pii_check: ## check django models for pii annotations
DJANGO_SETTINGS_MODULE=cms.envs.test \
code_annotations django_find_annotations \
--config_file .pii_annotations.yml \
--app_name cms \
--coverage \
--lint

DJANGO_SETTINGS_MODULE=lms.envs.test \
code_annotations django_find_annotations \
--config_file .pii_annotations.yml \
--app_name lms \
--coverage \
--lint

check_keywords: ## check django models for reserve keywords
DJANGO_SETTINGS_MODULE=cms.envs.test \
python manage.py cms check_reserved_keywords \
--override_file db_keyword_overrides.yml

DJANGO_SETTINGS_MODULE=lms.envs.test \
python manage.py lms check_reserved_keywords \
--override_file db_keyword_overrides.yml

test-js: ## run javascript tests
node --max_old_space_size=4096 node_modules/.bin/karma start common/static/karma_common.conf.js \
--single-run=true \
--capture-timeout=60000 \
--browsers=FirefoxNoUpdates
2 changes: 1 addition & 1 deletion pavelib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"""


from . import assets, js_test, prereqs, quality
from . import assets
143 changes: 0 additions & 143 deletions pavelib/js_test.py

This file was deleted.

22 changes: 0 additions & 22 deletions pavelib/paver_tests/conftest.py

This file was deleted.

54 changes: 0 additions & 54 deletions pavelib/paver_tests/test_eslint.py

This file was deleted.

Loading
Loading