recala-cli 0.6.6__tar.gz → 0.6.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {recala_cli-0.6.6 → recala_cli-0.6.7}/CHANGELOG.md +6 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/PKG-INFO +1 -1
- {recala_cli-0.6.6 → recala_cli-0.6.7}/pyproject.toml +1 -1
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/__init__.py +1 -1
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/org.py +15 -6
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/onboarding.py +5 -1
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/views.py +2 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_core_release.py +1 -1
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_credits.py +15 -1
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_failed_scan_ends_softly.py +13 -1
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_org_describe.py +20 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_org_readable.py +1 -1
- {recala_cli-0.6.6 → recala_cli-0.6.7}/.gitignore +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/README.md +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/scripts/check-dogfood.sh +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/scripts/publish_pypi.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/scripts/release.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/__main__.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/analytics.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/article_runs.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/auth.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/client.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/__init__.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/article.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/auth.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/billing.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/bing.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/cadence.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/connect.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/credits.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/export.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/faithful_translations.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/gsc.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/index.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/keys.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/knowledge.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/languages.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/monthly_report.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/notifications.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/onboard.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/profile.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/questions.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/reads.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/refresh.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/refusals.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/schema.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/shell.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/skills.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/slot_topic.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/status.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/commands/topics.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/config.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/confirm.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/display.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/endpoints.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/errors.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/human.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/ids.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/labels.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/main.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/organizations.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/output.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/parallel.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/polling.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/prompts.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/runtime.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/search_numbers.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/skills/recala/SKILL.md +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/skills/recala/references/apply-revision-notes.md +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/skills/recala/references/article-signoff.md +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/skills/recala/references/connect-search-console.md +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/skills/recala/references/first-hand-evidence.md +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/skills/recala/references/onboard.md +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/skills/recala/references/plan-month.md +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/skills/recala/references/recala-cli-contract.md +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/skills/recala/references/schedule-approved.md +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/skills/recala/references/weekly-authority-report.md +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/stop_next_steps.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/ui.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/updates.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/conftest.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/distribution/test_public_install.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/fixtures/hold_text_json.json +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/fixtures/human_output_pass1_json.json +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/fixtures/machine_contract_main.json +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_agent_error_next_steps.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_agent_onboarding.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_analytics.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_analytics_security.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_approve_read_receipt.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_approve_reconfirm.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_article_cover.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_article_export.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_article_id_output.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_article_portal_link.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_billing_invoices.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_billing_link.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_billing_top_up.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_bing.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_blank_author.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_c2_onboarding.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_cadence.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_calendar_matches_plan.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_calendar_slots.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_cms_skip.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_company_name_in_prompts.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_confirm.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_connect_and_status.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_content_commands.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_core_errors.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_core_root.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_core_short_ids.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_core_speed.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_core_status_speed.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_declined_setup_is_not_an_error.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_dogfood_fixes.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_dogfood_status.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_edit_link_warnings.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_empty_scan_next.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_empty_scan_replay.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_errors.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_faithful_translation_settings.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_free_article_tries.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_free_company_topics_step.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_free_plan_wording.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_free_scout_refusal.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_free_topics.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_gsc.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_help_listing.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_hold_finding_sentences.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_hold_text.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_human_output_pass1.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_human_readable.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_index.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_keys.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_knowledge_admit.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_knowledge_show_ideas.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_languages.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_login.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_login_json_org.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_machine_contract.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_monthly_report.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_no_endings_say_what_is_true.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_notifications.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_onboard_defaults.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_onboard_free_plan.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_onboarding_channel.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_onboarding_commands.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_org.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_poll_pacing.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_profile.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_publish_commands.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_publish_pypi.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_questions.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_questions_in_words.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_recheck_findings.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_refresh.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_rerun_refusal.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_review_hardening.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_review_round3.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_run_progress.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_scan_reports_what_was_found.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_scene.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_scout_count.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_search_numbers.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_second_company_and_refused_details.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_short_id_selectors.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_signed_in_writes.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_skills.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_slot_topic.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_stop_next_steps.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_submit_review_state.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_times_in_company_zone.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_topics.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_topics_add.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_topics_one_call.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_ui.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_view_surface.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_whoami.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_will_retry.py +0 -0
- {recala_cli-0.6.6 → recala_cli-0.6.7}/tests/test_write_flags.py +0 -0
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.6.7
|
|
6
|
+
|
|
7
|
+
- `recala credits` says when the owner's email has already used its free article.
|
|
8
|
+
- A failed company scan names `recala company describe` as the way forward.
|
|
9
|
+
- `recala onboard` counts a saved company description as the scan step.
|
|
10
|
+
|
|
5
11
|
## 0.6.6
|
|
6
12
|
|
|
7
13
|
- `billing top-up --org <company> --quantity N`: on an eligible plan, an owner sees the quoted price for extra articles and gets a Stripe checkout link (`--dry-run` shows the quote only). Stripe shows the final amount, and the credits are added once Stripe confirms the payment.
|
|
@@ -436,6 +436,15 @@ def _end_after_a_failed_read(client: RecalaClient, scan: dict[str, Any], address
|
|
|
436
436
|
"command": command}
|
|
437
437
|
|
|
438
438
|
|
|
439
|
+
def _scan_failed_error(client: RecalaClient, reason: str | None) -> CliError:
|
|
440
|
+
"""A read that gave nothing ends with the way forward: say in your own words what the company does."""
|
|
441
|
+
command = f'recala company describe "<what the company does and who it is for>" --org {client.org_id}'
|
|
442
|
+
what = "Say in one or two sentences what the company does and who it is for; articles are written as that."
|
|
443
|
+
return CliError(ExitCode.CONFLICT, "scrape_thin", f"{empty_scan_sentence(reason)} Next: {command}",
|
|
444
|
+
details={**({"reason": reason} if reason else {}),
|
|
445
|
+
"next": {"command": command, "human_action": {"what": what, "where": "the company owner"}}})
|
|
446
|
+
|
|
447
|
+
|
|
439
448
|
def scan_website(ctx: click.Context, client: RecalaClient, *, website: str | None) -> dict[str, Any]:
|
|
440
449
|
org = (client.call(ORG_SHOW, path={"org_id": str(client.org_id)}) or {}).get("org") or {}
|
|
441
450
|
address = website or org.get("website_url")
|
|
@@ -449,8 +458,7 @@ def scan_website(ctx: click.Context, client: RecalaClient, *, website: str | Non
|
|
|
449
458
|
break
|
|
450
459
|
if not is_interactive(ctx):
|
|
451
460
|
reason = scan.get("reason")
|
|
452
|
-
raise
|
|
453
|
-
details={"reason": reason} if reason else None)
|
|
461
|
+
raise _scan_failed_error(client, reason)
|
|
454
462
|
other = _another_address(ctx)
|
|
455
463
|
if other is None:
|
|
456
464
|
return _end_after_a_failed_read(client, scan, address, org)
|
|
@@ -515,8 +523,9 @@ def describe(ctx: click.Context, org_flag: str | None, text: str) -> dict[str, A
|
|
|
515
523
|
confirm(ctx, client, "Save this as what the company does. Every article is written as it.")
|
|
516
524
|
saved: dict[str, Any] = client.call(PROFILE_POSITIONING_UPDATE, json={"who_we_are": text.strip()})
|
|
517
525
|
progress = config.onboarding_progress(str(client.org_id))
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
526
|
+
# A saved description satisfies the scan step. If a failed read left the offer to read the address again, it ends
|
|
527
|
+
# too: onboard would force the scan step and a no there stops the journey. The company now has material to seed
|
|
528
|
+
# a first topic from.
|
|
529
|
+
config.save_onboarding_progress(str(client.org_id), {**progress, "described": True, "scan_found_nothing": False,
|
|
530
|
+
"scan_failed_address": None})
|
|
522
531
|
return saved
|
|
@@ -157,7 +157,11 @@ def _scan(f: Facts) -> tuple[bool, str]:
|
|
|
157
157
|
done = bool(f.progress.get("scanned") or (f.org.get("core_description") and f.org.get("niche")))
|
|
158
158
|
if done and f.progress.get("scan_found_nothing"):
|
|
159
159
|
return True, empty_scan_sentence(f.progress.get("scan_empty_reason")).rstrip(".")
|
|
160
|
-
|
|
160
|
+
if done:
|
|
161
|
+
return True, "read and confirmed"
|
|
162
|
+
if f.progress.get("described"):
|
|
163
|
+
return True, "described by you (the site was not read)"
|
|
164
|
+
return False, ""
|
|
161
165
|
|
|
162
166
|
|
|
163
167
|
COMPANY_SIGNS_NOTE = "signed by the company (name an author later: recala author add)"
|
|
@@ -196,6 +196,8 @@ def credit_lines(summary: dict[str, Any], entitlements: dict[str, Any] | None, m
|
|
|
196
196
|
f"period ({renews} {_day(period.get('ends_at'), zone)})")
|
|
197
197
|
else:
|
|
198
198
|
lines.append(free_plan_line(float(summary.get("free_left") or 0)))
|
|
199
|
+
if summary.get("free_article_email_used") and summary.get("free_article_note"):
|
|
200
|
+
lines.append(str(summary["free_article_note"]))
|
|
199
201
|
if float(summary.get("extra_left") or 0) > 0:
|
|
200
202
|
lines.append(f"Extra articles: {_count(summary.get('extra_left'))}")
|
|
201
203
|
lines.extend(_cap_lines(entitlements, show_question_cap=show_question_cap))
|
|
@@ -12,7 +12,7 @@ PROJECT = tomllib.loads((CLI / "pyproject.toml").read_text())["project"]
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def test_the_version_is_065_in_the_package_and_in_pyproject():
|
|
15
|
-
assert __version__ == PROJECT["version"] == "0.6.
|
|
15
|
+
assert __version__ == PROJECT["version"] == "0.6.7"
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
def test_pypi_metadata_is_complete():
|
|
@@ -99,7 +99,21 @@ def test_a_free_account_names_the_pay_link_step(api, run, signed_in, summary):
|
|
|
99
99
|
assert "Recala billing" not in result.stdout
|
|
100
100
|
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
EMAIL_USED = {"plan": "free", "available": 0, "free_left": 0, "period": None, "free_article_email_used": True,
|
|
103
|
+
"free_article_note": "The free article was already used by this owner's email on another company."}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def test_a_free_article_used_by_the_owners_email_says_so_in_words_and_keeps_the_machine_field(api, run, signed_in):
|
|
107
|
+
script_billing(api, summary=EMAIL_USED, managed={"managed": False})
|
|
108
|
+
|
|
109
|
+
human = run("credits", "--org", ORG_ID)
|
|
110
|
+
machine = json.loads(run("credits", "--org", ORG_ID, "--json").stdout)
|
|
111
|
+
|
|
112
|
+
assert "already used by this owner's email on another company" in human.stdout
|
|
113
|
+
assert machine["summary"]["free_article_email_used"] is True
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def test_the_pay_link_hint_names_the_company_chosen_with_org_when_it_is_not_the_active_one_when_it_is_not_the_active_one(api, run, signed_in, isolated_config):
|
|
103
117
|
from recala_cli import config
|
|
104
118
|
config.set_active_org("11111111-1111-4111-8111-111111111111")
|
|
105
119
|
script_billing(api, summary={"plan": "free", "available": 1, "free_left": 1, "period": None}, managed={"managed": False})
|
|
@@ -151,10 +151,22 @@ def test_json_callers_keep_a_machine_readable_failure_with_the_reason_and_exit_6
|
|
|
151
151
|
|
|
152
152
|
assert result.exit_code == 6, result.stderr
|
|
153
153
|
error = error_of(result)
|
|
154
|
-
assert error["code"] == "scrape_thin" and error["details"]
|
|
154
|
+
assert error["code"] == "scrape_thin" and error["details"]["reason"] == "site_unreachable", error
|
|
155
155
|
assert saves(api) == []
|
|
156
156
|
|
|
157
157
|
|
|
158
|
+
@pytest.mark.parametrize("scan", [UNREACHABLE, FAILED])
|
|
159
|
+
def test_a_failed_scan_names_company_describe_as_the_way_forward_in_words_and_in_a_field(api, run, granted, scan):
|
|
160
|
+
failing_company(api, scan)
|
|
161
|
+
|
|
162
|
+
result = run("company", "scan", "--org", ORG_ID, "--json")
|
|
163
|
+
|
|
164
|
+
error = error_of(result)
|
|
165
|
+
assert 'recala company describe "' in error["message"], error
|
|
166
|
+
assert error["details"]["next"]["command"].startswith('recala company describe "'), error
|
|
167
|
+
assert error["details"]["next"]["human_action"]["what"], error
|
|
168
|
+
|
|
169
|
+
|
|
158
170
|
def test_company_scan_with_a_website_ends_the_same_way_in_a_terminal(api, run, granted):
|
|
159
171
|
failing_company(api, UNREACHABLE)
|
|
160
172
|
|
|
@@ -19,6 +19,26 @@ def test_the_answer_is_saved_as_who_we_are(api, run, signed_in):
|
|
|
19
19
|
assert "Next: recala article create" in result.stdout
|
|
20
20
|
|
|
21
21
|
|
|
22
|
+
def test_a_saved_description_satisfies_the_scan_step_and_onboarding_moves_on(api, run, signed_in):
|
|
23
|
+
from test_agent_onboarding import ready_facts
|
|
24
|
+
|
|
25
|
+
from recala_cli import config
|
|
26
|
+
from recala_cli.commands.onboard import _report
|
|
27
|
+
|
|
28
|
+
api.json("PATCH", POSITIONING, {"success": True, "who_we_are": ANSWER, "positioning_version": 2})
|
|
29
|
+
unscanned_org = {"id": ORG_ID, "name": "Tallow Lane Planning", "website_url": "https://tallow-lane.test"}
|
|
30
|
+
before = _report(ready_facts(org=unscanned_org, topics={}), agent=True)
|
|
31
|
+
assert before["next"]["key"] == "scan"
|
|
32
|
+
|
|
33
|
+
assert run("company", "describe", ANSWER, "--org", ORG_ID).exit_code == 0
|
|
34
|
+
|
|
35
|
+
facts = ready_facts(org=unscanned_org, topics={}, progress=config.onboarding_progress(ORG_ID))
|
|
36
|
+
report = _report(facts, agent=True)
|
|
37
|
+
scan = next(row for row in report["steps"] if row["key"] == "scan")
|
|
38
|
+
assert scan["done"] is True and "described" in scan["detail"], scan
|
|
39
|
+
assert report["next"]["key"] != "scan"
|
|
40
|
+
|
|
41
|
+
|
|
22
42
|
def test_json_is_the_apis_own_answer(api, run, signed_in):
|
|
23
43
|
body = {"success": True, "who_we_are": ANSWER, "positioning_version": 2}
|
|
24
44
|
api.json("PATCH", POSITIONING, body)
|
|
@@ -260,4 +260,4 @@ def test_every_org_option_help_describes_names_slugs_and_ids(run):
|
|
|
260
260
|
|
|
261
261
|
def test_cli_version_is_065_and_matches_package_metadata():
|
|
262
262
|
pyproject = Path(__file__).parents[1] / "pyproject.toml"
|
|
263
|
-
assert __version__ == tomllib.loads(pyproject.read_text())["project"]["version"] == "0.6.
|
|
263
|
+
assert __version__ == tomllib.loads(pyproject.read_text())["project"]["version"] == "0.6.7"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/skills/recala/references/article-signoff.md
RENAMED
|
File without changes
|
|
File without changes
|
{recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/skills/recala/references/first-hand-evidence.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/skills/recala/references/recala-cli-contract.md
RENAMED
|
File without changes
|
{recala_cli-0.6.6 → recala_cli-0.6.7}/src/recala_cli/skills/recala/references/schedule-approved.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|