Skip to content

Commit b9bfd41

Browse files
janbucharfnesveda
andauthored
chore: Fix capitalization - actor -> Actor (#257)
This was a chore indeed. A second pair of eyes would be welcome to make sure I haven't mixed something up. --------- Co-authored-by: František Nesveda <[email protected]>
1 parent 6204408 commit b9bfd41

22 files changed

+350
-350
lines changed

CHANGELOG.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,14 @@
152152
- added configurable socket timeout for requests to the Apify API
153153
- added `py.typed` file to signal type checkers that this package is typed
154154
- added method to update status message for a run
155-
- added option to set up webhooks for actor builds
155+
- added option to set up webhooks for Actor builds
156156
- added logger with basic debugging info
157157
- added support for `schema` parameter in `get_or_create` method for datasets and key-value stores
158158
- added support for `title` parameter in task and schedule methods
159159
- added `x-apify-workflow-key` header support
160160
- added support for `flatten` and `view` parameters in dataset items methods
161-
- added support for `origin` parameter in actor/task run methods
162-
- added clients for actor version environment variables
161+
- added support for `origin` parameter in Actor/task run methods
162+
- added clients for Actor version environment variables
163163

164164
### Fixed
165165

@@ -186,7 +186,7 @@
186186

187187
### Removed
188188

189-
- Dropped support for single-file actors
189+
- Dropped support for single-file Actors
190190

191191
### Internal changes
192192

@@ -248,11 +248,11 @@
248248
### Changed
249249

250250
- replaced `base_url` with `api_url` in the client constructor
251-
to enable easier passing of the API server url from environment variables available to actors on the Apify platform
251+
to enable easier passing of the API server url from environment variables available to Actors on the Apify platform
252252

253253
### Internal changes
254254

255-
- changed tags for actor images with this client on Docker Hub to be aligned with the Apify SDK Node.js images
255+
- changed tags for Actor images with this client on Docker Hub to be aligned with the Apify SDK Node.js images
256256
- updated the `requests` dependency to 2.26.0
257257
- updated development dependencies
258258

@@ -267,7 +267,7 @@
267267

268268
- updated development dependencies
269269
- enforced unified use of single quotes and double quotes
270-
- added repository dispatch to build actor images with this client when publishing a new version
270+
- added repository dispatch to build Actor images with this client when publishing a new version
271271

272272
## [0.0.1](../../releases/tag/v0.0.1) - 2021-05-13
273273

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ tests with HTML coverage report execute `make unit-tests-cov`.
5050

5151
## Integration tests
5252

53-
We have integration tests which build and run actors using the Python SDK on the Apify Platform. To run these tests,
53+
We have integration tests which build and run Actors using the Python SDK on the Apify Platform. To run these tests,
5454
you need to set the `APIFY_TEST_USER_API_TOKEN` environment variable to the API token of the Apify user you want to
5555
use for the tests, and then start them with `make integration-tests`.
5656

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ from apify_client import ApifyClient
2424

2525
apify_client = ApifyClient('MY-APIFY-TOKEN')
2626

27-
# Start an actor and wait for it to finish
27+
# Start an Actor and wait for it to finish
2828
actor_call = apify_client.actor('john-doe/my-cool-actor').call()
2929

30-
# Fetch results from the actor's default dataset
30+
# Fetch results from the Actor's default dataset
3131
dataset_items = apify_client.dataset(actor_call['defaultDatasetId']).list_items().items
3232
```
3333

@@ -57,7 +57,7 @@ which allows you to work with the Apify API in an asynchronous way, using the st
5757

5858
### Convenience functions and options
5959

60-
Some actions can't be performed by the API itself, such as indefinite waiting for an actor run to finish
60+
Some actions can't be performed by the API itself, such as indefinite waiting for an Actor run to finish
6161
(because of network timeouts). The client provides convenient `call()` and `wait_for_finish()` functions that do that.
6262
Key-value store records can be retrieved as objects, buffers or streams via the respective options, dataset items
6363
can be fetched as individual objects or serialized data and we plan to add better stream support and async iterators.

docs/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ apify_client = ApifyClient('MY-APIFY-TOKEN')
120120
# Collection clients do not require a parameter
121121
actor_collection_client = apify_client.actors()
122122

123-
# Create an actor with the name: my-actor
123+
# Create an Actor with the name: my-actor
124124
my_actor = actor_collection_client.create(name='my-actor')
125125

126-
# List all of your actors
126+
# List all of your Actors
127127
actor_list = actor_collection_client.list().items
128128
```
129129

@@ -220,7 +220,7 @@ The package offers an asynchronous version of the client,
220220
[`ApifyClientAsync`](/reference/class/ApifyClientAsync),
221221
which allows you to work with the Apify API in an asynchronous way, using the standard `async`/`await` syntax [offered by Python](https://docs.python.org/3/library/asyncio-task.html).
222222

223-
For example, to run an actor and asynchronously stream its log while it's running, you can use this snippet:
223+
For example, to run an Actor and asynchronously stream its log while it's running, you can use this snippet:
224224

225225
```python
226226
from apify_client import ApifyClientAsync
@@ -258,7 +258,7 @@ please refer to the official Python [documentation on logging](https://docs.pyth
258258

259259
### Convenience functions and options
260260

261-
Some actions can't be performed by the API itself, such as indefinite waiting for an actor run to finish (because of network timeouts).
261+
Some actions can't be performed by the API itself, such as indefinite waiting for an Actor run to finish (because of network timeouts).
262262
The client provides convenient [`call()`](/reference/class/ActorClient#call)
263263
and [`wait_for_finish()`](/reference/class/ActorClient#wait_for_finish) methods that do that.
264264

@@ -335,7 +335,7 @@ Instead of the parsed resource, they return a raw, context-managed
335335
which has to be consumed using the `with` keyword,
336336
and automatically gets closed once you exit the `with` block, preventing memory leaks and unclosed connections.
337337

338-
For example, to consume an actor run log in a streaming fashion, you can use this snippet:
338+
For example, to consume an Actor run log in a streaming fashion, you can use this snippet:
339339

340340
```python
341341
with apify_client.run('MY-RUN-ID').log().stream() as log_stream:

src/apify_client/client.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -134,22 +134,22 @@ def __init__(
134134
)
135135

136136
def actor(self: ApifyClient, actor_id: str) -> ActorClient:
137-
"""Retrieve the sub-client for manipulating a single actor.
137+
"""Retrieve the sub-client for manipulating a single Actor.
138138
139139
Args:
140-
actor_id (str): ID of the actor to be manipulated
140+
actor_id (str): ID of the Actor to be manipulated
141141
"""
142142
return ActorClient(resource_id=actor_id, **self._options())
143143

144144
def actors(self: ApifyClient) -> ActorCollectionClient:
145-
"""Retrieve the sub-client for manipulating actors."""
145+
"""Retrieve the sub-client for manipulating Actors."""
146146
return ActorCollectionClient(**self._options())
147147

148148
def build(self: ApifyClient, build_id: str) -> BuildClient:
149-
"""Retrieve the sub-client for manipulating a single actor build.
149+
"""Retrieve the sub-client for manipulating a single Actor build.
150150
151151
Args:
152-
build_id (str): ID of the actor build to be manipulated
152+
build_id (str): ID of the Actor build to be manipulated
153153
"""
154154
return BuildClient(resource_id=build_id, **self._options())
155155

@@ -158,15 +158,15 @@ def builds(self: ApifyClient) -> BuildCollectionClient:
158158
return BuildCollectionClient(**self._options())
159159

160160
def run(self: ApifyClient, run_id: str) -> RunClient:
161-
"""Retrieve the sub-client for manipulating a single actor run.
161+
"""Retrieve the sub-client for manipulating a single Actor run.
162162
163163
Args:
164-
run_id (str): ID of the actor run to be manipulated
164+
run_id (str): ID of the Actor run to be manipulated
165165
"""
166166
return RunClient(resource_id=run_id, **self._options())
167167

168168
def runs(self: ApifyClient) -> RunCollectionClient:
169-
"""Retrieve the sub-client for querying multiple actor runs of a user."""
169+
"""Retrieve the sub-client for querying multiple Actor runs of a user."""
170170
return RunCollectionClient(**self._options())
171171

172172
def dataset(self: ApifyClient, dataset_id: str) -> DatasetClient:
@@ -246,7 +246,7 @@ def log(self: ApifyClient, build_or_run_id: str) -> LogClient:
246246
"""Retrieve the sub-client for retrieving logs.
247247
248248
Args:
249-
build_or_run_id (str): ID of the actor build or run for which to access the log
249+
build_or_run_id (str): ID of the Actor build or run for which to access the log
250250
"""
251251
return LogClient(resource_id=build_or_run_id, **self._options())
252252

@@ -315,22 +315,22 @@ def __init__(
315315
)
316316

317317
def actor(self: ApifyClientAsync, actor_id: str) -> ActorClientAsync:
318-
"""Retrieve the sub-client for manipulating a single actor.
318+
"""Retrieve the sub-client for manipulating a single Actor.
319319
320320
Args:
321-
actor_id (str): ID of the actor to be manipulated
321+
actor_id (str): ID of the Actor to be manipulated
322322
"""
323323
return ActorClientAsync(resource_id=actor_id, **self._options())
324324

325325
def actors(self: ApifyClientAsync) -> ActorCollectionClientAsync:
326-
"""Retrieve the sub-client for manipulating actors."""
326+
"""Retrieve the sub-client for manipulating Actors."""
327327
return ActorCollectionClientAsync(**self._options())
328328

329329
def build(self: ApifyClientAsync, build_id: str) -> BuildClientAsync:
330-
"""Retrieve the sub-client for manipulating a single actor build.
330+
"""Retrieve the sub-client for manipulating a single Actor build.
331331
332332
Args:
333-
build_id (str): ID of the actor build to be manipulated
333+
build_id (str): ID of the Actor build to be manipulated
334334
"""
335335
return BuildClientAsync(resource_id=build_id, **self._options())
336336

@@ -339,15 +339,15 @@ def builds(self: ApifyClientAsync) -> BuildCollectionClientAsync:
339339
return BuildCollectionClientAsync(**self._options())
340340

341341
def run(self: ApifyClientAsync, run_id: str) -> RunClientAsync:
342-
"""Retrieve the sub-client for manipulating a single actor run.
342+
"""Retrieve the sub-client for manipulating a single Actor run.
343343
344344
Args:
345-
run_id (str): ID of the actor run to be manipulated
345+
run_id (str): ID of the Actor run to be manipulated
346346
"""
347347
return RunClientAsync(resource_id=run_id, **self._options())
348348

349349
def runs(self: ApifyClientAsync) -> RunCollectionClientAsync:
350-
"""Retrieve the sub-client for querying multiple actor runs of a user."""
350+
"""Retrieve the sub-client for querying multiple Actor runs of a user."""
351351
return RunCollectionClientAsync(**self._options())
352352

353353
def dataset(self: ApifyClientAsync, dataset_id: str) -> DatasetClientAsync:
@@ -427,7 +427,7 @@ def log(self: ApifyClientAsync, build_or_run_id: str) -> LogClientAsync:
427427
"""Retrieve the sub-client for retrieving logs.
428428
429429
Args:
430-
build_or_run_id (str): ID of the actor build or run for which to access the log
430+
build_or_run_id (str): ID of the Actor build or run for which to access the log
431431
"""
432432
return LogClientAsync(resource_id=build_or_run_id, **self._options())
433433

src/apify_client/clients/base/actor_job_base_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
@ignore_docs
2222
class ActorJobBaseClient(ResourceClient):
23-
"""Base sub-client class for actor runs and actor builds."""
23+
"""Base sub-client class for Actor runs and Actor builds."""
2424

2525
def _wait_for_finish(self: ActorJobBaseClient, wait_secs: int | None = None) -> dict | None:
2626
started_at = datetime.now(timezone.utc)
@@ -73,7 +73,7 @@ def _abort(self: ActorJobBaseClient, gracefully: bool | None = None) -> dict:
7373

7474
@ignore_docs
7575
class ActorJobBaseClientAsync(ResourceClientAsync):
76-
"""Base async sub-client class for actor runs and actor builds."""
76+
"""Base async sub-client class for Actor runs and Actor builds."""
7777

7878
async def _wait_for_finish(self: ActorJobBaseClientAsync, wait_secs: int | None = None) -> dict | None:
7979
started_at = datetime.now(timezone.utc)

0 commit comments

Comments
 (0)