Skip to content

docs: embedder-segment quick start + fix weekly-health workflow (#44)#47

Merged
karlwaldman merged 1 commit into
mainfrom
docs/embedder-quickstart
Jul 3, 2026
Merged

docs: embedder-segment quick start + fix weekly-health workflow (#44)#47
karlwaldman merged 1 commit into
mainfrom
docs/embedder-quickstart

Conversation

@karlwaldman

Copy link
Copy Markdown
Member

Closes #44.

1. README: "Beyond Oil — Gas, LNG, Carbon & Fuels"

New compact section immediately after the first quick-start example (Brent/WTI stays first). Three runnable examples using the real SDK surface:

  • client.prices.get("EU_CARBON_EUR") — EU ETS carbon spot
  • client.futures.latest("ttf-gas") — TTF futures curve via the slug helpers (lng-jkm, eua-carbon, uk-carbon also called out)
  • client.bunker_fuels.port("RTM") — VLSFO/MGO/IFO380 at a port

One sentence names the audiences: maritime compliance (EU ETS / FuelEU Maritime), fleet & logistics, LNG/European gas analytics, CBAM. Notes which spot codes work on every tier vs. futures-gated endpoints.

Details verified against the backend, not the docstrings: port codes are 3-letter (RTM, SIN, FUJ — the route constraint is /[A-Z]{3}/, so the existing docstring examples like "SINGAPORE" would 404), and the port response's prices is an array of {grade, price, unit} objects, not a keyed hash. No fabricated price values — placeholder shapes only.

2. weekly-health.yml — why it failed every run, then went silent

Evidence (run 26766667944, 2026-06-01, representative of all 10+ failures):

pytest: error: unrecognized arguments: --timeout=60
##[error]Process completed with exit code 4.

pytest-timeout wasn't installed — it was only added to the [dev] extra on 2026-06-21 (#29), after the last scheduled run. Every weekly run failed in ~25s at the integration step.

Why it went silent after Jun 1: GitHub auto-disabled the schedule — gh workflow list --all shows Weekly SDK Health Check disabled_inactivity. Re-enabled via gh workflow enable so the Monday 14:00 UTC cron resumes.

Three more latent failures it would have hit next, all fixed here:

  1. Coverage gate: pyproject.toml addopts enforce --cov-fail-under=50; a marker-filtered run (-m integration) can never meet it. Added --no-cov (same reason live-tests.yml uses it).
  2. Secret resolves empty: OILPRICEAPI_TEST_KEY exists in gh secret list but resolves to an empty string at runtime — today's live-tests run also logs OILPRICEAPI_TEST_KEY not set; skipping live tests. Added a shell-level [ -z "$OILPRICEAPI_KEY" ] guard that emits a ::warning:: and exits 0, so the job passes loudly instead of failing or silently skipping. Action for Karl: re-populate the OILPRICEAPI_TEST_KEY secret with a real key — until then the health check runs green-with-warning but exercises no live calls.
  3. Conftests never read the env var: both integration and contract conftests read OILPRICEAPI_KEY from a .env file only (dotenv_values), so even a valid secret would have tested nothing. They now fall back to os.environ. Also made the contract conftest's dotenv import optional — python-dotenv isn't a dev dependency, so contract collection crashed without it.

Verification

  • Unit suite: 303 passed, 10 skipped
  • Both exact CI commands run locally with no key: exit 0 (18 skipped / 22 skipped)
  • Workflow YAML parses (actionlint unavailable; PyYAML + manual review)

🤖 Generated with Claude Code

README: add 'Beyond Oil — Gas, LNG, Carbon & Fuels' right after the first
quick-start example — EU_CARBON_EUR spot, ttf-gas futures curve, RTM bunker
port prices — naming the maritime-compliance (EU ETS/FuelEU), fleet/logistics,
LNG/European-gas and CBAM audiences. All calls verified against the real
resource signatures (prices.get, futures.latest slug helpers,
bunker_fuels.port with 3-letter port codes per the API route constraint).

weekly-health.yml repair (failed every scheduled run through 2026-06-01,
then GitHub disabled the schedule for inactivity):
- historical failure: 'pytest: error: unrecognized arguments: --timeout=60'
  (pytest-timeout missing; since added to [dev] by #29)
- add --no-cov: marker-filtered runs can never meet the global
  --cov-fail-under=50 addopts gate (same reason live-tests.yml uses it)
- shell-level [ -z "$OILPRICEAPI_KEY" ] guard with ::warning:: — the
  OILPRICEAPI_TEST_KEY secret currently resolves EMPTY at runtime
- conftests: fall back to os.environ for OILPRICEAPI_KEY (they only read a
  .env file, so CI could never use the secret) and make the contract
  conftest's dotenv import optional (python-dotenv isn't a dev dependency,
  collection crashed without it)

Verified locally: unit suite 303 passed / 10 skipped; both exact CI commands
exit 0 with no key (18/22 skipped); workflow YAML parses.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@karlwaldman, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 39 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6d1047d9-7f39-4ddf-9803-6aaa7c5cb67e

📥 Commits

Reviewing files that changed from the base of the PR and between b699a65 and faf9437.

📒 Files selected for processing (4)
  • .github/workflows/weekly-health.yml
  • README.md
  • tests/contract/conftest.py
  • tests/integration/conftest.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/embedder-quickstart

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@karlwaldman karlwaldman merged commit d1051df into main Jul 3, 2026
6 checks passed
@karlwaldman karlwaldman deleted the docs/embedder-quickstart branch July 3, 2026 11:15
karlwaldman added a commit that referenced this pull request Jul 3, 2026
…#47)

README: add 'Beyond Oil — Gas, LNG, Carbon & Fuels' right after the first
quick-start example — EU_CARBON_EUR spot, ttf-gas futures curve, RTM bunker
port prices — naming the maritime-compliance (EU ETS/FuelEU), fleet/logistics,
LNG/European-gas and CBAM audiences. All calls verified against the real
resource signatures (prices.get, futures.latest slug helpers,
bunker_fuels.port with 3-letter port codes per the API route constraint).

weekly-health.yml repair (failed every scheduled run through 2026-06-01,
then GitHub disabled the schedule for inactivity):
- historical failure: 'pytest: error: unrecognized arguments: --timeout=60'
  (pytest-timeout missing; since added to [dev] by #29)
- add --no-cov: marker-filtered runs can never meet the global
  --cov-fail-under=50 addopts gate (same reason live-tests.yml uses it)
- shell-level [ -z "$OILPRICEAPI_KEY" ] guard with ::warning:: — the
  OILPRICEAPI_TEST_KEY secret currently resolves EMPTY at runtime
- conftests: fall back to os.environ for OILPRICEAPI_KEY (they only read a
  .env file, so CI could never use the secret) and make the contract
  conftest's dotenv import optional (python-dotenv isn't a dev dependency,
  collection crashed without it)

Verified locally: unit suite 303 passed / 10 skipped; both exact CI commands
exit 0 with no key (18/22 skipped); workflow YAML parses.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Embedder-segment quick start near top of README + fix silent weekly-health cron

1 participant