Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable integration tests, unify changelog style, resolve few TODOs #114

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ filename =
./scripts/*.py,
./src/*.py,
./tests/*.py
# Todo: remove "src/apify/consts.py: F401" once consts from apify-shared are not being reexported
per-file-ignores =
docs/*: D
scripts/*: D
tests/*: D
src/apify/consts.py: F401

# Google docstring convention + D204 & D401
docstring-convention = all
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ jobs:
name: Run unit tests
uses: ./.github/workflows/unit_tests.yaml

# integration_tests:
# name: Run integration tests
# uses: ./.github/workflows/integration_tests.yaml
# secrets: inherit
integration_tests:
name: Run integration tests
uses: ./.github/workflows/integration_tests.yaml
secrets: inherit

check_docs:
name: Check whether the documentation is up to date
uses: ./.github/workflows/check_docs.yaml

publish_to_pypi:
name: Publish to PyPI
needs: [lint_and_type_checks, unit_tests, check_docs] # TODO: Add integration_tests back!
needs: [lint_and_type_checks, unit_tests, check_docs, integration_tests]
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
22 changes: 11 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
Changelog
=========

[1.1.4](../../releases/tag/v1.1.4) - Unreleased
[1.1.4](../../releases/tag/v1.1.4) - 2023-09-06
-----------------------------------------------

### Fixes
### Fixed

- resolved issue with querying request queue head multiple times in parallel

### Internal changes

- Fixed integration tests for Actor logger
- Removed `pytest-randomly` Pytest plugin

- fixed integration tests for Actor logger
- removed `pytest-randomly` Pytest plugin
- unpinned `apify-client` and `apify-shared` to improve compatibility with their newer versions

[1.1.3](../../releases/tag/v1.1.3) - 2023-08-25
-----------------------------------------------

### Internal changes

- Unify indentation in configuration files
- Update the `Actor.reboot` method to use the new reboot endpoint
- unified indentation in configuration files
- update the `Actor.reboot` method to use the new reboot endpoint

[1.1.2](../../releases/tag/v1.1.2) - 2023-08-02
-----------------------------------------------

### Internal changes

- Library `apify-shared` is used for importing general consts and utils
- Code quality improvements suggested by `flake8-simplify`
- Actor env vars are used in favor of some Apify env vars
- `apify-client` and `apify-shared` have pinned versions to prevent their implicit updates from breaking SDK
- started importing general constants and utilities from the `apify-shared` library
- simplified code via `flake8-simplify`
- started using environment variables with prefix `ACTOR_` instead of some with prefix `APIFY_`
- pinned `apify-client` and `apify-shared` to prevent their implicit updates from breaking SDK

[1.1.1](../../releases/tag/v1.1.1) - 2023-05-23
-----------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ requires-python = ">=3.8"
dependencies = [
"aiofiles >= 22.1.0",
"aioshutil >= 1.0",
"apify-client == 1.4.0",
"apify-shared == 1.0.2",
"apify-client ~= 1.4.0",
"apify-shared ~= 1.0.2",
"colorama >= 0.4.6",
"cryptography >= 39.0.0",
"httpx >= 0.24.1",
Expand Down
1 change: 0 additions & 1 deletion src/apify/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

# This metaclass is needed so you can do `async with Actor: ...` instead of `async with Actor() as a: ...`
# and have automatic `Actor.init()` and `Actor.exit()`
# TODO: decide if this mumbo jumbo is worth it or not, or if it maybe breaks something


class _ActorContextManager(type):
Expand Down
16 changes: 8 additions & 8 deletions src/apify/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
from enum import Enum
from typing import Any

from apify_shared.consts import BOOL_ENV_VARS as _BOOL_ENV_VARS
from apify_shared.consts import DATETIME_ENV_VARS as _DATETIME_ENV_VARS
from apify_shared.consts import FLOAT_ENV_VARS as _FLOAT_ENV_VARS
from apify_shared.consts import INTEGER_ENV_VARS as _INTEGER_ENV_VARS
from apify_shared.consts import STRING_ENV_VARS as _STRING_ENV_VARS
from apify_shared.consts import ActorEventTypes as _ActorEventTypes
from apify_shared.consts import ActorExitCodes as _ActorExitCodes
from apify_shared.consts import ApifyEnvVars as _ApifyEnvVars
from apify_shared.consts import BOOL_ENV_VARS as _BOOL_ENV_VARS # noqa: F401
from apify_shared.consts import DATETIME_ENV_VARS as _DATETIME_ENV_VARS # noqa: F401
from apify_shared.consts import FLOAT_ENV_VARS as _FLOAT_ENV_VARS # noqa: F401
from apify_shared.consts import INTEGER_ENV_VARS as _INTEGER_ENV_VARS # noqa: F401
from apify_shared.consts import STRING_ENV_VARS as _STRING_ENV_VARS # noqa: F401
from apify_shared.consts import ActorEventTypes as _ActorEventTypes # noqa: F401
from apify_shared.consts import ActorExitCodes as _ActorExitCodes # noqa: F401
from apify_shared.consts import ApifyEnvVars as _ApifyEnvVars # noqa: F401

DEPRECATED_NAMES = [
'BOOL_ENV_VARS',
Expand Down
1 change: 0 additions & 1 deletion tests/integration/test_request_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from .conftest import ActorFactory


# TODO: this test is flaky, and the actor often times out, figure out why and fix it
class TestRequestQueue:
async def test_simple(self, make_actor: ActorFactory) -> None:
async def main() -> None:
Expand Down