2021-07-15 20:47:16 +03:00
SHELL = /bin/bash
2023-03-09 00:36:51 +03:00
WAIT_FOR_DB = /experimenter/bin/wait-for-it.sh -t 30 db:5432 &&
WAIT_FOR_RUNSERVER = /experimenter/bin/wait-for-it.sh -t 30 localhost:7001 &&
2019-12-03 21:26:20 +03:00
2023-12-07 22:50:36 +03:00
COMPOSE_CIRRUS = [ [ -n $$ CIRRUS ] ] && echo "-f docker-compose-cirrus.yml"
COMPOSE = docker compose -f docker-compose.yml $$ ( ${ COMPOSE_CIRRUS } )
2024-11-08 22:47:05 +03:00
COMPOSE_RUN = ${ COMPOSE } run --rm
2022-01-04 01:43:53 +03:00
COMPOSE_LEGACY = ${ COMPOSE } -f docker-compose-legacy.yml
2023-09-15 23:17:24 +03:00
COMPOSE_TEST = docker compose -f docker-compose-test.yml
2024-11-08 22:47:05 +03:00
COMPOSE_TEST_RUN = ${ COMPOSE_TEST } run --rm
2023-12-07 22:50:36 +03:00
COMPOSE_PROD = docker compose -f docker-compose-prod.yml $$ ( ${ COMPOSE_CIRRUS } )
COMPOSE_INTEGRATION = ${ COMPOSE_PROD } -f docker-compose-integration-test.yml $$ ( ${ COMPOSE_CIRRUS } )
2024-11-08 22:47:05 +03:00
COMPOSE_INTEGRATION_RUN = ${ COMPOSE_INTEGRATION } run --rm
2023-11-08 19:37:48 +03:00
DOCKER_BUILD = docker buildx build
2019-12-03 21:26:20 +03:00
2020-04-07 21:59:30 +03:00
JOBS = 4
PARALLEL = parallel --halt now,fail= 1 --jobs ${ JOBS } { } :::
2020-12-16 23:47:00 +03:00
NOCOLOR = \0 33[ 0m
RED = \0 33[ 0; 31m
GREEN = \0 33[ 0; 32m
PAD = -------------------------------------------------\n
2020-12-22 23:33:57 +03:00
COLOR_CHECK = && echo " ${ GREEN } ${ PAD } All Checks Passed\n ${ PAD } ${ NOCOLOR } " || ( echo " ${ RED } ${ PAD } Some Checks Failed\n ${ PAD } ${ NOCOLOR } " ; exit 1)
2020-04-22 23:43:42 +03:00
PYTHON_TEST = pytest --cov --cov-report term-missing
2023-01-31 21:13:26 +03:00
PYTHON_TYPECHECK = pyright experimenter/
2023-04-27 22:17:24 +03:00
PYTHON_CHECK_MIGRATIONS = python manage.py makemigrations --check --dry-run --noinput
PYTHON_MIGRATE = python manage.py migrate
2022-01-04 01:43:53 +03:00
ESLINT_LEGACY = yarn workspace @experimenter/core lint
2020-06-02 21:36:10 +03:00
ESLINT_FIX_CORE = yarn workspace @experimenter/core lint-fix
2020-10-30 00:23:19 +03:00
ESLINT_NIMBUS_UI = yarn workspace @experimenter/nimbus-ui lint
ESLINT_FIX_NIMBUS_UI = yarn workspace @experimenter/nimbus-ui lint-fix
2024-06-13 20:57:54 +03:00
ESLINT_NIMBUS_UI_NEW = yarn workspace @experimenter/nimbus_ui_new lint
ESLINT_FIX_NIMBUS_UI_NEW = yarn workspace @experimenter/nimbus_ui_new format
feat(nimbus-ui): Init nimbus-ui with CRA Typescript, remove cruft, add tests, linting, workspace, README (#3519)
* feat(nimbus-ui): Init nimbus-ui with CRA Typescript, remove cruft, add tests, linting, workspace, README"
* Add optional label parameter to babel plugins for core
* Copy nimbus-ui into container before yarn build commands
* Only eslint ts source files
* Use container paths for nimbus-ui node_modules and built assets
* Upgrade TS version to latest
* Install eslint dev dependencies so we can lint outside react-scripts
* Rebuild yarn.lock file
* Use jsdom-sixteen jest test env for 'core'
* Use jsdom-sixteen jest test env for 'rapid'
* fix yarn deps issue, silence babel warning
* CI=yes not CI=true
* Add MPL license to missed file and add newline to package.json
* Fix dependabot spacing
* Move testing lib to dev dep instead of dep
* Fix double quotes in docker compose
Co-authored-by: Jared Lockhart <119884+jaredlockhart@users.noreply.github.com>
Co-authored-by: Jody Heavener <j.heavener@gmail.com>
2020-09-24 20:30:15 +03:00
TYPECHECK_NIMBUS_UI = yarn workspace @experimenter/nimbus-ui lint:tsc
2024-05-07 21:11:49 +03:00
DJLINT_CHECK = djlint --check experimenter/nimbus_ui_new/
DJLINT_FIX = djlint --reformat experimenter/nimbus_ui_new/
2022-01-04 01:43:53 +03:00
JS_TEST_LEGACY = yarn workspace @experimenter/core test
2022-09-14 22:36:36 +03:00
JS_TEST_NIMBUS_UI = DEBUG_PRINT_LIMIT = 999999 CI = yes yarn workspace @experimenter/nimbus-ui test:cov
2020-11-09 22:57:03 +03:00
NIMBUS_SCHEMA_CHECK = python manage.py graphql_schema --out experimenter/nimbus-ui/test_schema.graphql&& diff experimenter/nimbus-ui/test_schema.graphql experimenter/nimbus-ui/schema.graphql || ( echo GraphQL Schema is out of sync please run make generate_types; exit 1)
NIMBUS_TYPES_GENERATE = python manage.py graphql_schema --out experimenter/nimbus-ui/schema.graphql&& yarn workspace @experimenter/nimbus-ui generate-types
chore(deps-dev): Bump ruff from 0.4.1 to 0.5.0 in /schemas (#10927)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.1 to 0.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>0.5.0</h2>
<h2>Release Notes</h2>
<p>Check out the <a href="https://astral.sh/blog/ruff-v0.5.0">blog
post</a> for a migration guide and overview of the changes!</p>
<h3>Breaking changes</h3>
<p>See also, the "Remapped rules" section which may result in
disabled rules.</p>
<ul>
<li>Follow the XDG specification to discover user-level configurations
on macOS (same as on other Unix platforms)</li>
<li>Selecting <code>ALL</code> now excludes deprecated rules</li>
<li>The released archives now include an extra level of nesting, which
can be removed with <code>--strip-components=1</code> when
untarring.</li>
<li>The release artifact's file name no longer includes the version tag.
This enables users to install via <code>/latest</code> URLs on
GitHub.</li>
<li>The diagnostic ranges for some <code>flake8-bandit</code> rules were
modified (<a
href="https://redirect.github.com/astral-sh/ruff/pull/10667">#10667</a>).</li>
</ul>
<h3>Deprecations</h3>
<p>The following rules are now deprecated:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/syntax-error/"><code>syntax-error</code></a>
(<code>E999</code>): Syntax errors are now always shown</li>
</ul>
<h3>Remapped rules</h3>
<p>The following rules have been remapped to new rule codes:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-http-call-in-async-function/"><code>blocking-http-call-in-async-function</code></a>:
<code>ASYNC100</code> to <code>ASYNC210</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/open-sleep-or-subprocess-in-async-function/"><code>open-sleep-or-subprocess-in-async-function</code></a>:
<code>ASYNC101</code> split into <code>ASYNC220</code>,
<code>ASYNC221</code>, <code>ASYNC230</code>, and
<code>ASYNC251</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-os-call-in-async-function/"><code>blocking-os-call-in-async-function</code></a>:
<code>ASYNC102</code> has been merged into <code>ASYNC220</code> and
<code>ASYNC221</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-timeout-without-await/"><code>trio-timeout-without-await</code></a>:
<code>TRIO100</code> to <code>ASYNC100</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-sync-call/"><code>trio-sync-call</code></a>:
<code>TRIO105</code> to <code>ASYNC105</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-async-function-with-timeout/"><code>trio-async-function-with-timeout</code></a>:
<code>TRIO109</code> to <code>ASYNC109</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-unneeded-sleep/"><code>trio-unneeded-sleep</code></a>:
<code>TRIO110</code> to <code>ASYNC110</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-zero-sleep-call/"><code>trio-zero-sleep-call</code></a>:
<code>TRIO115</code> to <code>ASYNC115</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/repeated-isinstance-calls/"><code>repeated-isinstance-calls</code></a>:
<code>PLR1701</code> to <code>SIM101</code></li>
</ul>
<h3>Stabilization</h3>
<p>The following rules have been stabilized and are no longer in
preview:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/mutable-fromkeys-value/"><code>mutable-fromkeys-value</code></a>
(<code>RUF024</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/default-factory-kwarg/"><code>default-factory-kwarg</code></a>
(<code>RUF026</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/django-extra/"><code>django-extra</code></a>
(<code>S610</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/manual-dict-comprehension/"><code>manual-dict-comprehension</code></a>
(<code>PERF403</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/print-empty-string/"><code>print-empty-string</code></a>
(<code>FURB105</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/readlines-in-for/"><code>readlines-in-for</code></a>
(<code>FURB129</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/if-expr-min-max/"><code>if-expr-min-max</code></a>
(<code>FURB136</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/bit-count/"><code>bit-count</code></a>
(<code>FURB161</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/redundant-log-base/"><code>redundant-log-base</code></a>
(<code>FURB163</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/regex-flag-alias/"><code>regex-flag-alias</code></a>
(<code>FURB167</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/isinstance-type-none/"><code>isinstance-type-none</code></a>
(<code>FURB168</code>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.5.0</h2>
<p>Check out the <a href="https://astral.sh/blog/ruff-v0.5.0">blog
post</a> for a migration guide and overview of the changes!</p>
<h3>Breaking changes</h3>
<p>See also, the "Remapped rules" section which may result in
disabled rules.</p>
<ul>
<li>Follow the XDG specification to discover user-level configurations
on macOS (same as on other Unix platforms)</li>
<li>Selecting <code>ALL</code> now excludes deprecated rules</li>
<li>The released archives now include an extra level of nesting, which
can be removed with <code>--strip-components=1</code> when
untarring.</li>
<li>The release artifact's file name no longer includes the version tag.
This enables users to install via <code>/latest</code> URLs on
GitHub.</li>
<li>The diagnostic ranges for some <code>flake8-bandit</code> rules were
modified (<a
href="https://redirect.github.com/astral-sh/ruff/pull/10667">#10667</a>).</li>
</ul>
<h3>Deprecations</h3>
<p>The following rules are now deprecated:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/syntax-error/"><code>syntax-error</code></a>
(<code>E999</code>): Syntax errors are now always shown</li>
</ul>
<h3>Remapped rules</h3>
<p>The following rules have been remapped to new rule codes:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-http-call-in-async-function/"><code>blocking-http-call-in-async-function</code></a>:
<code>ASYNC100</code> to <code>ASYNC210</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/open-sleep-or-subprocess-in-async-function/"><code>open-sleep-or-subprocess-in-async-function</code></a>:
<code>ASYNC101</code> split into <code>ASYNC220</code>,
<code>ASYNC221</code>, <code>ASYNC230</code>, and
<code>ASYNC251</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-os-call-in-async-function/"><code>blocking-os-call-in-async-function</code></a>:
<code>ASYNC102</code> has been merged into <code>ASYNC220</code> and
<code>ASYNC221</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-timeout-without-await/"><code>trio-timeout-without-await</code></a>:
<code>TRIO100</code> to <code>ASYNC100</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-sync-call/"><code>trio-sync-call</code></a>:
<code>TRIO105</code> to <code>ASYNC105</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-async-function-with-timeout/"><code>trio-async-function-with-timeout</code></a>:
<code>TRIO109</code> to <code>ASYNC109</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-unneeded-sleep/"><code>trio-unneeded-sleep</code></a>:
<code>TRIO110</code> to <code>ASYNC110</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-zero-sleep-call/"><code>trio-zero-sleep-call</code></a>:
<code>TRIO115</code> to <code>ASYNC115</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/repeated-isinstance-calls/"><code>repeated-isinstance-calls</code></a>:
<code>PLR1701</code> to <code>SIM101</code></li>
</ul>
<h3>Stabilization</h3>
<p>The following rules have been stabilized and are no longer in
preview:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/mutable-fromkeys-value/"><code>mutable-fromkeys-value</code></a>
(<code>RUF024</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/default-factory-kwarg/"><code>default-factory-kwarg</code></a>
(<code>RUF026</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/django-extra/"><code>django-extra</code></a>
(<code>S610</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/manual-dict-comprehension/"><code>manual-dict-comprehension</code></a>
(<code>PERF403</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/print-empty-string/"><code>print-empty-string</code></a>
(<code>FURB105</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/readlines-in-for/"><code>readlines-in-for</code></a>
(<code>FURB129</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/if-expr-min-max/"><code>if-expr-min-max</code></a>
(<code>FURB136</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/bit-count/"><code>bit-count</code></a>
(<code>FURB161</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/redundant-log-base/"><code>redundant-log-base</code></a>
(<code>FURB163</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/regex-flag-alias/"><code>regex-flag-alias</code></a>
(<code>FURB167</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/isinstance-type-none/"><code>isinstance-type-none</code></a>
(<code>FURB168</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/type-none-comparison/"><code>type-none-comparison</code></a>
(<code>FURB169</code>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/244b923f615c2c162278fc0e06051853614760f3"><code>244b923</code></a>
Add necessary permissions for cargo-dist Docker build (<a
href="https://redirect.github.com/astral-sh/ruff/issues/12072">#12072</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/a8b48fce7e32b35538072ccd55dac64e158d1e34"><code>a8b48fc</code></a>
Release v0.5.0 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/12068">#12068</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/04c8597b8ab1a459d77058b6899571095092bc2d"><code>04c8597</code></a>
[<code>flake8-simplify</code>] Stabilize detection of Yoda conditions
for "constant" col...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/4029a25ebd88a26424f45b20aba20c8e56a54d62"><code>4029a25</code></a>
[Ruff v0.5] Stabilise 15 pylint rules (<a
href="https://redirect.github.com/astral-sh/ruff/issues/12051">#12051</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/0917ce16f477f20b60d6d6f96462d4c83168f6f6"><code>0917ce1</code></a>
Update documentation to mention <code>etcetera</code> crate instead of
<code>dirs</code> for user c...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/22cebdf29b79c9bb39b341149b2764730de72d97"><code>22cebdf</code></a>
Add server config to filter out syntax error diagnostics (<a
href="https://redirect.github.com/astral-sh/ruff/issues/12059">#12059</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/72b6c26101ca920137202d455b014f9e680712f7"><code>72b6c26</code></a>
Simplify <code>LinterResult</code>, avoid cloning
<code>ParseError</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/11903">#11903</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/73851e73ab0629461fbec84ee35ea91948d0c474"><code>73851e7</code></a>
Avoid displaying syntax error as log message (<a
href="https://redirect.github.com/astral-sh/ruff/issues/11902">#11902</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/e7b49694a795e3347ffc6f499245dfcbbb4b28ed"><code>e7b4969</code></a>
Remove <code>E999</code> as a rule, disallow any disablement methods for
syntax error (#...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/c98d8a040fbcd3428f1b0189ebdc9fbb8183b215"><code>c98d8a0</code></a>
[<code>pyflakes</code>] Stabilize detection of is comparisons to lists,
etc. (<code>F632</code>) (#...</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.4.1...0.5.0">compare
view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.4.1&new-version=0.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jared Lockhart <119884+jaredlockhart@users.noreply.github.com>
2024-07-03 23:32:25 +03:00
RUFF_CHECK = ruff check experimenter/ tests/
2024-07-11 19:35:27 +03:00
RUFF_FIX = ruff check --fix experimenter/ tests/
2020-09-28 22:36:37 +03:00
BLACK_CHECK = black -l 90 --check --diff . --exclude node_modules
2020-10-06 21:46:40 +03:00
BLACK_FIX = black -l 90 . --exclude node_modules
2023-04-27 22:17:24 +03:00
CHECK_DOCS = python manage.py generate_docs --check= true
GENERATE_DOCS = python manage.py generate_docs
LOAD_COUNTRIES = python manage.py loaddata ./experimenter/base/fixtures/countries.json
LOAD_LOCALES = python manage.py loaddata ./experimenter/base/fixtures/locales.json
LOAD_LANGUAGES = python manage.py loaddata ./experimenter/base/fixtures/languages.json
LOAD_FEATURES = python manage.py load_feature_configs
LOAD_DUMMY_EXPERIMENTS = [ [ -z $$ SKIP_DUMMY ] ] && python manage.py load_dummy_experiments || python manage.py load_dummy_projects
2019-12-03 21:26:20 +03:00
2021-09-17 18:37:57 +03:00
2023-01-27 18:56:37 +03:00
JETSTREAM_CONFIG_URL = https://github.com/mozilla/metric-hub/archive/main.zip
2023-08-31 19:22:38 +03:00
CLI_DIR = experimenter/experimenter/features/manifests/application-services
CLI_INSTALLER = $( CLI_DIR) /install-nimbus-cli.sh
NIMBUS_CLI = $( CLI_DIR) /nimbus-cli
2021-09-17 18:37:57 +03:00
2023-11-10 04:18:05 +03:00
help :
@echo "Please use 'make <target>' where <target> is one of the following commands."
@echo
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' Makefile | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@echo
@echo "Check the Makefile to know exactly what each target is doing."
ssl : nginx /key .pem nginx /cert .pem ## Generate all SSL certificates
2020-10-26 19:26:09 +03:00
nginx/key.pem :
openssl genrsa -out nginx/key.pem 4096
nginx/cert.pem : nginx /key .pem
openssl req -new -x509 -nodes -sha256 -key nginx/key.pem \
-subj "/C=US/ST=California/L=Mountain View/O=Mozilla/CN=experiment_local" \
> nginx/cert.pem
2023-11-10 04:18:05 +03:00
secretkey : ## Generate random key
2020-10-26 19:26:09 +03:00
openssl rand -hex 24
2023-11-10 04:18:05 +03:00
auth_gcloud : ## Login to GCloud
2022-06-30 00:01:11 +03:00
gcloud auth login --update-adc
2022-06-03 21:35:11 +03:00
2021-03-03 02:03:43 +03:00
jetstream_config :
2023-03-09 00:36:51 +03:00
curl -LJ -o experimenter/experimenter/outcomes/metric-hub.zip $( JETSTREAM_CONFIG_URL)
unzip -o -d experimenter/experimenter/outcomes experimenter/experimenter/outcomes/metric-hub.zip
rm -Rf experimenter/experimenter/outcomes/metric-hub-main/.script/
2024-08-30 19:42:38 +03:00
unzip -o -d experimenter/experimenter/segments experimenter/experimenter/outcomes/metric-hub.zip
rm -Rf experimenter/experimenter/segments/metric-hub-main/.script/
2021-03-03 02:03:43 +03:00
2023-10-04 00:16:35 +03:00
feature_manifests : build_dev
2024-11-08 22:47:05 +03:00
$( COMPOSE_RUN) -e GITHUB_BEARER_TOKEN = $( GITHUB_BEARER_TOKEN) experimenter /experimenter/bin/manifest-tool.py fetch $( FETCH_ARGS)
2023-09-15 23:28:15 +03:00
2023-11-10 04:18:05 +03:00
install_nimbus_cli : ## Install Nimbus client
2023-08-31 19:22:38 +03:00
mkdir -p $( CLI_DIR)
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/mozilla/application-services/main/install-nimbus-cli.sh > " $( CLI_INSTALLER) "
$( SHELL) $( CLI_INSTALLER) --directory " $( CLI_DIR) "
2023-11-10 04:18:05 +03:00
fetch_external_resources : jetstream_config install_nimbus_cli feature_manifests ## Fetch all external resources
2021-09-17 18:37:57 +03:00
echo "External Resources Fetched"
2023-11-10 04:18:05 +03:00
update_kinto : ## Update latest Kinto/Remote Settings container
2021-07-15 19:33:57 +03:00
docker pull mozilla/kinto-dist:latest
2023-11-10 04:18:05 +03:00
compose_build : ## Build containers
2023-09-15 23:17:24 +03:00
$( COMPOSE) build
2020-10-26 19:26:09 +03:00
2024-01-26 22:16:00 +03:00
build_megazords :
$( DOCKER_BUILD) -f application-services/Dockerfile -t experimenter:megazords application-services/
2024-02-01 01:19:56 +03:00
update_application_services : build_megazords
docker run \
-v ./application-services/application-services.env:/application-services/application-services.env \
experimenter:megazords \
/application-services/update-application-services.sh
2024-01-31 00:08:02 +03:00
build_dev : ssl build_megazords
2023-09-20 23:30:37 +03:00
$( DOCKER_BUILD) --target dev -f experimenter/Dockerfile -t experimenter:dev experimenter/
2020-11-19 20:14:29 +03:00
2024-01-26 22:16:00 +03:00
build_integration_test : ssl build_megazords
$( DOCKER_BUILD) -f experimenter/tests/integration/Dockerfile -t experimenter:integration-tests experimenter/
2024-01-31 00:08:02 +03:00
build_test : ssl build_megazords
2023-09-20 23:30:37 +03:00
$( DOCKER_BUILD) --target test -f experimenter/Dockerfile -t experimenter:test experimenter/
2023-03-09 00:36:51 +03:00
2023-11-10 00:23:19 +03:00
build_ui : ssl
2023-09-20 23:30:37 +03:00
$( DOCKER_BUILD) --target ui -f experimenter/Dockerfile -t experimenter:ui experimenter/
2021-07-30 20:50:12 +03:00
2024-01-31 00:08:02 +03:00
build_prod : ssl build_megazords
2023-09-20 23:30:37 +03:00
$( DOCKER_BUILD) --target deploy -f experimenter/Dockerfile -t experimenter:deploy experimenter/
2016-11-09 23:06:28 +03:00
2020-03-17 20:35:06 +03:00
compose_stop :
2021-07-08 18:33:10 +03:00
$( COMPOSE) kill || true
$( COMPOSE_INTEGRATION) kill || true
$( COMPOSE_PROD) kill || true
2018-06-06 01:34:43 +03:00
2019-09-11 17:28:22 +03:00
compose_rm :
2021-07-08 18:33:10 +03:00
$( COMPOSE) rm -f -v || true
$( COMPOSE_INTEGRATION) rm -f -v || true
$( COMPOSE_PROD) rm -f -v || true
2019-09-11 17:28:22 +03:00
2023-06-19 23:35:16 +03:00
docker_prune :
docker container prune -f
docker image prune -f
2020-10-08 00:12:56 +03:00
docker volume prune -f
2023-08-18 23:50:04 +03:00
docker volume rm $$ ( docker volume ls -qf dangling = true ) || true
2019-11-16 03:08:21 +03:00
2023-11-10 04:18:05 +03:00
static_rm : ## Remove statically generated files
2023-03-09 00:36:51 +03:00
rm -Rf experimenter/node_modules
rm -Rf experimenter/experimenter/legacy/legacy-ui/core/node_modules/
rm -Rf experimenter/experimenter/nimbus-ui/node_modules/
rm -Rf experimenter/experimenter/legacy/legacy-ui/assets/
rm -Rf experimenter/experimenter/nimbus-ui/build/
2020-10-26 19:26:09 +03:00
2023-11-10 04:18:05 +03:00
kill : compose_stop compose_rm docker_prune ## Stop, remove, and prune containers
2019-09-11 17:28:22 +03:00
echo "All containers removed!"
2023-11-10 04:18:05 +03:00
lint : build_test ## Running linting on source code
2024-11-08 22:47:05 +03:00
$( COMPOSE_TEST_RUN) experimenter sh -c '$(WAIT_FOR_DB) (${PARALLEL} "$(NIMBUS_SCHEMA_CHECK)" "$(PYTHON_CHECK_MIGRATIONS)" "$(CHECK_DOCS)" "$(BLACK_CHECK)" "$(RUFF_CHECK)" "$(DJLINT_CHECK)" "$(ESLINT_LEGACY)" "$(ESLINT_NIMBUS_UI)" "$(ESLINT_NIMBUS_UI_NEW)" "$(TYPECHECK_NIMBUS_UI)" "$(PYTHON_TYPECHECK)" "$(PYTHON_TEST)" "$(JS_TEST_LEGACY)" "$(JS_TEST_NIMBUS_UI)" "$(JS_TEST_REPORTING)") ${COLOR_CHECK}'
2023-11-10 04:18:05 +03:00
check : lint
2021-04-06 20:36:36 +03:00
2023-11-10 04:18:05 +03:00
test : build_test ## Run tests
2024-11-08 22:47:05 +03:00
$( COMPOSE_TEST_RUN) experimenter sh -c '$(WAIT_FOR_DB) $(PYTHON_TEST)'
2023-11-10 04:18:05 +03:00
pytest : test
2021-04-06 20:36:36 +03:00
2023-11-10 04:18:05 +03:00
start : build_dev ## Start containers
2019-12-03 21:26:20 +03:00
$( COMPOSE) up
2023-12-07 22:50:36 +03:00
2023-11-10 04:18:05 +03:00
up : start
2016-11-09 23:06:28 +03:00
2022-01-04 01:43:53 +03:00
up_legacy : build_dev
$( COMPOSE_LEGACY) up
2021-07-15 18:37:09 +03:00
up_prod : build_prod
2020-10-26 19:26:09 +03:00
$( COMPOSE_PROD) up
2021-07-15 18:37:09 +03:00
up_prod_detached : build_prod
2020-10-26 19:26:09 +03:00
$( COMPOSE_PROD) up -d
2021-07-15 18:37:09 +03:00
up_db : build_dev
2020-09-12 00:12:46 +03:00
$( COMPOSE) up db redis kinto autograph
2021-07-15 18:37:09 +03:00
up_django : build_dev
2023-03-09 00:36:51 +03:00
$( COMPOSE) up nginx experimenter worker beat db redis kinto autograph
2020-09-12 00:12:46 +03:00
2021-07-15 18:37:09 +03:00
up_detached : build_dev
2020-03-17 20:35:06 +03:00
$( COMPOSE) up -d
2021-07-15 18:37:09 +03:00
generate_docs : build_dev
2024-11-08 22:47:05 +03:00
$( COMPOSE_RUN) experimenter sh -c " $( GENERATE_DOCS) "
2020-02-21 21:45:39 +03:00
2020-11-19 20:14:29 +03:00
generate_types : build_dev
2024-11-08 22:47:05 +03:00
$( COMPOSE_RUN) experimenter sh -c " $( NIMBUS_TYPES_GENERATE) "
2020-11-09 22:57:03 +03:00
2023-11-10 04:18:05 +03:00
format : build_dev ## Format source tree
2024-11-08 22:47:05 +03:00
$( COMPOSE_RUN) experimenter sh -c '${PARALLEL} "$(RUFF_FIX);$(DJLINT_FIX);$(BLACK_FIX)" "$(ESLINT_FIX_CORE)" "$(ESLINT_FIX_NIMBUS_UI)" "$(ESLINT_FIX_NIMBUS_UI_NEW)"'
2023-11-10 04:18:05 +03:00
code_format : format
2020-02-21 21:45:39 +03:00
2021-07-15 18:37:09 +03:00
makemigrations : build_dev
2024-11-08 22:47:05 +03:00
$( COMPOSE_RUN) experimenter python manage.py makemigrations
2017-05-05 22:52:56 +03:00
2023-11-10 04:18:05 +03:00
migrate : build_dev ## Run database migrations
2024-11-08 22:47:05 +03:00
$( COMPOSE_RUN) experimenter sh -c " $( WAIT_FOR_DB) $( PYTHON_MIGRATE) "
2016-11-09 23:06:28 +03:00
2021-07-15 18:37:09 +03:00
bash : build_dev
2024-11-08 22:47:05 +03:00
$( COMPOSE_RUN) experimenter bash
2017-04-27 21:42:17 +03:00
2024-10-31 22:49:37 +03:00
refresh : kill build_dev compose_build refresh_db ## Rebuild all containers and the database
refresh_db : # Rebuild the database
2024-11-08 22:47:05 +03:00
$( COMPOSE_RUN) -e SKIP_DUMMY = $$ SKIP_DUMMY experimenter bash -c '$(WAIT_FOR_DB) $(PYTHON_MIGRATE)&&$(LOAD_LOCALES)&&$(LOAD_COUNTRIES)&&$(LOAD_LANGUAGES)&&$(LOAD_FEATURES)&&$(LOAD_DUMMY_EXPERIMENTS)'
2019-09-11 17:28:22 +03:00
2021-07-14 22:09:33 +03:00
dependabot_approve :
echo "Install and configure the Github CLI https://github.com/cli/cli"
2023-08-08 22:16:58 +03:00
gh pr list | grep "dependabot/" | awk '{print $$1}' | xargs -n1 gh pr review -a -b "@dependabot squash and merge"
gh pr list | grep "dependabot/" | awk '{print $$1}' | xargs -n1 gh pr merge
2021-07-14 22:09:33 +03:00
2019-09-11 17:28:22 +03:00
# integration tests
2021-07-15 18:37:09 +03:00
integration_shell :
2024-11-08 22:47:05 +03:00
$( COMPOSE_INTEGRATION_RUN) firefox bash
2019-10-09 21:02:08 +03:00
2024-04-05 18:51:17 +03:00
integration_sdk_shell : build_prod build_integration_test
2024-11-08 22:47:05 +03:00
$( COMPOSE_INTEGRATION_RUN) rust-sdk bash
2022-06-07 19:31:50 +03:00
2022-09-02 19:14:36 +03:00
integration_vnc_up : build_prod
2024-03-07 03:37:58 +03:00
$( COMPOSE_INTEGRATION) up firefox
2020-03-30 19:04:18 +03:00
2022-09-02 19:14:36 +03:00
integration_vnc_up_detached : build_prod
2020-03-30 19:04:18 +03:00
$( COMPOSE_INTEGRATION) up -d firefox
2019-09-11 17:28:22 +03:00
2022-09-02 19:14:36 +03:00
integration_test_legacy : build_prod
2024-11-08 22:47:05 +03:00
MOZ_HEADLESS = 1 $( COMPOSE_INTEGRATION_RUN) firefox sh -c "./experimenter/tests/experimenter_legacy_tests.sh"
2021-04-14 23:04:31 +03:00
2022-09-02 19:14:36 +03:00
integration_test_nimbus : build_prod
2024-11-08 22:47:05 +03:00
MOZ_HEADLESS = 1 $( COMPOSE_INTEGRATION_RUN) firefox sh -c " UPDATE_FIREFOX_VERSION= $( UPDATE_FIREFOX_VERSION) FIREFOX_BETA= $( FIREFOX_BETA) FIREFOX_RELEASE= $( FIREFOX_RELEASE) PYTEST_SENTRY_DSN= $( PYTEST_SENTRY_DSN) PYTEST_SENTRY_ALWAYS_REPORT= $( PYTEST_SENTRY_ALWAYS_REPORT) CIRCLECI= $( CIRCLECI) ./experimenter/tests/nimbus_integration_tests.sh "
2022-06-07 19:31:50 +03:00
2024-01-26 22:16:00 +03:00
integration_test_nimbus_rust : build_integration_test build_prod
2024-11-08 22:47:05 +03:00
MOZ_HEADLESS = 1 $( COMPOSE_INTEGRATION_RUN) -it rust-sdk sh -c "./experimenter/tests/nimbus_rust_tests.sh"
2024-06-24 21:56:10 +03:00
integration_test_nimbus_fenix :
2024-08-27 23:41:33 +03:00
poetry -C experimenter/tests/integration/ -vvv install --no-root
poetry -C experimenter/tests/integration/ -vvv run pytest --html= experimenter/tests/integration/test-reports/report.htm --self-contained-html --reruns-delay 30 --driver Firefox experimenter/tests/integration/nimbus/android -vvv
2023-03-13 21:54:35 +03:00
2023-03-06 21:45:53 +03:00
# cirrus
2023-12-07 22:50:36 +03:00
CIRRUS_ENABLE = export CIRRUS = 1 &&
2023-05-15 19:49:52 +03:00
CIRRUS_BLACK_CHECK = black -l 90 --check --diff .
CIRRUS_BLACK_FIX = black -l 90 .
chore(deps-dev): Bump ruff from 0.4.1 to 0.5.0 in /schemas (#10927)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.1 to 0.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>0.5.0</h2>
<h2>Release Notes</h2>
<p>Check out the <a href="https://astral.sh/blog/ruff-v0.5.0">blog
post</a> for a migration guide and overview of the changes!</p>
<h3>Breaking changes</h3>
<p>See also, the "Remapped rules" section which may result in
disabled rules.</p>
<ul>
<li>Follow the XDG specification to discover user-level configurations
on macOS (same as on other Unix platforms)</li>
<li>Selecting <code>ALL</code> now excludes deprecated rules</li>
<li>The released archives now include an extra level of nesting, which
can be removed with <code>--strip-components=1</code> when
untarring.</li>
<li>The release artifact's file name no longer includes the version tag.
This enables users to install via <code>/latest</code> URLs on
GitHub.</li>
<li>The diagnostic ranges for some <code>flake8-bandit</code> rules were
modified (<a
href="https://redirect.github.com/astral-sh/ruff/pull/10667">#10667</a>).</li>
</ul>
<h3>Deprecations</h3>
<p>The following rules are now deprecated:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/syntax-error/"><code>syntax-error</code></a>
(<code>E999</code>): Syntax errors are now always shown</li>
</ul>
<h3>Remapped rules</h3>
<p>The following rules have been remapped to new rule codes:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-http-call-in-async-function/"><code>blocking-http-call-in-async-function</code></a>:
<code>ASYNC100</code> to <code>ASYNC210</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/open-sleep-or-subprocess-in-async-function/"><code>open-sleep-or-subprocess-in-async-function</code></a>:
<code>ASYNC101</code> split into <code>ASYNC220</code>,
<code>ASYNC221</code>, <code>ASYNC230</code>, and
<code>ASYNC251</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-os-call-in-async-function/"><code>blocking-os-call-in-async-function</code></a>:
<code>ASYNC102</code> has been merged into <code>ASYNC220</code> and
<code>ASYNC221</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-timeout-without-await/"><code>trio-timeout-without-await</code></a>:
<code>TRIO100</code> to <code>ASYNC100</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-sync-call/"><code>trio-sync-call</code></a>:
<code>TRIO105</code> to <code>ASYNC105</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-async-function-with-timeout/"><code>trio-async-function-with-timeout</code></a>:
<code>TRIO109</code> to <code>ASYNC109</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-unneeded-sleep/"><code>trio-unneeded-sleep</code></a>:
<code>TRIO110</code> to <code>ASYNC110</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-zero-sleep-call/"><code>trio-zero-sleep-call</code></a>:
<code>TRIO115</code> to <code>ASYNC115</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/repeated-isinstance-calls/"><code>repeated-isinstance-calls</code></a>:
<code>PLR1701</code> to <code>SIM101</code></li>
</ul>
<h3>Stabilization</h3>
<p>The following rules have been stabilized and are no longer in
preview:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/mutable-fromkeys-value/"><code>mutable-fromkeys-value</code></a>
(<code>RUF024</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/default-factory-kwarg/"><code>default-factory-kwarg</code></a>
(<code>RUF026</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/django-extra/"><code>django-extra</code></a>
(<code>S610</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/manual-dict-comprehension/"><code>manual-dict-comprehension</code></a>
(<code>PERF403</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/print-empty-string/"><code>print-empty-string</code></a>
(<code>FURB105</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/readlines-in-for/"><code>readlines-in-for</code></a>
(<code>FURB129</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/if-expr-min-max/"><code>if-expr-min-max</code></a>
(<code>FURB136</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/bit-count/"><code>bit-count</code></a>
(<code>FURB161</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/redundant-log-base/"><code>redundant-log-base</code></a>
(<code>FURB163</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/regex-flag-alias/"><code>regex-flag-alias</code></a>
(<code>FURB167</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/isinstance-type-none/"><code>isinstance-type-none</code></a>
(<code>FURB168</code>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.5.0</h2>
<p>Check out the <a href="https://astral.sh/blog/ruff-v0.5.0">blog
post</a> for a migration guide and overview of the changes!</p>
<h3>Breaking changes</h3>
<p>See also, the "Remapped rules" section which may result in
disabled rules.</p>
<ul>
<li>Follow the XDG specification to discover user-level configurations
on macOS (same as on other Unix platforms)</li>
<li>Selecting <code>ALL</code> now excludes deprecated rules</li>
<li>The released archives now include an extra level of nesting, which
can be removed with <code>--strip-components=1</code> when
untarring.</li>
<li>The release artifact's file name no longer includes the version tag.
This enables users to install via <code>/latest</code> URLs on
GitHub.</li>
<li>The diagnostic ranges for some <code>flake8-bandit</code> rules were
modified (<a
href="https://redirect.github.com/astral-sh/ruff/pull/10667">#10667</a>).</li>
</ul>
<h3>Deprecations</h3>
<p>The following rules are now deprecated:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/syntax-error/"><code>syntax-error</code></a>
(<code>E999</code>): Syntax errors are now always shown</li>
</ul>
<h3>Remapped rules</h3>
<p>The following rules have been remapped to new rule codes:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-http-call-in-async-function/"><code>blocking-http-call-in-async-function</code></a>:
<code>ASYNC100</code> to <code>ASYNC210</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/open-sleep-or-subprocess-in-async-function/"><code>open-sleep-or-subprocess-in-async-function</code></a>:
<code>ASYNC101</code> split into <code>ASYNC220</code>,
<code>ASYNC221</code>, <code>ASYNC230</code>, and
<code>ASYNC251</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-os-call-in-async-function/"><code>blocking-os-call-in-async-function</code></a>:
<code>ASYNC102</code> has been merged into <code>ASYNC220</code> and
<code>ASYNC221</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-timeout-without-await/"><code>trio-timeout-without-await</code></a>:
<code>TRIO100</code> to <code>ASYNC100</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-sync-call/"><code>trio-sync-call</code></a>:
<code>TRIO105</code> to <code>ASYNC105</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-async-function-with-timeout/"><code>trio-async-function-with-timeout</code></a>:
<code>TRIO109</code> to <code>ASYNC109</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-unneeded-sleep/"><code>trio-unneeded-sleep</code></a>:
<code>TRIO110</code> to <code>ASYNC110</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-zero-sleep-call/"><code>trio-zero-sleep-call</code></a>:
<code>TRIO115</code> to <code>ASYNC115</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/repeated-isinstance-calls/"><code>repeated-isinstance-calls</code></a>:
<code>PLR1701</code> to <code>SIM101</code></li>
</ul>
<h3>Stabilization</h3>
<p>The following rules have been stabilized and are no longer in
preview:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/mutable-fromkeys-value/"><code>mutable-fromkeys-value</code></a>
(<code>RUF024</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/default-factory-kwarg/"><code>default-factory-kwarg</code></a>
(<code>RUF026</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/django-extra/"><code>django-extra</code></a>
(<code>S610</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/manual-dict-comprehension/"><code>manual-dict-comprehension</code></a>
(<code>PERF403</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/print-empty-string/"><code>print-empty-string</code></a>
(<code>FURB105</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/readlines-in-for/"><code>readlines-in-for</code></a>
(<code>FURB129</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/if-expr-min-max/"><code>if-expr-min-max</code></a>
(<code>FURB136</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/bit-count/"><code>bit-count</code></a>
(<code>FURB161</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/redundant-log-base/"><code>redundant-log-base</code></a>
(<code>FURB163</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/regex-flag-alias/"><code>regex-flag-alias</code></a>
(<code>FURB167</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/isinstance-type-none/"><code>isinstance-type-none</code></a>
(<code>FURB168</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/type-none-comparison/"><code>type-none-comparison</code></a>
(<code>FURB169</code>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/244b923f615c2c162278fc0e06051853614760f3"><code>244b923</code></a>
Add necessary permissions for cargo-dist Docker build (<a
href="https://redirect.github.com/astral-sh/ruff/issues/12072">#12072</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/a8b48fce7e32b35538072ccd55dac64e158d1e34"><code>a8b48fc</code></a>
Release v0.5.0 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/12068">#12068</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/04c8597b8ab1a459d77058b6899571095092bc2d"><code>04c8597</code></a>
[<code>flake8-simplify</code>] Stabilize detection of Yoda conditions
for "constant" col...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/4029a25ebd88a26424f45b20aba20c8e56a54d62"><code>4029a25</code></a>
[Ruff v0.5] Stabilise 15 pylint rules (<a
href="https://redirect.github.com/astral-sh/ruff/issues/12051">#12051</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/0917ce16f477f20b60d6d6f96462d4c83168f6f6"><code>0917ce1</code></a>
Update documentation to mention <code>etcetera</code> crate instead of
<code>dirs</code> for user c...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/22cebdf29b79c9bb39b341149b2764730de72d97"><code>22cebdf</code></a>
Add server config to filter out syntax error diagnostics (<a
href="https://redirect.github.com/astral-sh/ruff/issues/12059">#12059</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/72b6c26101ca920137202d455b014f9e680712f7"><code>72b6c26</code></a>
Simplify <code>LinterResult</code>, avoid cloning
<code>ParseError</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/11903">#11903</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/73851e73ab0629461fbec84ee35ea91948d0c474"><code>73851e7</code></a>
Avoid displaying syntax error as log message (<a
href="https://redirect.github.com/astral-sh/ruff/issues/11902">#11902</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/e7b49694a795e3347ffc6f499245dfcbbb4b28ed"><code>e7b4969</code></a>
Remove <code>E999</code> as a rule, disallow any disablement methods for
syntax error (#...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/c98d8a040fbcd3428f1b0189ebdc9fbb8183b215"><code>c98d8a0</code></a>
[<code>pyflakes</code>] Stabilize detection of is comparisons to lists,
etc. (<code>F632</code>) (#...</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.4.1...0.5.0">compare
view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.4.1&new-version=0.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jared Lockhart <119884+jaredlockhart@users.noreply.github.com>
2024-07-03 23:32:25 +03:00
CIRRUS_RUFF_CHECK = ruff check .
2024-07-24 19:48:06 +03:00
CIRRUS_RUFF_FIX = ruff check --fix .
2024-09-13 18:43:17 +03:00
CIRRUS_PYTEST = pytest . --cov-config= .coveragerc --cov= cirrus -v
2023-05-15 19:49:52 +03:00
CIRRUS_PYTHON_TYPECHECK = pyright -p .
CIRRUS_PYTHON_TYPECHECK_CREATESTUB = pyright -p . --createstub cirrus
CIRRUS_GENERATE_DOCS = python cirrus/generate_docs.py
2024-01-31 00:08:02 +03:00
cirrus_build : build_megazords
2023-12-07 22:50:36 +03:00
$( CIRRUS_ENABLE) $( DOCKER_BUILD) --target deploy -f cirrus/server/Dockerfile -t cirrus:deploy cirrus/server/
2023-07-12 21:58:07 +03:00
2024-01-31 04:11:50 +03:00
cirrus_build_test : build_megazords
2023-12-07 22:50:36 +03:00
$( CIRRUS_ENABLE) $( COMPOSE_TEST) build cirrus
2023-11-07 23:36:54 +03:00
cirrus_bash : cirrus_build
2024-11-08 22:47:05 +03:00
$( CIRRUS_ENABLE) $( COMPOSE_RUN) cirrus bash
2023-11-07 23:36:54 +03:00
2023-05-15 19:49:52 +03:00
cirrus_up : cirrus_build
2023-12-07 22:50:36 +03:00
$( CIRRUS_ENABLE) $( COMPOSE) up cirrus
2023-03-06 21:45:53 +03:00
2023-05-15 19:49:52 +03:00
cirrus_down : cirrus_build
2023-12-07 22:50:36 +03:00
$( CIRRUS_ENABLE) $( COMPOSE) down cirrus
2023-03-09 00:36:51 +03:00
2023-11-07 23:36:54 +03:00
cirrus_test : cirrus_build_test
2024-11-08 22:47:05 +03:00
$( CIRRUS_ENABLE) $( COMPOSE_TEST_RUN) cirrus sh -c '$(CIRRUS_PYTEST)'
2023-03-15 21:59:28 +03:00
2023-11-07 23:36:54 +03:00
cirrus_check : cirrus_build_test
2024-11-08 22:47:05 +03:00
$( CIRRUS_ENABLE) $( COMPOSE_TEST_RUN) cirrus sh -c " $( CIRRUS_RUFF_CHECK) && $( CIRRUS_BLACK_CHECK) && $( CIRRUS_PYTHON_TYPECHECK) && $( CIRRUS_PYTEST) && $( CIRRUS_GENERATE_DOCS) --check "
2023-03-11 00:38:36 +03:00
2023-05-15 19:49:52 +03:00
cirrus_code_format : cirrus_build
2024-11-08 22:47:05 +03:00
$( CIRRUS_ENABLE) $( COMPOSE_RUN) cirrus sh -c '$(CIRRUS_RUFF_FIX) && $(CIRRUS_BLACK_FIX)'
2023-03-28 02:10:01 +03:00
2023-05-15 19:49:52 +03:00
cirrus_typecheck_createstub : cirrus_build
2024-11-08 22:47:05 +03:00
$( CIRRUS_ENABLE) $( COMPOSE_RUN) cirrus sh -c '$(CIRRUS_PYTHON_TYPECHECK_CREATESTUB)'
2023-03-28 02:10:01 +03:00
2023-05-15 19:49:52 +03:00
cirrus_generate_docs : cirrus_build
2024-11-08 22:47:05 +03:00
$( CIRRUS_ENABLE) $( COMPOSE_RUN) cirrus sh -c '$(CIRRUS_GENERATE_DOCS)'
2023-04-18 19:44:30 +03:00
2023-08-11 20:35:58 +03:00
build_demo_app :
2023-12-07 22:50:36 +03:00
$( CIRRUS_ENABLE) $( COMPOSE_INTEGRATION) build demo-app-frontend demo-app-server
2023-08-11 20:35:58 +03:00
2023-08-11 23:56:49 +03:00
# nimbus schemas package
2023-10-24 23:30:55 +03:00
SCHEMAS_ENV ?= # This is empty by default
SCHEMAS_VERSION = \$ $( cat VERSION)
2024-11-08 22:47:05 +03:00
SCHEMAS_RUN = docker run --rm -ti $( SCHEMAS_ENV) -v ./schemas:/schemas -v /schemas/node_modules schemas:dev sh -c
2023-10-24 23:30:55 +03:00
SCHEMAS_BLACK = black --check --diff .
chore(deps-dev): Bump ruff from 0.4.1 to 0.5.0 in /schemas (#10927)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.1 to 0.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>0.5.0</h2>
<h2>Release Notes</h2>
<p>Check out the <a href="https://astral.sh/blog/ruff-v0.5.0">blog
post</a> for a migration guide and overview of the changes!</p>
<h3>Breaking changes</h3>
<p>See also, the "Remapped rules" section which may result in
disabled rules.</p>
<ul>
<li>Follow the XDG specification to discover user-level configurations
on macOS (same as on other Unix platforms)</li>
<li>Selecting <code>ALL</code> now excludes deprecated rules</li>
<li>The released archives now include an extra level of nesting, which
can be removed with <code>--strip-components=1</code> when
untarring.</li>
<li>The release artifact's file name no longer includes the version tag.
This enables users to install via <code>/latest</code> URLs on
GitHub.</li>
<li>The diagnostic ranges for some <code>flake8-bandit</code> rules were
modified (<a
href="https://redirect.github.com/astral-sh/ruff/pull/10667">#10667</a>).</li>
</ul>
<h3>Deprecations</h3>
<p>The following rules are now deprecated:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/syntax-error/"><code>syntax-error</code></a>
(<code>E999</code>): Syntax errors are now always shown</li>
</ul>
<h3>Remapped rules</h3>
<p>The following rules have been remapped to new rule codes:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-http-call-in-async-function/"><code>blocking-http-call-in-async-function</code></a>:
<code>ASYNC100</code> to <code>ASYNC210</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/open-sleep-or-subprocess-in-async-function/"><code>open-sleep-or-subprocess-in-async-function</code></a>:
<code>ASYNC101</code> split into <code>ASYNC220</code>,
<code>ASYNC221</code>, <code>ASYNC230</code>, and
<code>ASYNC251</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-os-call-in-async-function/"><code>blocking-os-call-in-async-function</code></a>:
<code>ASYNC102</code> has been merged into <code>ASYNC220</code> and
<code>ASYNC221</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-timeout-without-await/"><code>trio-timeout-without-await</code></a>:
<code>TRIO100</code> to <code>ASYNC100</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-sync-call/"><code>trio-sync-call</code></a>:
<code>TRIO105</code> to <code>ASYNC105</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-async-function-with-timeout/"><code>trio-async-function-with-timeout</code></a>:
<code>TRIO109</code> to <code>ASYNC109</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-unneeded-sleep/"><code>trio-unneeded-sleep</code></a>:
<code>TRIO110</code> to <code>ASYNC110</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-zero-sleep-call/"><code>trio-zero-sleep-call</code></a>:
<code>TRIO115</code> to <code>ASYNC115</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/repeated-isinstance-calls/"><code>repeated-isinstance-calls</code></a>:
<code>PLR1701</code> to <code>SIM101</code></li>
</ul>
<h3>Stabilization</h3>
<p>The following rules have been stabilized and are no longer in
preview:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/mutable-fromkeys-value/"><code>mutable-fromkeys-value</code></a>
(<code>RUF024</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/default-factory-kwarg/"><code>default-factory-kwarg</code></a>
(<code>RUF026</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/django-extra/"><code>django-extra</code></a>
(<code>S610</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/manual-dict-comprehension/"><code>manual-dict-comprehension</code></a>
(<code>PERF403</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/print-empty-string/"><code>print-empty-string</code></a>
(<code>FURB105</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/readlines-in-for/"><code>readlines-in-for</code></a>
(<code>FURB129</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/if-expr-min-max/"><code>if-expr-min-max</code></a>
(<code>FURB136</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/bit-count/"><code>bit-count</code></a>
(<code>FURB161</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/redundant-log-base/"><code>redundant-log-base</code></a>
(<code>FURB163</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/regex-flag-alias/"><code>regex-flag-alias</code></a>
(<code>FURB167</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/isinstance-type-none/"><code>isinstance-type-none</code></a>
(<code>FURB168</code>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.5.0</h2>
<p>Check out the <a href="https://astral.sh/blog/ruff-v0.5.0">blog
post</a> for a migration guide and overview of the changes!</p>
<h3>Breaking changes</h3>
<p>See also, the "Remapped rules" section which may result in
disabled rules.</p>
<ul>
<li>Follow the XDG specification to discover user-level configurations
on macOS (same as on other Unix platforms)</li>
<li>Selecting <code>ALL</code> now excludes deprecated rules</li>
<li>The released archives now include an extra level of nesting, which
can be removed with <code>--strip-components=1</code> when
untarring.</li>
<li>The release artifact's file name no longer includes the version tag.
This enables users to install via <code>/latest</code> URLs on
GitHub.</li>
<li>The diagnostic ranges for some <code>flake8-bandit</code> rules were
modified (<a
href="https://redirect.github.com/astral-sh/ruff/pull/10667">#10667</a>).</li>
</ul>
<h3>Deprecations</h3>
<p>The following rules are now deprecated:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/syntax-error/"><code>syntax-error</code></a>
(<code>E999</code>): Syntax errors are now always shown</li>
</ul>
<h3>Remapped rules</h3>
<p>The following rules have been remapped to new rule codes:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-http-call-in-async-function/"><code>blocking-http-call-in-async-function</code></a>:
<code>ASYNC100</code> to <code>ASYNC210</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/open-sleep-or-subprocess-in-async-function/"><code>open-sleep-or-subprocess-in-async-function</code></a>:
<code>ASYNC101</code> split into <code>ASYNC220</code>,
<code>ASYNC221</code>, <code>ASYNC230</code>, and
<code>ASYNC251</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-os-call-in-async-function/"><code>blocking-os-call-in-async-function</code></a>:
<code>ASYNC102</code> has been merged into <code>ASYNC220</code> and
<code>ASYNC221</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-timeout-without-await/"><code>trio-timeout-without-await</code></a>:
<code>TRIO100</code> to <code>ASYNC100</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-sync-call/"><code>trio-sync-call</code></a>:
<code>TRIO105</code> to <code>ASYNC105</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-async-function-with-timeout/"><code>trio-async-function-with-timeout</code></a>:
<code>TRIO109</code> to <code>ASYNC109</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-unneeded-sleep/"><code>trio-unneeded-sleep</code></a>:
<code>TRIO110</code> to <code>ASYNC110</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-zero-sleep-call/"><code>trio-zero-sleep-call</code></a>:
<code>TRIO115</code> to <code>ASYNC115</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/repeated-isinstance-calls/"><code>repeated-isinstance-calls</code></a>:
<code>PLR1701</code> to <code>SIM101</code></li>
</ul>
<h3>Stabilization</h3>
<p>The following rules have been stabilized and are no longer in
preview:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/mutable-fromkeys-value/"><code>mutable-fromkeys-value</code></a>
(<code>RUF024</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/default-factory-kwarg/"><code>default-factory-kwarg</code></a>
(<code>RUF026</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/django-extra/"><code>django-extra</code></a>
(<code>S610</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/manual-dict-comprehension/"><code>manual-dict-comprehension</code></a>
(<code>PERF403</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/print-empty-string/"><code>print-empty-string</code></a>
(<code>FURB105</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/readlines-in-for/"><code>readlines-in-for</code></a>
(<code>FURB129</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/if-expr-min-max/"><code>if-expr-min-max</code></a>
(<code>FURB136</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/bit-count/"><code>bit-count</code></a>
(<code>FURB161</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/redundant-log-base/"><code>redundant-log-base</code></a>
(<code>FURB163</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/regex-flag-alias/"><code>regex-flag-alias</code></a>
(<code>FURB167</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/isinstance-type-none/"><code>isinstance-type-none</code></a>
(<code>FURB168</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/type-none-comparison/"><code>type-none-comparison</code></a>
(<code>FURB169</code>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/244b923f615c2c162278fc0e06051853614760f3"><code>244b923</code></a>
Add necessary permissions for cargo-dist Docker build (<a
href="https://redirect.github.com/astral-sh/ruff/issues/12072">#12072</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/a8b48fce7e32b35538072ccd55dac64e158d1e34"><code>a8b48fc</code></a>
Release v0.5.0 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/12068">#12068</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/04c8597b8ab1a459d77058b6899571095092bc2d"><code>04c8597</code></a>
[<code>flake8-simplify</code>] Stabilize detection of Yoda conditions
for "constant" col...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/4029a25ebd88a26424f45b20aba20c8e56a54d62"><code>4029a25</code></a>
[Ruff v0.5] Stabilise 15 pylint rules (<a
href="https://redirect.github.com/astral-sh/ruff/issues/12051">#12051</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/0917ce16f477f20b60d6d6f96462d4c83168f6f6"><code>0917ce1</code></a>
Update documentation to mention <code>etcetera</code> crate instead of
<code>dirs</code> for user c...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/22cebdf29b79c9bb39b341149b2764730de72d97"><code>22cebdf</code></a>
Add server config to filter out syntax error diagnostics (<a
href="https://redirect.github.com/astral-sh/ruff/issues/12059">#12059</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/72b6c26101ca920137202d455b014f9e680712f7"><code>72b6c26</code></a>
Simplify <code>LinterResult</code>, avoid cloning
<code>ParseError</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/11903">#11903</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/73851e73ab0629461fbec84ee35ea91948d0c474"><code>73851e7</code></a>
Avoid displaying syntax error as log message (<a
href="https://redirect.github.com/astral-sh/ruff/issues/11902">#11902</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/e7b49694a795e3347ffc6f499245dfcbbb4b28ed"><code>e7b4969</code></a>
Remove <code>E999</code> as a rule, disallow any disablement methods for
syntax error (#...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/c98d8a040fbcd3428f1b0189ebdc9fbb8183b215"><code>c98d8a0</code></a>
[<code>pyflakes</code>] Stabilize detection of is comparisons to lists,
etc. (<code>F632</code>) (#...</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.4.1...0.5.0">compare
view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.4.1&new-version=0.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jared Lockhart <119884+jaredlockhart@users.noreply.github.com>
2024-07-03 23:32:25 +03:00
SCHEMAS_RUFF = ruff check .
2023-10-24 23:30:55 +03:00
SCHEMAS_DIFF_PYDANTIC = \
2024-09-09 21:26:28 +03:00
poetry run python generate_json_schema.py --output /tmp/test_index.d.ts && \
2023-10-24 23:30:55 +03:00
diff /tmp/test_index.d.ts index.d.ts || ( echo nimbus-schemas typescript package is out of sync please run make schemas_build; exit 1) && \
echo 'Done. No problems found in schemas.'
SCHEMAS_TEST = pytest
2024-09-09 21:26:28 +03:00
SCHEMAS_FORMAT = ruff check --fix . && black .
2024-10-18 23:30:05 +03:00
SCHEMAS_GENERATE = poetry run python generate_json_schema.py
2023-10-24 23:30:55 +03:00
SCHEMAS_DIST_PYPI = poetry build
SCHEMAS_DEPLOY_PYPI = twine upload --skip-existing dist/*;
SCHEMAS_DEPLOY_NPM = echo " //registry.npmjs.org/:_authToken= ${ NPM_TOKEN } " > .npmrc; yarn publish --new-version ${ SCHEMAS_VERSION } --access public;
SCHEMAS_VERSION_PYPI = poetry version ${ SCHEMAS_VERSION } ;
SCHEMAS_VERSION_NPM = npm version --allow-same-version ${ SCHEMAS_VERSION } ;
2023-08-11 20:35:58 +03:00
2024-03-25 18:08:55 +03:00
schemas_docker_build : ## Build schemas docker image
2023-10-24 23:30:55 +03:00
$( DOCKER_BUILD) --target dev -f schemas/Dockerfile -t schemas:dev schemas/
2023-06-09 23:12:34 +03:00
2024-10-18 23:30:05 +03:00
schemas_build : schemas_docker_build ## Build the mozilla_nimbus_schemas packages.
$( SCHEMAS_RUN) " $( SCHEMAS_GENERATE) && $( SCHEMAS_DIST_PYPI) "
2024-03-25 18:08:55 +03:00
schemas_bash : schemas_docker_build
2023-10-24 23:30:55 +03:00
$( SCHEMAS_RUN) "bash"
2023-06-09 23:12:34 +03:00
2024-03-25 18:08:55 +03:00
schemas_format : schemas_docker_build ## Format schemas source tree
2023-10-24 23:30:55 +03:00
$( SCHEMAS_RUN) " $( SCHEMAS_FORMAT) "
2023-06-09 23:12:34 +03:00
2024-03-25 18:08:55 +03:00
schemas_lint : schemas_docker_build ## Lint schemas source tree
2023-10-24 23:30:55 +03:00
$( SCHEMAS_RUN) " $( SCHEMAS_BLACK) && $( SCHEMAS_RUFF) && $( SCHEMAS_DIFF_PYDANTIC) && $( SCHEMAS_TEST) "
2023-06-09 23:12:34 +03:00
2024-10-18 23:30:05 +03:00
schemas_check : schemas_lint
2023-06-09 23:12:34 +03:00
2024-10-18 23:30:05 +03:00
schemas_generate : schemas_docker_build
$( SCHEMAS_RUN) " $( SCHEMAS_GENERATE) "
2023-06-15 21:12:45 +03:00
2023-08-11 23:56:49 +03:00
2024-10-18 23:30:05 +03:00
schemas_deploy_pypi : schemas_build
2023-10-24 23:30:55 +03:00
$( SCHEMAS_RUN) " $( SCHEMAS_DEPLOY_PYPI) "
2023-06-15 21:12:45 +03:00
2024-10-18 23:30:05 +03:00
schemas_deploy_npm : schemas_build
2023-10-24 23:30:55 +03:00
$( SCHEMAS_RUN) " $( SCHEMAS_DEPLOY_NPM) "
2023-08-11 23:56:49 +03:00
2024-03-25 18:08:55 +03:00
schemas_version_pypi : schemas_docker_build
2023-10-24 23:30:55 +03:00
$( SCHEMAS_RUN) " $( SCHEMAS_VERSION_PYPI) "
2023-08-11 23:56:49 +03:00
2024-03-25 18:08:55 +03:00
schemas_version_npm : schemas_docker_build
2023-10-24 23:30:55 +03:00
$( SCHEMAS_RUN) " $( SCHEMAS_VERSION_NPM) "
2023-08-11 23:56:49 +03:00
2023-10-24 23:30:55 +03:00
schemas_version : schemas_version_pypi schemas_version_npm