Skip to content

Commit

Permalink
Address typos in scripts documentation strings (#8185)
Browse files Browse the repository at this point in the history
DOC
  • Loading branch information
gaikwadrahul8 authored Feb 27, 2024
1 parent 818d672 commit f0f981f
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 16 deletions.
14 changes: 9 additions & 5 deletions scripts/cloud_funcs/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
This directory contains the following Google Cloud Functions.

### `trigger_nightly`
Programatically triggers a Cloud Build on master. This function is called by the Cloud Scheduler around 4am "America/New York" time every day (configurable via the Cloud Scheduler UI).

Programmatically triggers a Cloud Build on master. This function is called by the Cloud Scheduler around 4am "America/New York" time every day (configurable via the Cloud Scheduler UI).
You can also trigger the function manually via the Cloud UI.

Command to re-deploy:

```sh
gcloud functions deploy nightly_tfjs \
--runtime nodejs14 \
Expand All @@ -15,6 +17,7 @@ If a build was triggered by nightly, there is a substitution variable `_NIGHTLY=
You can forward the substitution as the `NIGHTLY` environment variable so the scripts can use it, by specifying `env: ['NIGHTLY=$_NIGHTLY']` in `cloudbuild.yml`. E.g. `integration_tests/benchmarks/benchmark_cloud.sh` uses the `NIGHTLY` bit to always run on nightly.

### `send_email`

Sends an email and a chat message with the nightly build status. Every build sends a message to the `cloud-builds` topic with its build information. The `send_email` function is subscribed to that topic and ignores all builds (e.g. builds triggered by pull requests) **except** for the nightly build and sends an email to an internal mailing list with its build status around 4:40am.

Command to re-deploy:
Expand All @@ -28,6 +31,7 @@ gcloud functions deploy send_email \
```

### `sync_reactnative`

Makes a request to browserStack to sync the current build of the tfjs-react-native integration app to browserstack. The app itself is stored in a GCP bucket. This needs to be done at least once every 30 days and is triggered via cloud scheduler via the `sync_reactnative` topic.
Currently set to run weekly on Thursdays at 3AM.

Expand All @@ -44,7 +48,7 @@ gcloud functions deploy sync_reactnative \

The pipeline looks like this:

1) At 4am, Cloud Scheduler writes to `nightly_tfjs` topic
2) That triggers the `nightly_tfjs` function, which starts a build programatically
3) That build runs and writes its status to `cloud-builds` topic
4) That triggers the `send_email` function, which sends email and chat with the build status.
1. At 4am, Cloud Scheduler writes to `nightly_tfjs` topic
2. That triggers the `nightly_tfjs` function, which starts a build programmatically
3. That build runs and writes its status to `cloud-builds` topic
4. That triggers the `send_email` function, which sends email and chat with the build status.
2 changes: 1 addition & 1 deletion scripts/generate_cloudbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface CloudbuildStep {
const CUSTOM_PROPS = new Set(['nightlyOnly', 'waitedForByPackages']);
interface CustomCloudbuildStep extends CloudbuildStep {
nightlyOnly?: boolean; // Only run during nightly tests
waitedForByPackages?: boolean; // Other non-bazel pacakges `waitFor` this step
waitedForByPackages?: boolean; // Other non-bazel packages `waitFor` this step
}

function removeCustomProps(step: CustomCloudbuildStep): CloudbuildStep {
Expand Down
6 changes: 3 additions & 3 deletions scripts/make-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fs.writeFile(path.join(dirName, 'src/version.ts'), versionCode, err => {
if (err) {
throw new Error(`Could not save version file ${version}: ${err}`);
}
console.log(`Version file for version ${version} saved sucessfully.`);
console.log(`Version file for version ${version} saved successfully.`);
});

if (dirName === 'tfjs-converter') {
Expand All @@ -60,7 +60,7 @@ version = '${version}'
throw new Error(`Could not save pip version file ${version}: ${err}`);
}
console.log(
`Version file for pip version ${version} saved sucessfully.`);
`Version file for pip version ${version} saved successfully.`);
});

const buildFilename = path.join(dirName, '/python/BUILD.bazel');
Expand All @@ -74,6 +74,6 @@ version = '${version}'
fs.writeFileSync(buildFilename, newValue, 'utf-8');

console.log(
`pip version ${version} for BUILD.bazel file is updated sucessfully.`);
`pip version ${version} for BUILD.bazel file is updated successfully.`);
});
}
2 changes: 1 addition & 1 deletion scripts/publish-npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function setDifference<T>(a: Set<T>, b: Set<T>): Set<T> {
const parser = new argparse.ArgumentParser();
parser.addArgument('--git-protocol', {
action: 'storeTrue',
help: 'Use the git protocal rather than the http protocol when cloning repos.'
help: 'Use the git protocol rather than the http protocol when cloning repos.'
});

parser.addArgument('--registry', {
Expand Down
4 changes: 2 additions & 2 deletions scripts/release-tfjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ async function main() {
fs.writeFileSync(packageJsonPath, pkg);

// Update dependency versions of all package.json files found in the
// package to use the new verison numbers (except ones in node_modules).
// package to use the new version numbers (except ones in node_modules).
const subpackages =
$(`find ${
packagePath} -name package.json -not -path \'*/node_modules/*\'`)
Expand Down Expand Up @@ -289,7 +289,7 @@ async function main() {
'YARN_REGISTRY="https://registry.npmjs.org/" yarn publish-npm ' +
'after you merge the PR.' +
'Remember to delete the dev branch once PR is merged.' +
'Please remeber to update the website once you have released ' +
'Please remember to update the website once you have released ' +
'a new package version.');

if (args.dry) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/release-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ export async function getReleaseBranch(name: string): Promise<string> {
Array.from(branchesStr.split(/\n/)).map(line => line.toString().trim());

// Find the latest matching branch, e.g. tfjs_1.7.1
// It will not match temprary generated branches such as tfjs_1.7.1_phase0.
// It will not match temporary generated branches such as tfjs_1.7.1_phase0.
const exp = '^' + name + '_([^_]+)$';
const regObj = new RegExp(exp);
const maybeBranch = branches.find(branch => branch.match(regObj));
Expand Down
4 changes: 2 additions & 2 deletions scripts/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const parser = new argparse.ArgumentParser();

parser.addArgument('--git-protocol', {
action: 'storeTrue',
help: 'Use the git protocal rather than the http protocol when cloning repos.'
help: 'Use the git protocol rather than the http protocol when cloning repos.'
});

async function main() {
Expand Down Expand Up @@ -174,7 +174,7 @@ async function main() {
`Please publish by running ` +
`YARN_REGISTRY="https://registry.npmjs.org/" yarn publish-npm ` +
`after you merge the PR.` +
`Please remeber to update the website once you have released ` +
`Please remember to update the website once you have released ` +
'a new package version');

process.exit(0);
Expand Down
2 changes: 1 addition & 1 deletion scripts/start_local_debugger_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ parser.addArgument('--port', {
});

parser.addArgument('--version', {
help: `The verison of the bundle. Default: ${DEFAULT_VERSION}`,
help: `The version of the bundle. Default: ${DEFAULT_VERSION}`,
defaultValue: DEFAULT_VERSION,
type: 'string',
});
Expand Down

0 comments on commit f0f981f

Please sign in to comment.