Skip to content

Commit e02505d

Browse files
authored
Merge pull request #1067 from honzajavorek/honzajavorek/actor-spelling
fix(academy): capitalize 'actors' and 'actor'
2 parents 3a003a2 + 9eecadf commit e02505d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+472
-460
lines changed

.github/styles/Apify/Capitalization.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@ message: "The word '%s' should always be capitalized."
33
ignorecase: false
44
level: error
55
tokens:
6-
- '(?<!\W)\bactor\b'
7-
- '(?<!\W)\bactors\b'
6+
# Before the word there should be no: /, -, #, word character
7+
# (avoids anchors, URLs, identifiers, and words like 'factors')
8+
#
9+
# After the word there should be no: /, } (avoids paths or URLs)
10+
# Also no . followed by a word character (avoids 'actors.md')
11+
- '(?<![\/\-#\w])actors(?![\/\}])(?!\.\w)'
12+
13+
# Before the word there should be no: /, -, #, ., word character
14+
# (avoids anchors, URLs, identifiers, code, and words like 'factors')
15+
#
16+
# After the word there should be no: /, }, -, word character (avoids paths or URLs)
17+
# Also no " =" (avoids code like "actor = ...")
18+
# Also no . followed by a word character (avoids 'actor.md' or 'actor.update()')
19+
- '(?<![\/\-#\.\w`])actor(?![\/\}\-\w])(?! =)(?!\.\w)'
820
nonword: false

sources/academy/glossary/tools/apify_cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ slug: /tools/apify-cli
1111

1212
---
1313

14-
The [Apify CLI](/cli) helps you create, develop, build and run Apify actors, and manage the Apify cloud platform from any computer. It can be used to automatically generate the boilerplate for different types of projects, initialize projects, remotely call actors on the platform, and run your own projects.
14+
The [Apify CLI](/cli) helps you create, develop, build and run Apify Actors, and manage the Apify cloud platform from any computer. It can be used to automatically generate the boilerplate for different types of projects, initialize projects, remotely call Actors on the platform, and run your own projects.
1515

1616
## Installing {#installing}
1717

sources/academy/platform/apify_platform.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ slug: /apify-platform
1212

1313
---
1414

