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

Updating makefile commands #1226

Merged
merged 29 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
236e613
add single schema validation and the option to run a single functiona…
VirajP1002 Oct 6, 2023
2d9f79d
Allow lint and tests to be run in one command for Python and JS
VirajP1002 Oct 9, 2023
5e41b3c
Allow functional tests to be run headless
VirajP1002 Oct 9, 2023
cb8a25f
allow dev folders such as venv and contents of gitignore to be ignore…
VirajP1002 Oct 9, 2023
7d4069d
allow a chosen suite to be run
VirajP1002 Oct 9, 2023
09868d5
Exclude venv and tests directory to ensure python lint runs without e…
VirajP1002 Oct 9, 2023
8f08609
add a command that runs JS lint and test headless and made commands n…
VirajP1002 Oct 9, 2023
773875a
Rename the commands to clarify the order of linting and testing when …
VirajP1002 Oct 10, 2023
2cc7a4c
Add extra commands README that developers can utilise
VirajP1002 Oct 10, 2023
e4cc07a
Remove venv from being ignored
VirajP1002 Oct 12, 2023
13dd758
Refactor commands to clarify the purpose and to ensure consistency in…
VirajP1002 Oct 12, 2023
cd82cf6
Alter commands that developers find useful
VirajP1002 Oct 13, 2023
ad1995b
Improve the description of commands used for functional tests
VirajP1002 Oct 13, 2023
747fbbe
Fix config and ignore files
VirajP1002 Oct 13, 2023
5f52cbb
Replace yarn commands with make commands
VirajP1002 Oct 18, 2023
84f2827
Update the file to make use of the new Make commands
VirajP1002 Oct 18, 2023
f35709f
Add new commands to generate pages and to generate new specs given a …
VirajP1002 Oct 18, 2023
5f6718e
Replace yarn commands with Make commands
VirajP1002 Oct 18, 2023
b990caf
Refactor issues with running make commands
VirajP1002 Oct 18, 2023
46366ba
Remove incorrect pipenv commands
VirajP1002 Oct 18, 2023
097688d
Clarify which suites are available to run using the test-functional-s…
VirajP1002 Oct 18, 2023
a8bc253
Correct the make commands to ensure the PR tests pass correctly
VirajP1002 Oct 18, 2023
e1faa36
Update commands to use yarn commands directly rather than shell scripts
VirajP1002 Oct 19, 2023
8edd918
Remove --suite from generate_pages command
VirajP1002 Oct 19, 2023
989e944
Temporary error to test if pullrequest.yml works as intended
VirajP1002 Oct 19, 2023
f9c8ea6
Correct deliberate error to ensure pullrequest.yml works as intended
VirajP1002 Oct 19, 2023
e9c6c94
Delete unused file
VirajP1002 Oct 19, 2023
4e54aad
Merge branch 'main' into updating-makefile-commands
VirajP1002 Oct 19, 2023
5d8e0e0
Remove the .json to be required when validating a single schema
VirajP1002 Oct 20, 2023
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
120 changes: 120 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,123 @@ coverage/**
node_modules/**
dist/**
src/index.html

# Python temp file
*.py[cod]
katie-gardner marked this conversation as resolved.
Show resolved Hide resolved
__pycache__
.pytest_cache

# C extensions
*.so

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib64

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.coverage.*
coverage.xml
.tox
coverage/
/profiling/
combined_profile.prof

.cache

*.log

# Sphinx
docs/_build

.webassets-cache

# Virtualenvs
env
env*
venv

# intellij
.idea/
*.ipr
*.iml
*.iws

# VS Code
.vscode
*.code-workspace

.DS_Store

node_modules/
/static/
tests/results
tests/coverage
tests/a11y

**/_sprite.scss

## OS X
._*
.Spotlight-V100
.Trashes

# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml
.application-version

# Added to prevent committing coverage reports.
htmlcov/

*errorShots*

keys.yml
secrets.yml
.env

requirements.txt

.screenshots

