Skip to content

Commit

Permalink
fix references to token
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Oct 25, 2024
1 parent 4d278ce commit 72a295d
Show file tree
Hide file tree
Showing 23 changed files with 32 additions and 28 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
branches: main
paths:
- 'go.mod'
- 'go.sum'
- '**.py'
- '**.go'
- '**.js'
Expand All @@ -18,6 +20,8 @@ on:
- package.json
pull_request:
paths:
- 'go.mod'
- 'go.sum'
- '**.py'
- '**.go'
- '**.js'
Expand Down Expand Up @@ -65,7 +69,7 @@ jobs:
FILE=$(find ${{ matrix.test-path }} -name "*.go")
go run $FILE
env:
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
ZOO_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}

build-test-python-versions:

Expand Down Expand Up @@ -120,7 +124,7 @@ jobs:
FILE=$(find ${{ matrix.test-path }} -name "*.py")
python $FILE
env:
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
ZOO_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}

build-test-js-versions:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -180,7 +184,7 @@ jobs:
cd ${{ matrix.test-path }}
cargo run
env:
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
ZOO_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}

commit-script-outputs:
# Using the python script to commit the output of the scripts
Expand Down Expand Up @@ -254,7 +258,7 @@ jobs:
echo "all done"
env:
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
ZOO_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}


