Skip to content

Commit

Permalink
chore(py): add copyright license headers to several scripts #1736
Browse files Browse the repository at this point in the history
  • Loading branch information
yesudeep committed Feb 1, 2025
1 parent 7cb0116 commit 1bc34d9
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 5 deletions.
2 changes: 2 additions & 0 deletions py/bin/build_dists
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail

Expand Down
16 changes: 16 additions & 0 deletions py/bin/check-licenses
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
#!/usr/bin/env bash
#
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail

Expand Down
16 changes: 16 additions & 0 deletions py/bin/cleanup
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
#!/usr/bin/env bash
#
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

set -x
set -euo pipefail
Expand Down
2 changes: 2 additions & 0 deletions py/bin/fmt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

#set -x # Uncomment to enable tracing.
set -euo pipefail
Expand Down
2 changes: 2 additions & 0 deletions py/bin/format_toml_files
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail

Expand Down
9 changes: 7 additions & 2 deletions py/bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

if ((EUID == 0)) && [[ -z ${DANGEROUSLY_RUN_AS_ROOT+x} ]]; then
echo "Please do not run as root unless DANGEROUSLY_RUN_AS_ROOT is set."
Expand Down Expand Up @@ -176,8 +178,11 @@ function genkit::install_cargo_cli_tools() {

# Install NPM packages.
function genkit::install_pnpm_cli_tools() {
# Install the Genkit CLI. See: https://firebase.google.com/docs/genkit/devtools
pnpm add -g genkit-cli
# Genkit CLI: https://firebase.google.com/docs/genkit/devtools
# Biome: https://biomejs.dev/
pnpm add -g \
@biomejs/biome \
genkit-cli
}

# Install all the Python-related formatter and static analysis tools.
Expand Down
4 changes: 1 addition & 3 deletions py/packages/dotprompt/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ classifiers = [
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries",
]
dependencies = [
"handlebarz",
]
dependencies = ["handlebarz"]
description = "Dotprompt is a language-neutral executable prompt template file format for Generative AI."
license = { text = "Apache-2.0" }
name = "dotprompt"
Expand Down
17 changes: 17 additions & 0 deletions py/packages/handlebarz/src/handlebarz/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0


def hello() -> str:
return 'Hello from handlebarz!'

0 comments on commit 1bc34d9

Please sign in to comment.