You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+35-13Lines changed: 35 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,24 @@ We use [uv](https://docs.astral.sh/uv/) for project management. Install it and s
11
11
We use [Poe the Poet](https://poethepoet.natn.io/) as a task runner, similar to npm scripts in `package.json`.
12
12
All tasks are defined in `pyproject.toml` under `[tool.poe.tasks]` and can be run with `uv run poe <task>`.
13
13
14
+
### Available tasks
15
+
16
+
| Task | Description |
17
+
| ---- | ----------- |
18
+
|`install-dev`| Install dependencies and pre-commit hooks |
19
+
|`check-code`| Run lint, type-check, and unit-tests |
20
+
|`lint`| Run linter |
21
+
|`format`| Fix lint issues and format code |
22
+
|`type-check`| Run type checker |
23
+
|`unit-tests`| Run unit tests |
24
+
|`unit-tests-cov`| Run unit tests with coverage |
25
+
|`integration-tests`| Run integration tests |
26
+
|`integration-tests-cov`| Run integration tests with coverage |
27
+
|`build-docs`| Build documentation website |
28
+
|`run-docs`| Run documentation locally |
29
+
|`build`| Build package |
30
+
|`clean`| Remove build artifacts |
31
+
14
32
## Dependencies
15
33
16
34
To install this package and its development dependencies, run:
@@ -59,8 +77,6 @@ uv run poe type-check
59
77
60
78
### Unit tests
61
79
62
-
We employ pytest as our testing framework, equipped with various plugins. Check pyproject.toml for configuration details and installed plugins.
63
-
64
80
We use [pytest](https://docs.pytest.org/) as a testing framework with many plugins. Check `pyproject.toml` for configuration details and installed plugins.
65
81
66
82
To run unit tests:
@@ -77,20 +93,26 @@ uv run poe unit-tests-cov
77
93
78
94
## Integration tests
79
95
80
-
We have integration tests which build and run Actors using the Python SDK on the Apify Platform. To run these tests,
81
-
you need to set the `APIFY_TEST_USER_API_TOKEN` environment variable to the API token of the Apify user you want to
82
-
use for the tests, and then start them with `uv run poe integration-tests`.
96
+
We have integration tests which build and run Actors using the Python SDK on the Apify platform.
97
+
98
+
Prerequisites:
83
99
84
-
If you want to run the integration tests on a different environment than the main Apify Platform, you need to set
85
-
the `APIFY_INTEGRATION_TESTS_API_URL` environment variable to the right URL to the Apify API you want to use.
100
+
- Set `APIFY_TEST_USER_API_TOKEN` to your Apify API token
101
+
- Optionally set `APIFY_INTEGRATION_TESTS_API_URL` to use a different Apify API environment
102
+
103
+
To run integration tests:
104
+
105
+
```sh
106
+
uv run poe integration-tests
107
+
```
86
108
87
109
## Documentation
88
110
89
111
We adhere to the [Google docstring format](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) for documenting our codebase. Every user-facing class or method is documented. Documentation standards are enforced using [Ruff](https://docs.astral.sh/ruff/).
90
112
91
113
Our API documentation is generated from these docstrings using [pydoc-markdown](https://pypi.org/project/pydoc-markdown/) with additional post-processing. Markdown files in the `docs/` folder complement the autogenerated content. Final documentation is rendered using [Docusaurus](https://docusaurus.io/) and published to GitHub Pages.
92
114
93
-
To run the documentation locally:
115
+
To run the documentation locally (requires Node.js):
94
116
95
117
```sh
96
118
uv run poe run-docs
@@ -118,14 +140,14 @@ name = "apify"
118
140
version = "x.z.y"
119
141
```
120
142
121
-
4.Generate the distribution archives for the package:
143
+
4.Build the package:
122
144
123
-
```shell
124
-
uv build
145
+
```sh
146
+
uv run poe build
125
147
```
126
148
127
-
5.Set up the PyPI API token for authentication and upload the package to PyPI:
Copy file name to clipboardExpand all lines: docs/02_concepts/12_pay_per_event.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ When you plan to start using the pay-per-event pricing model for an Actor that i
43
43
44
44
It is encouraged to test your monetization code on your machine before releasing it to the public. To tell your Actor that it should work in pay-per-event mode, pass it the `ACTOR_TEST_PAY_PER_EVENT` environment variable:
0 commit comments