- name: stage outputs
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ endif
test: docker-image ## Test all the python files.
docker run --rm -i $(DOCKER_FLAGS) \
--name litterbox-dev \
-e KITTYCAD_API_TOKEN \
-e ZOO_API_TOKEN \
--disable-content-trust \
-v $(CURDIR):/home/user/src \
--workdir /home/user/src \
Expand All @@ -19,7 +19,7 @@ test: docker-image ## Test all the python files.
format: docker-image ## Format all the python files.
docker run --rm -i $(DOCKER_FLAGS) \
--name litterbox-dev \
-e KITTYCAD_API_TOKEN \
-e ZOO_API_TOKEN \
--disable-content-trust \
-v $(CURDIR):/home/user/src \
--workdir /home/user/src \
Expand All @@ -29,7 +29,7 @@ format: docker-image ## Format all the python files.
shell: docker-image ## Pop into a shell in the docker image.
docker run --rm -i $(DOCKER_FLAGS) \
--name litterbox-dev-shell \
-e KITTYCAD_API_TOKEN \
-e ZOO_API_TOKEN \
--disable-content-trust \
-v $(CURDIR):/home/user/src \
--workdir /home/user/src \
Expand Down
2 changes: 1 addition & 1 deletion samples/convert_file/convert_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func main() {
// Create a new client with your token parsed from the environment variable:
// KITTYCAD_API_TOKEN.
// ZOO_API_TOKEN.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion samples/convert_file/convert_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from kittycad.types import Unset

# Create a new client with your token parsed from the environment variable:
# KITTYCAD_API_TOKEN.
# ZOO_API_TOKEN.
client = ClientFromEnv(timeout=500, verify_ssl=True)

# Convert a file from OBJ to STL.
Expand Down
2 changes: 1 addition & 1 deletion samples/file_center_of_mass/file_center_of_mass.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func main() {
// Create a new client with your token parsed from the environment variable:
// KITTYCAD_API_TOKEN.
// ZOO_API_TOKEN.
client, _ := kittycad.NewClientFromEnv("your apps user agent")

fileBytes, _ := os.ReadFile("./seesaw.obj")
Expand Down
2 changes: 1 addition & 1 deletion samples/file_center_of_mass/file_center_of_mass.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from kittycad.models.unit_length import UnitLength

# Create a new client with your token parsed from the environment variable:
# KITTYCAD_API_TOKEN.
# ZOO_API_TOKEN.
client = ClientFromEnv(timeout=500, verify_ssl=True)

# Read in the contents of the file.
Expand Down
2 changes: 1 addition & 1 deletion samples/file_density/file_density.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func main() {
// Create a new client with your token parsed from the environment variable:
// KITTYCAD_API_TOKEN.
// ZOO_API_TOKEN.
client, _ := kittycad.NewClientFromEnv("your apps user agent")

fileBytes, _ := os.ReadFile("./ORIGINALVOXEL-3.obj")
Expand Down
2 changes: 1 addition & 1 deletion samples/file_density/file_density.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from kittycad.models.unit_mass import UnitMass

# Create a new client with your token parsed from the environment variable:
# KITTYCAD_API_TOKEN.
# ZOO_API_TOKEN.
client = ClientFromEnv(timeout=500, verify_ssl=True)

# Read in the contents of the file.
Expand Down
2 changes: 1 addition & 1 deletion samples/file_mass/file_mass.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func main() {
// Create a new client with your token parsed from the environment variable:
// KITTYCAD_API_TOKEN.
// ZOO_API_TOKEN.
client, _ := kittycad.NewClientFromEnv("your apps user agent")

fileBytes, _ := os.ReadFile("./ORIGINALVOXEL-3.obj")
Expand Down
2 changes: 1 addition & 1 deletion samples/file_mass/file_mass.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from kittycad.models.unit_mass import UnitMass

# Create a new client with your token parsed from the environment variable:
# KITTYCAD_API_TOKEN.
# ZOO_API_TOKEN.
client = ClientFromEnv(timeout=500, verify_ssl=True)

# Read in the contents of the file.
Expand Down
2 changes: 1 addition & 1 deletion samples/file_surface_area/file_surface_area.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func main() {
// Create a new client with your token parsed from the environment variable:
// KITTYCAD_API_TOKEN.
// ZOO_API_TOKEN.
client, _ := kittycad.NewClientFromEnv("your apps user agent")

fileBytes, _ := os.ReadFile("./ORIGINALVOXEL-3.obj")
Expand Down
2 changes: 1 addition & 1 deletion samples/file_surface_area/file_surface_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from kittycad.models.unit_area import UnitArea

# Create a new client with your token parsed from the environment variable:
# KITTYCAD_API_TOKEN.
# ZOO_API_TOKEN.
client = ClientFromEnv(timeout=500, verify_ssl=True)

# Read in the contents of the file.
Expand Down
2 changes: 1 addition & 1 deletion samples/file_volume/file_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func main() {
// Create a new client with your token parsed from the environment variable:
// KITTYCAD_API_TOKEN.
// ZOO_API_TOKEN.
client, _ := kittycad.NewClientFromEnv("your apps user agent")

fileBytes, _ := os.ReadFile("./ORIGINALVOXEL-3.obj")
Expand Down
2 changes: 1 addition & 1 deletion samples/file_volume/file_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from kittycad.models.unit_volume import UnitVolume

# Create a new client with your token parsed from the environment variable:
# KITTYCAD_API_TOKEN.
# ZOO_API_TOKEN.
client = ClientFromEnv(timeout=500, verify_ssl=True)

# Read in the contents of the file.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/beginner_tutorial/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Create a new function to convert an OBJ file to an STL file.
def convertOBJtoSTL():
# Create a new client with your token parsed from the environment variable (KITTYCAD_API_TOKEN)
# Create a new client with your token parsed from the environment variable (ZOO_API_TOKEN)
client = ClientFromEnv(timeout=500, verify_ssl=True)

# Read in the contents of the file.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/conversion_obj_step/conversion_obj_step.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func main() {
// Create a new client with your token parsed from the environment variable:
// KITTYCAD_API_TOKEN.
// ZOO_API_TOKEN.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion tutorials/conversion_obj_step/conversion_obj_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from kittycad.types import Unset

# Create a new client with your token parsed from the environment variable:
# KITTYCAD_API_TOKEN.
# ZOO_API_TOKEN.
client = ClientFromEnv(timeout=500, verify_ssl=True)

# Convert a file from OBJ to STEP.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/conversion_obj_stl/conversion_obj_stl.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func main() {
// Create a new client with your token parsed from the environment variable:
// KITTYCAD_API_TOKEN.
// ZOO_API_TOKEN.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion tutorials/conversion_obj_stl/conversion_obj_stl.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from kittycad.types import Unset

# Create a new client with your token parsed from the environment variable:
# KITTYCAD_API_TOKEN.
# ZOO_API_TOKEN.
client = ClientFromEnv(timeout=500, verify_ssl=True)

# Convert a file from OBJ to STL.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/get_mass_volume/get_mass_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func main() {
// Create a new client with your token parsed from the environment variable:
// KITTYCAD_API_TOKEN.
// ZOO_API_TOKEN.
client, _ := kittycad.NewClientFromEnv("your apps user agent")

fileBytes, _ := os.ReadFile("./ORIGINALVOXEL-3.obj")
Expand Down
2 changes: 1 addition & 1 deletion tutorials/get_mass_volume/get_mass_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from kittycad.models.unit_volume import UnitVolume

# Create a new client with your token parsed from the environment variable:
# KITTYCAD_API_TOKEN.
# ZOO_API_TOKEN.
client = ClientFromEnv(timeout=500, verify_ssl=True)

# Read in the contents of the file.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/getting_started/getting_started.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from kittycad.types import Unset

# Create a new client with your token parsed from the environment variable:
# KITTYCAD_API_TOKEN.
# ZOO_API_TOKEN.
client = ClientFromEnv(timeout=500, verify_ssl=True)

# Convert a file from OBJ to STL.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/websocket_tutorial/draw_cube_rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use uuid::Uuid;
async fn main() -> Result<()> {
// Set up the API client.
let kittycad_api_token =
env::var("KITTYCAD_API_TOKEN").context("You must set $KITTYCAD_API_TOKEN")?;
env::var("ZOO_API_TOKEN").context("You must set $ZOO_API_TOKEN")?;
let kittycad_api_client = kittycad::Client::new(kittycad_api_token);

// Where should the final PNG be saved?
Expand Down

0 comments on commit 72a295d

Please sign in to comment.