agentleFS
shidengguishidenggui/easyquotation/.github/copilot-instructions.md

easyquotation

Copilot instructions5.5k starsChanged 8 months agoMITView on GitHub

easyquotation is a Python library for fetching real-time stock quotations from Chinese financial data sources (Sina, Tencent, Jisilu, Bank of China). The primary runtime dependency is requests. Formatting: black -l 79. Import sorting: isort. Two class patterns coexist: Factory entry point: easyquotation.use(source) in api.py maps source strings to classes. Stock codes: Loaded from stock_codes.conf (a JSON file with .conf extension). helpers.py manages code loading, updating from remote, and determining market prefix (sh/sz/bj).

We split this copilot-instructions.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No tests exist for Jsl, Boc, or Tencent

    line 44

≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Project Guidelines

Overview

easyquotation is a Python library for fetching real-time stock quotations from Chinese financial data sources (Sina, Tencent, Jisilu, Bank of China). The primary runtime dependency is requests.

Build and Test

make init              # Set up Pipenv + dev deps + pre-commit
pipenv shell           # Enter virtual environment
pytest                 # Run tests
pytest --cov           # Run tests with coverage
mypy easyquotation     # Type check (ignore_missing_imports enabled)

Formatting: black -l 79. Import sorting: isort.

Architecture

Two class patterns coexist:

  1. BaseQuotation subclasses (template method): Sina, Tencent, HKQuote, DayKline — share stock code loading, batched threaded HTTP fetching, and a common real()/market_snapshot() API. Subclasses override stock_api (URL), format_response_data() (parsing), and optionally _gen_stock_prefix(), _get_headers(), max_num.
  2. Standalone classes: Jsl and Boc have completely different interfaces (jsl.etfindex(), jsl.cb(), boc.get_exchange_rate()). They do NOT inherit from BaseQuotation and do NOT implement real() or market_snapshot().

Factory entry point: easyquotation.use(source) in api.py maps source strings to classes.

Stock codes: Loaded from stock_codes.conf (a JSON file with .conf extension). helpers.py manages code loading, updating from remote, and determining market prefix (sh/sz/bj).

Conventions

  • # coding:utf8 header on every source file (legacy convention, maintain it)
  • Sina/HKQuote use English dict keys; Tencent uses Chinese keys ("涨跌(%)", "流通市值") — be source-aware
  • Response parsing is regex-based (Sina) or split-based (Tencent) — fragile to API format changes
  • requests.Session is reused in BaseQuotation; Jsl creates ad-hoc sessions; Boc uses plain requests.get
  • Concurrency via multiprocessing.pool.ThreadPool for batched HTTP fetches

Testing

  • Framework: unittest classes run with pytest
  • Unit tests pass mock data strings directly to format_response_data(), bypassing HTTP
  • TestEasyquotation contains integration tests that hit live Sina/Tencent APIs — these fail offline
  • No tests exist for Jsl, Boc, or Tencent

Pitfalls

  • build/ directory is stale — never edit files there; authoritative source is easyquotation/
  • No HTTP timeouts or retries — requests can hang; adding timeouts changes behavior
  • Jsl __cb_url mutation — self.__cb_url.format(...) consumes the {ctime:d} placeholder on first call, breaking reuse on the same instance
  • Live API tests — network-dependent tests may fail; don't treat as code bugs
  • stock_codes.conf loaded at init — if missing/corrupt, all BaseQuotation subclasses fail at construction

Download now (ZIP)

Trending

Quiet since August.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 1 mentionSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the shidenggui/easyquotation repository that our weekly crawl found: only 2 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about shidenggui/easyquotation

The biggest 2 of 2 mentions linking to the repository that our crawl found. Each line is their own headline.

  • Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.

    Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.