# Ignore built schemas but not test schemas
schemas/*
!schemas/test

# Ignore any generated pages for the functional tests
tests/functional/generated_pages

# Ignore Design-System templates
templates/components
templates/layout
templates/assets/styles/print.css

.mypy_cache

# Ignore compiled translation files
*.mo

.vim/

# Ignore CTAGS
tags

# Ignore wdio/chromedriver logs
tests/functional/logs/

# Ignore Pylance custom type stub folder
typing/
123 changes: 122 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,122 @@
tests/functional/generated_pages/
# Exclude generated_pages directory
tests/functional/generated_pages/

# Python temp file
*.py[cod]
__pycache__
.pytest_cache

# C extensions
*.so

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib64

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.coverage.*
coverage.xml
.tox
coverage/
/profiling/
combined_profile.prof

.cache

*.log

# Sphinx
docs/_build

.webassets-cache

# Virtualenvs
env
env*
venv

# intellij
.idea/
*.ipr
*.iml
*.iws

# VS Code
.vscode
*.code-workspace

.DS_Store

node_modules/
/static/
tests/results
tests/coverage
tests/a11y

**/_sprite.scss

## OS X
._*
.Spotlight-V100
.Trashes

# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml
.application-version

# Added to prevent committing coverage reports.
htmlcov/

*errorShots*

keys.yml
secrets.yml
.env

requirements.txt

.screenshots

# Ignore built schemas but not test schemas
schemas/*
!schemas/test

# Ignore any generated pages for the functional tests
tests/functional/generated_pages

# Ignore Design-System templates
templates/components
templates/layout
templates/assets/styles/print.css

.mypy_cache

# Ignore compiled translation files
*.mo

.vim/

# Ignore CTAGS
tags

# Ignore wdio/chromedriver logs
tests/functional/logs/

# Ignore Pylance custom type stub folder
typing/
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ignore=CVS
# ignore-list. The regex matches against paths and can be in Posix or Windows
# format. Because '\' represents the directory delimiter on Windows systems, it
# can't be used as an escape character.
ignore-paths=
ignore-paths=venv
katie-gardner marked this conversation as resolved.
Show resolved Hide resolved

# Files or directories matching the regular expression patterns are skipped.
# The regex matches against base names, not paths. The default value ignores
Expand Down
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
include .functional-tests.env
MebinAbraham marked this conversation as resolved.
Show resolved Hide resolved
SCHEMAS_VERSION=`cat .schemas-version`
DESIGN_SYSTEM_VERSION=`cat .design-system-version`
RUNNER_ENV_FILE?=.development.env
SCHEMA_PATH=./schemas/test/en/

clean:
find schemas/* -prune | grep -v "schemas/test" | xargs rm -r
Expand All @@ -22,6 +24,8 @@ lint: lint-python
lint-python:
pipenv run ./scripts/run_lint_python.sh

lint-test-python: lint-python test-unit

format: format-python
yarn format

Expand All @@ -38,9 +42,28 @@ test-unit:
test-functional:
pipenv run ./scripts/run_tests_functional.sh

test-functional-headless:
EQ_RUN_FUNCTIONAL_TESTS_HEADLESS='True' pipenv run ./scripts/run_tests_functional.sh

test-single-functional:
berroar marked this conversation as resolved.
Show resolved Hide resolved
MebinAbraham marked this conversation as resolved.
Show resolved Hide resolved
yarn test_functional --spec ./tests/functional/spec/$(SPEC)

test-suite-functional:
MebinAbraham marked this conversation as resolved.
Show resolved Hide resolved
yarn test_functional --suite $(SUITE)

lint-js:
yarn lint

lint-test-js: lint-js test-functional

test-headless-lint-js: lint-js test-functional-headless
MebinAbraham marked this conversation as resolved.
Show resolved Hide resolved

validate-test-schemas:
pipenv run ./scripts/validate_test_schemas.sh

validate-test-schema:
pipenv run ./scripts/validate_test_schemas.sh $(SCHEMA_PATH)$(SCHEMA)

translation-templates:
pipenv run python -m scripts.extract_translation_templates

Expand Down
2 changes: 1 addition & 1 deletion scripts/run_lint_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ display_result $? 1 "isort linting check"
./scripts/run_mypy.sh
display_result $? 1 "Mypy type check"

black --check . --exclude node_modules
black --check . --exclude node_modules --exclude venv
katie-gardner marked this conversation as resolved.
Show resolved Hide resolved
display_result $? 1 "Python code formatting check"
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ filterwarnings=
ignore:.*formatargspec.*:DeprecationWarning
ignore:.*isAlive.*:PendingDeprecationWarning

[flake8]
extend-ignore = E501,E203
exclude = venv,tests
berroar marked this conversation as resolved.
Show resolved Hide resolved
max-complexity = 10