15-
The [Apify platform](https://apify.com) was built to serve large-scale and high-performance web scraping and automation needs. It provides easy access to compute instances ([actors](./getting_started/actors.md)), convenient request and result storages, proxies, scheduling, webhooks and more - all accessible through the **Console** web interface, [Apify's API](/api/v2), or our [JavaScript](/api/client/js) and [Python](/api/client/python) API clients.
15+
The [Apify platform](https://apify.com) was built to serve large-scale and high-performance web scraping and automation needs. It provides easy access to compute instances ([Actors](./getting_started/actors.md)), convenient request and result storages, proxies, scheduling, webhooks and more - all accessible through the **Console** web interface, [Apify's API](/api/v2), or our [JavaScript](/api/client/js) and [Python](/api/client/python) API clients.
1616

1717
## Category outline {#this-category}
1818

19-
In this category, you'll learn how to become an Apify platform developer from the ground up. From creating your first account, to developing actors, this is your one-stop-shop for understanding how the platform works, and how to work with it.
19+
In this category, you'll learn how to become an Apify platform developer from the ground up. From creating your first account, to developing Actors, this is your one-stop-shop for understanding how the platform works, and how to work with it.
2020

2121
## First up {#first}
2222

sources/academy/platform/deploying_your_code/deploying.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
---
22
title: Deploying
3-
description: Push local code to the platform, or create a new actor on the console and integrate it with a Git repo to optionally automatically rebuild any new changes.
3+
description: Push local code to the platform, or create a new Actor on the console and integrate it with a Git repo to optionally automatically rebuild any new changes.
44
sidebar_position: 5
55
slug: /deploying-your-code/deploying
66
---
77

88
# Deploying {#deploying}
99

10-
**Push local code to the platform, or create a new actor on the console and integrate it with a Git repo to optionally automatically rebuild any new changes.**
10+
**Push local code to the platform, or create a new Actor on the console and integrate it with a Git repo to optionally automatically rebuild any new changes.**
1111

1212
---
1313

14-
Once you've **actorified** your code, there are two ways to deploy it to the Apify platform. You can either push the code directly from your local machine onto the platform, or you can create a blank actor in the web interface, and then integrate its source code with a GitHub repository.
14+
Once you've **actorified** your code, there are two ways to deploy it to the Apify platform. You can either push the code directly from your local machine onto the platform, or you can create a blank Actor in the web interface, and then integrate its source code with a GitHub repository.
1515

1616
## With a Git repository {#with-git-repository}
1717

1818
Before we deploy our project onto the Apify platform, let's ensure that we've pushed the changes we made in the last 3 lessons into our remote GitHub repository.
1919

20-
> The benefit of using this method is that any time you push to the Git repo, the code on the platform is also updated and the actor is automatically rebuilt. Also, you don't have to use a GitHub repository - you can use GitLab or any other service you'd like.
20+
> The benefit of using this method is that any time you push to the Git repo, the code on the platform is also updated and the Actor is automatically rebuilt. Also, you don't have to use a GitHub repository - you can use GitLab or any other service you'd like.
2121
22-
### Creating the actor
22+
### Creating the Actor
2323

24-
Before anything can be integrated, we've gotta create a new actor. Luckily, this is super easy to do. Let's head over to our [Apify Console](https://console.apify.com?asrc=developers_portal) and click on the **New** button, then select the **Empty** template.
24+
Before anything can be integrated, we've gotta create a new Actor. Luckily, this is super easy to do. Let's head over to our [Apify Console](https://console.apify.com?asrc=developers_portal) and click on the **New** button, then select the **Empty** template.
2525

2626
![Create new button](../getting_started/images/create-new-actor.png)
2727

2828
Easy peasy!
2929

3030
### Changing source code location {#change-source-code}
3131

32-
In the **Source** tab on the new actor's page, we'll click the dropdown menu under **Source code** and select **Git repository**. By default, this is set to **Web IDE**.
32+
In the **Source** tab on the new Actor's page, we'll click the dropdown menu under **Source code** and select **Git repository**. By default, this is set to **Web IDE**.
3333

3434
![Select source code location](../expert_scraping_with_apify/images/select-source-location.png)
3535

3636
Now we'll paste the link to our GitHub repository into the **Git URL** text field and click **Save**.
3737

3838
### Adding the webhook to the repository {#adding-repo-webhook}
3939

40-
The final step is to click on **API** in the top right corner of our actor's page:
40+
The final step is to click on **API** in the top right corner of our Actor's page:
4141

4242
![API button](../expert_scraping_with_apify/images/api-button.jpg)
4343

@@ -55,15 +55,15 @@ If you're logged in to the Apify CLI, the `apify push` command can be used to pu
5555

5656
One important thing to note is that you can use a `.gitignore` file to exclude files from being pushed. When you use `apify push` without a `.gitignore`, the full folder contents will be pushed, meaning that even the **storage** and **node_modules** will be pushed. These files are unnecessary to push, as they are both generated on the platform.
5757

58-
> The `apify push` command should only really be used for quickly pushing and testing actors on the platform during development. If you are ready to make your actor public, use a Git repository instead, as you will reap the benefits of using Git and others will be able to contribute to the project.
58+
> The `apify push` command should only really be used for quickly pushing and testing Actors on the platform during development. If you are ready to make your Actor public, use a Git repository instead, as you will reap the benefits of using Git and others will be able to contribute to the project.
5959
6060
## Deployed! {#deployed}
6161

62-
Great! Once you've pushed your actor to the platform, you should see it in the list of actors under the **Actors** tab. If you used `apify push`, you'll have access to the **multifile editor** (discussed [here](../getting_started/creating_actors.md)).
62+
Great! Once you've pushed your Actor to the platform, you should see it in the list of Actors under the **Actors** tab. If you used `apify push`, you'll have access to the **multifile editor** (discussed [here](../getting_started/creating_actors.md)).
6363

64-
![Deployed actor on the Apify platform](./images/actor-page.jpg)
64+
![Deployed Actor on the Apify platform](./images/actor-page.jpg)
6565

66-
The next step is to test your actor and experiment with the vast amount of features the platform has to offer.
66+
The next step is to test your Actor and experiment with the vast amount of features the platform has to offer.
6767

6868
## Wrap up {#next}
6969

sources/academy/platform/deploying_your_code/docker_file.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ import TabItem from '@theme/TabItem';
1414

1515
---
1616

17-
The **Dockerfile** is a file which gives the Apify platform (or Docker, more specifically) instructions on how to create an environment for your code to run in. Every actor must have a Dockerfile, as actors run in Docker containers.
17+
The **Dockerfile** is a file which gives the Apify platform (or Docker, more specifically) instructions on how to create an environment for your code to run in. Every Actor must have a Dockerfile, as Actors run in Docker containers.
1818

19-
> Actors on the platform are always run in Docker containers; however, they can also be run in local Docker containers. This is not common practice though, as it requires more setup and a deeper understanding of Docker. For testing, it's best to just run the actor on the local OS (this requires you to have the underlying runtime installed, such as Node.js, Python, Rust, GO, etc).
19+
> Actors on the platform are always run in Docker containers; however, they can also be run in local Docker containers. This is not common practice though, as it requires more setup and a deeper understanding of Docker. For testing, it's best to just run the Actor on the local OS (this requires you to have the underlying runtime installed, such as Node.js, Python, Rust, GO, etc).
2020
2121
## Base images {#base-images}
2222

23-
If your project doesn’t already contain a Dockerfile, don’t worry! Apify offers [many base images](/sdk/js/docs/guides/docker-images) that are optimized for building and running actors on the platform, which can be found [here](https://hub.docker.com/u/apify). When using a language for which Apify doesn't provide a base image, [Docker Hub](https://hub.docker.com/) provides a ton of free Docker images for most use-cases, upon which you can create your own images.
23+
If your project doesn’t already contain a Dockerfile, don’t worry! Apify offers [many base images](/sdk/js/docs/guides/docker-images) that are optimized for building and running Actors on the platform, which can be found [here](https://hub.docker.com/u/apify). When using a language for which Apify doesn't provide a base image, [Docker Hub](https://hub.docker.com/) provides a ton of free Docker images for most use-cases, upon which you can create your own images.
2424

2525
> Tip: You can see all of Apify's Docker images [on DockerHub](https://hub.docker.com/r/apify/).
2626
@@ -38,9 +38,9 @@ FROM apify/actor-node:16
3838

3939
The rest of the Dockerfile is about copying the source code from the local filesystem into the container's filesystem, installing libraries, and setting the `RUN` command (which falls back to the parent image).
4040

41-
> If you are not using a base image from Apify, then you should specify how to launch the source code of your actor with the `CMD` instruction.
41+
> If you are not using a base image from Apify, then you should specify how to launch the source code of your Actor with the `CMD` instruction.
4242
43-
Here's the Dockerfile for our Node.js example project's actor:
43+
Here's the Dockerfile for our Node.js example project's Actor:
4444

4545
<Tabs groupId="main">
4646
<TabItem value="Node.js Dockerfile" label="Node.js Dockerfile">
@@ -78,7 +78,7 @@ COPY . ./
7878
# You can also use any other image from Docker Hub.
7979
FROM apify/actor-python:3.9
8080

81-
# Second, copy just requirements.txt into the actor image,
81+
# Second, copy just requirements.txt into the Actor image,
8282
# since it should be the only file that affects "pip install" in the next step,
8383
# in order to speed up the build
8484
COPY requirements.txt ./
@@ -100,7 +100,7 @@ RUN echo "Python version:" \
100100
# for most source file changes.
101101
COPY . ./
102102

103-
# Specify how to launch the source code of your actor.
103+
# Specify how to launch the source code of your Actor.
104104
# By default, the main.py file is run
105105
CMD python3 main.py
106106

@@ -111,10 +111,10 @@ CMD python3 main.py
111111

112112
## Examples {#examples}
113113

114-
The examples we just showed were for Node.js and Python, however, to drive home the fact that actors can be written in any language, here are some examples of some Dockerfiles for actors written in different programming languages:
114+
The examples we just showed were for Node.js and Python, however, to drive home the fact that Actors can be written in any language, here are some examples of some Dockerfiles for Actors written in different programming languages:
115115

116116
<Tabs groupId="main">
117-
<TabItem value="GO actor Dockerfile" label="GO actor Dockerfile">
117+
<TabItem value="GO Actor Dockerfile" label="GO Actor Dockerfile">
118118

119119
```Dockerfile
120120
FROM golang:1.17.1-alpine
@@ -130,7 +130,7 @@ CMD ["/example-actor"]
130130
```
131131

132132
</TabItem>
133-
<TabItem value="Rust actor Dockerfile" label="Rust actor Dockerfile">
133+
<TabItem value="Rust Actor Dockerfile" label="Rust Actor Dockerfile">
134134

135135
```Dockerfile
136136
# Image with prebuilt Rust. We use the newest 1.* version
@@ -163,7 +163,7 @@ CMD ["./target/release/actor-example"]
163163
```
164164

165165
</TabItem>
166-
<TabItem value="Julia actor Dockerfile" label="Julia actor Dockerfile">
166+
<TabItem value="Julia Actor Dockerfile" label="Julia Actor Dockerfile">
167167

168168
```Dockerfile
169169
FROM julia:1.7.1-alpine
@@ -182,4 +182,4 @@ CMD ["julia", "main.jl"]
182182

183183
## Next up {#next}
184184

185-
In the [next lesson](./deploying.md), we'll push our code directly to the Apify platform, or create and integrate a new actor on the Apify platform with our project's GitHub repository.
185+
In the [next lesson](./deploying.md), we'll push our code directly to the Apify platform, or create and integrate a new Actor on the Apify platform with our project's GitHub repository.

sources/academy/platform/deploying_your_code/index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Deploying your code
3-
description: In this course learn how to take an existing project of yours and deploy it to the Apify platform as an actor in just a few minutes!
3+
description: In this course learn how to take an existing project of yours and deploy it to the Apify platform as an Actor in just a few minutes!
44
sidebar_position: 9
55
category: apify platform
66
slug: /deploying-your-code
@@ -11,29 +11,29 @@ import TabItem from '@theme/TabItem';
1111

1212
# Deploying your code to Apify {#deploying}
1313

14-
**In this course learn how to take an existing project of yours and deploy it to the Apify platform as an actor in just a few minutes!**
14+
**In this course learn how to take an existing project of yours and deploy it to the Apify platform as an Actor in just a few minutes!**
1515

1616
---
1717

18-
This section will discuss how to use your newfound knowledge of the Apify platform and actors from the [**Getting started**](../getting_started/index.md) section to deploy your existing project's code to the Apify platform as an actor.
18+
This section will discuss how to use your newfound knowledge of the Apify platform and Actors from the [**Getting started**](../getting_started/index.md) section to deploy your existing project's code to the Apify platform as an Actor.
1919

20-
Because actors are basically just chunks of code running in Docker containers, you're able to **_Actorify_** just about anything!
20+
Because Actors are basically just chunks of code running in Docker containers, you're able to **_Actorify_** just about anything!
2121

2222
![The deployment workflow](../../images/deployment-workflow.png)
2323

2424
Actors are language agnostic, which means that the language your project is written in does not affect your ability to actorify it.
2525

2626
![Supported languages](../../images/supported-languages.jpg)
2727

28-
Though the majority of actors currently on the platform were written in Node.js, and despite the fact our current preferred languages are JavaScript and Python, there are a few examples of actors in other languages:
28+
Though the majority of Actors currently on the platform were written in Node.js, and despite the fact our current preferred languages are JavaScript and Python, there are a few examples of Actors in other languages:
2929

3030
- [Actor written in Rust](https://apify.com/lukaskrivka/rust-actor-example)
31-
- [GO actor](https://apify.com/jirimoravcik/go-actor-example)
31+
- [GO Actor](https://apify.com/jirimoravcik/go-actor-example)
3232
- [Actor written with Julia](https://apify.com/jirimoravcik/julia-actor-example)
3333

3434
## The "actorification" workflow {#workflow}
3535

36-
There are four main steps to turning a piece of code into an actor:
36+
Follow these four main steps to turn a piece of code into an Actor:
3737

3838
1. Handle [accepting inputs and writing outputs](./inputs_outputs.md).
3939
2. Create an [input schema](./input_schema.md) **(optional)**.
@@ -42,7 +42,7 @@ There are four main steps to turning a piece of code into an actor:
4242

4343
## Our example project
4444

45-
For this section, we'll be turning this example project into an actor:
45+
For this section, we'll be turning this example project into an Actor:
4646

4747
<Tabs groupId="main">
4848
<TabItem value="JavaScript" label="JavaScript">
@@ -76,8 +76,8 @@ print(add_all_numbers([1, 2, 3, 4])) # -> 10
7676

7777
> For all lessons in this section, we'll have examples for both Node.js and Python so that you can follow along in either language.
7878
79-
<!-- We've pushed this code to GitHub and are ready to turn it into an actor that takes any number of integers as input, adds them all up, then stores the solution as its output. -->
79+
<!-- We've pushed this code to GitHub and are ready to turn it into an Actor that takes any number of integers as input, adds them all up, then stores the solution as its output. -->
8080

8181
## Next up {#next}
8282

83-
[Next lesson](./inputs_outputs.md), we'll be learning how to accept input into our actor as well as deliver output.
83+
[Next lesson](./inputs_outputs.md), we'll be learning how to accept input into our Actor as well as deliver output.

0 commit comments

Comments
 (0)