refactor: Clean up dead code, typos, and storage-client internals#981
Closed
vdusek wants to merge 1 commit into
Closed
refactor: Clean up dead code, typos, and storage-client internals#981vdusek wants to merge 1 commit into
vdusek wants to merge 1 commit into
Conversation
Major-release cleanup: remove dead code and stale references, fix docstring/typo and packaging issues, expose the missing env vars via Actor.get_env(), and tidy storage-client internals (reuse the alias-resolver API client, drop a redundant request fetch, and skip empty push_data POSTs).
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #981 +/- ##
===========================================
- Coverage 89.90% 78.69% -11.21%
===========================================
Files 49 49
Lines 3091 3075 -16
===========================================
- Hits 2779 2420 -359
- Misses 312 655 +343
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A round of cleanup ahead of the major release.
Dead code
Removed
_was_final_persist_state_emitted,is_url(),maybe_extract_enum_member_value(),EXIT_CODE_SUCCESS, a no-opexcept Exception: raisein_crypto.py, the pre-impithpack/httpcoreScrapy loggers, and a discardedget()call in the alias resolver (plus the now-orphaned tests).Env-var enums
Added the four vars
Configurationreads butActor.get_env()was silently omitting:ACTOR_STORAGES_JSON,ACTOR_TEST_PAY_PER_EVENT,APIFY_ACTOR_PRICING_INFO,APIFY_CHARGED_ACTOR_EVENT_COUNTS.Packaging
Dropped the 8 redundant nested
py.typedfiles (the top-level one covers the whole package per PEP 561), added theTyping :: Typedclassifier, and removed the staleapify-sharedentry from[tool.uv.exclude-newer-package].Docstrings / typos
Fixed
prising→pricing,MIIGRATING→MIGRATING, the nonexistentcontent_typeincall_task, the "in seconds" ontimedelta-typedtimeoutargs, the concatenatedweb_server_portdescription, the stale "except in Pytest" claim, the stale_AliasResolverreferences, and the mkdocs cross-refs inevents/_types.py.Storage-client internals
@docs_grouptoFileSystemStorageClientand a docstring/@docs_grouptoApifyRequestQueueMetadataso both render in the API reference.AliasResolvernow reuses a cachedApifyClientAsyncper(token, api_url)instead of creating an unclosed one on every call.hash_api_base_url_and_token→hash_api_public_base_url_and_tokento match what it actually hashes.fetch_next_requestno longer re-fetches a request it already hydrated.push_data([])returns early instead of POSTing[].NotImplementedErroronpurge()(usedrop()).