Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
attributes:
value: |
感谢反馈。**安全问题**请走
[SECURITY.md](https://github.com/rootSunc/ashare-lake/security/advisories/new),
[SECURITY.md](https://github.com/rootSunc/cnequity/security/advisories/new),
不要开公开 issue。
- type: textarea
id: what
Expand All @@ -22,7 +22,7 @@ body:
label: 复现步骤
description: 尽量精简的命令/配置(打码本机路径与代理)。
placeholder: |
asl run daily --group reference --config configs/ashare-lake.toml
cne run daily --group reference --config configs/cnequity.toml
validations:
required: true
- type: input
Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
blank_issues_enabled: true
contact_links:
- name: 安全漏洞
url: https://github.com/rootSunc/ashare-lake/security/advisories/new
url: https://github.com/rootSunc/cnequity/security/advisories/new
about: 私密披露 — 请勿开公开 issue
- name: 文档与定位
url: https://rootsunc.github.io/ashare-lake/comparison/
url: https://rootsunc.github.io/cnequity/comparison/
about: 提功能前先看与 akshare / Tushare / Baostock 的差异
- name: 快速开始与 Recipes
url: https://rootsunc.github.io/ashare-lake/
url: https://rootsunc.github.io/cnequity/
about: 先用真实 demo 和可复制 Recipe 验证问题是否已经有答案
- name: 使用帮助与想法
url: https://github.com/rootSunc/ashare-lake/discussions
url: https://github.com/rootSunc/cnequity/discussions
about: 适合开放式问题、使用经验和还没有明确实现范围的想法
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/source_regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ body:
attributes:
value: |
这张表用于上游数据源回归,不要附带湖数据或代理凭据。
安全问题请走私密 [SECURITY.md](https://github.com/rootSunc/ashare-lake/security/advisories/new)。
安全问题请走私密 [SECURITY.md](https://github.com/rootSunc/cnequity/security/advisories/new)。
- type: input
id: source
attributes:
label: 源 key
description: '`asl sources --only ...` 使用的 key,例如 tdx_protocol、sina、eastmoney_push2。'
description: '`cne sources --only ...` 使用的 key,例如 tdx_protocol、sina、eastmoney_push2。'
placeholder: "sina"
validations:
required: true
Expand All @@ -32,17 +32,17 @@ body:
id: command
attributes:
label: 最小复现命令与输出
description: "请打码本地路径、代理地址、token;优先附 `asl sources --vantage <label> --only <source>` 的输出。"
description: "请打码本地路径、代理地址、token;优先附 `cne sources --vantage <label> --only <source>` 的输出。"
placeholder: |
asl sources --vantage overseas --only sina
cne sources --vantage overseas --only sina
...
validations:
required: true
- type: textarea
id: environment
attributes:
label: 环境
placeholder: "ashare-lake 0.5.0, Python 3.12, macOS / Linux / Windows, cn / overseas"
placeholder: "cnequity 0.5.0, Python 3.12, macOS / Linux / Windows, cn / overseas"
validations:
required: true
- type: checkboxes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
pip install -e . --group dev

- name: Test
run: pytest --cov=ashare_lake --cov-report=term-missing --cov-report=xml
run: pytest --cov=cnequity --cov-report=term-missing --cov-report=xml

- name: Upload coverage
if: matrix.python-version == '3.12'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ jobs:
run: twine check dist/*
- name: Smoke-test the built wheel
env:
SMOKE_ROOT: ${{ runner.temp }}/ashare-lake-wheel-smoke
SMOKE_ROOT: ${{ runner.temp }}/cnequity-wheel-smoke
run: |
python -m venv "$SMOKE_ROOT"
wheel=$(find dist -maxdepth 1 -name '*.whl' -print -quit)
test -n "$wheel"
"$SMOKE_ROOT/bin/python" -m pip install --upgrade pip
"$SMOKE_ROOT/bin/pip" install "$wheel"
"$SMOKE_ROOT/bin/asl" --version
"$SMOKE_ROOT/bin/asl" demo --help
"$SMOKE_ROOT/bin/cne" --version
"$SMOKE_ROOT/bin/cne" demo --help
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
Expand All @@ -79,7 +79,7 @@ jobs:
id-token: write
environment:
name: pypi
url: https://pypi.org/p/ashare-lake
url: https://pypi.org/p/cnequity
steps:
- name: Download distributions
uses: actions/download-artifact@v4
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/source-health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Source health
on:
schedule:
# Weekly, after the weekend, from GitHub's overseas runners. The report is
# a vantage point, not a universal SLA; mainland users should run `asl
# a vantage point, not a universal SLA; mainland users should run `cne
# sources --vantage cn` in their own scheduler as well.
- cron: "17 3 * * 1"
workflow_dispatch:
Expand Down Expand Up @@ -33,23 +33,23 @@ jobs:
pip install .
- name: Probe public sources
env:
HEALTH_ROOT: ${{ runner.temp }}/ashare-lake-health
HEALTH_ROOT: ${{ runner.temp }}/cnequity-health
run: |
set -o pipefail
mkdir -p "$HEALTH_ROOT"
asl config init \
--config "$HEALTH_ROOT/ashare-lake.toml" \
cne config init \
--config "$HEALTH_ROOT/cnequity.toml" \
--data-root "$HEALTH_ROOT/data"
asl sources \
--config "$HEALTH_ROOT/ashare-lake.toml" \
cne sources \
--config "$HEALTH_ROOT/cnequity.toml" \
--vantage github-actions \
--only tdx_protocol,sina,eastmoney_push2,eastmoney_push2his,cninfo \
--out "$HEALTH_ROOT/source-health.json" \
| tee "$HEALTH_ROOT/source-health.txt"
- name: Add report to job summary
if: always()
env:
HEALTH_ROOT: ${{ runner.temp }}/ashare-lake-health
HEALTH_ROOT: ${{ runner.temp }}/cnequity-health
run: |
if [ -f "$HEALTH_ROOT/source-health.txt" ]; then
{
Expand All @@ -70,7 +70,7 @@ jobs:
with:
name: source-health-${{ github.run_id }}
path: |
${{ runner.temp }}/ashare-lake-health/source-health.json
${{ runner.temp }}/ashare-lake-health/source-health.txt
${{ runner.temp }}/cnequity-health/source-health.json
${{ runner.temp }}/cnequity-health/source-health.txt
if-no-files-found: warn
retention-days: 30
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ env/
# Secrets & local config
.env
configs/*.local.toml
configs/ashare-lake.toml
configs/ashare-lake.demo.toml
configs/cnequity.toml
configs/cnequity.demo.toml

# Data lake artifacts (never commit generated data)
data/
Expand Down
59 changes: 36 additions & 23 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ the project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

## [0.7.0] — 2026-08-15

### Changed

- **Renamed the project from `ashare-lake` to `CNEquity`.** The old name
collided with established projects in the same space (mpquant/Ashare,
AKShare) and did not surface in searches for "A股 数据湖". Package:
`pip install cnequity` (`ashare-lake` on PyPI will no longer be updated).
CLI: `cne` (was `asl`). Import: `from cnequity...` (was `from
ashare_lake...`). Config/data defaults: `cnequity.toml`, `data/cnequity/`
(was `ashare-lake.toml`, `data/ashare-lake/`) — existing local configs and
data directories are not renamed automatically.

## [0.6.0] — 2026-08-10

### Fixed
Expand Down Expand Up @@ -140,7 +153,7 @@ the project adheres to [Semantic Versioning](https://semver.org/).
[Apache-2.0](LICENSE); third-party notices (including vendored tdxpy, still
MIT) live in [NOTICE](NOTICE). Landed market data remains outside the
software license — see [legal](docs/legal-and-data-sources.md).
- **README hero rebranded to ASL · ashare-lake.** Shorter pitch, survivorship
- **README hero rebranded to ASL · cnequity.** Shorter pitch, survivorship
chart and demo up front; cropped serve scorecard and architecture diagram in
their own sections. No upgrade step for existing lakes.
- **`asl servers test` and `asl push2his` are off the top-level command list.**
Expand Down Expand Up @@ -179,7 +192,7 @@ the project adheres to [Semantic Versioning](https://semver.org/).
official `mcp` SDK, which resolves to 15 additional packages — cryptography,
pyjwt and truststore for an OAuth flow a local server never performs,
opentelemetry for tracing nothing exports, and a second HTTP stack beside the
pinned httpx. `pip install ashare-lake` with no extras stays intact.
pinned httpx. `pip install cnequity` with no extras stays intact.

- **`asl init --profile quick` / `--since`** — a first backfill that is
*shallower, never narrower*. `quick` fetches the last three calendar years for
Expand Down Expand Up @@ -314,8 +327,8 @@ the project adheres to [Semantic Versioning](https://semver.org/).
or liquidity factors:

```bash
scripts/migrate_daily_bars_volume_v2.py --config configs/ashare-lake.toml --dry-run
scripts/migrate_daily_bars_volume_v2.py --config configs/ashare-lake.toml --apply
scripts/migrate_daily_bars_volume_v2.py --config configs/cnequity.toml --dry-run
scripts/migrate_daily_bars_volume_v2.py --config configs/cnequity.toml --apply
```

Back up curated first; the script is idempotent and does not restamp
Expand Down Expand Up @@ -433,7 +446,7 @@ the project adheres to [Semantic Versioning](https://semver.org/).
- **`daily_bars.volume` mixed 股 and 手, off by exactly 100×.** Only `ths` and
`baostock` already wrote 股; `tdx_protocol` passed 手 through and Sina
divided by 100. Every adapter now normalizes to 股 at its boundary
(`ashare_lake.domain.units`).
(`cnequity.domain.units`).

- **No-trade bars stored a denormal turnover instead of zero.** TDX's packed-
float decoder maps raw zero to `2**-127`; fixed at
Expand Down Expand Up @@ -475,14 +488,14 @@ the project adheres to [Semantic Versioning](https://semver.org/).
### Fixed

- `asl config init` always writes an **absolute** `data.root` (resolving the
template's `./data/ashare-lake` against the current working directory) so
template's `./data/cnequity` against the current working directory) so
`asl doctor` is green on the default first-run path.
- Default `[on_demand].datasets` is only `stock_news` and `research_reports`.
`announcement_body` / `financial_reports` raise `NotImplementedError` instead
of caching empty placeholder JSON. Failed research_reports fetches are not
cached either.
- ImportError hints for baostock / pandas no longer recommend removed extras
(`[valuation]` / `[structure]`); they point at reinstalling `ashare-lake`.
(`[valuation]` / `[structure]`); they point at reinstalling `cnequity`.

## [0.3.0] — 2026-07-29

Expand All @@ -503,7 +516,7 @@ environment has none of this.

### Changed

- `pip install ashare-lake` is the whole install. Every runtime source — AkShare,
- `pip install cnequity` is the whole install. Every runtime source — AkShare,
Baostock, SnowNLP, and the pandas/openpyxl/xlrd trio that parses the Shenwan
and CNI constituent spreadsheets — is a hard dependency, so no daily or
backfill step can silently lose a source because an extra was forgotten. Costs
Expand All @@ -524,7 +537,7 @@ environment has none of this.

- Native Windows 10/11 (64-bit) support: cross-platform file locks replace
Unix-only `fcntl.flock` in run locks, watermark writes, rate limiting, and
staging cleanup (`ashare_lake.file_lock`).
staging cleanup (`cnequity.file_lock`).
- CI `windows-latest` job running the offline unit suite.
- `asl config init` defaults `workers = 1` on Windows (same as macOS); raising
workers later is allowed — Windows uses spawn, not the unsafe macOS fork path.
Expand Down Expand Up @@ -568,7 +581,7 @@ environment has none of this.
- `asl config init --data-root` no longer strips escaped backslashes when the
path is a Windows `C:\…` form (callable `re.sub` replacement).
- `asl demo` writes a TOML-safe `data.root` (escaped POSIX path) so follow-up
`asl query --config configs/ashare-lake.demo.toml` works on Windows.
`asl query --config configs/cnequity.demo.toml` works on Windows.
- `asl doctor` probes writability with a real create/delete (not `os.access`) and
suggests an ACL fix on Windows instead of `chmod`.
- EastMoney sticky IP / CLI sticky reads always use UTF-8.
Expand All @@ -589,7 +602,7 @@ environment has none of this.
### Removed

- All extras (`tdx`, `macro`, `nlp`, `valuation`, `structure`, `all`).
`pip install "ashare-lake[tdx]"` from an older doc still installs correctly:
`pip install "cnequity[tdx]"` from an older doc still installs correctly:
pip warns that the extra is not provided and continues, uv says nothing.
- Contributor tooling moved from the `dev` extra to a PEP 735 dependency group:
`pip install -e . --group dev` (pip >= 25.1) or `uv sync`.
Expand All @@ -600,8 +613,8 @@ environment has none of this.

- `asl config init` writes the packaged example TOML (no repo checkout needed);
forces `orchestrator.workers = 1` on macOS
- Packaged template at `ashare_lake.config.templates` (kept in sync with
`configs/ashare-lake.example.toml`)
- Packaged template at `cnequity.config.templates` (kept in sync with
`configs/cnequity.example.toml`)

### Fixed

Expand All @@ -610,7 +623,7 @@ environment has none of this.

### Changed

- Document `pip install "ashare-lake[tdx]"` as the primary install path
- Document `pip install "cnequity[tdx]"` as the primary install path
- `pyproject.toml` `readme` points at `README.pypi.md` instead of `README.md`
- Getting-started docs use `asl config init` instead of `git clone` + `cp`;
quickstart separates one-minute demo from full-market init
Expand Down Expand Up @@ -639,12 +652,12 @@ First public release of the self-hosted A-share Parquet data layer.

- Ignore runtime logs and local tool/editor dirs
- TLS verify on by default for HTTP clients
- Project URLs point at `rootSunc/ashare-lake`

[0.6.0]: https://github.com/rootSunc/ashare-lake/releases/tag/v0.6.0
[0.5.0]: https://github.com/rootSunc/ashare-lake/releases/tag/v0.5.0
[0.4.0]: https://github.com/rootSunc/ashare-lake/releases/tag/v0.4.0
[0.3.1]: https://github.com/rootSunc/ashare-lake/releases/tag/v0.3.1
[0.3.0]: https://github.com/rootSunc/ashare-lake/releases/tag/v0.3.0
[0.2.0]: https://github.com/rootSunc/ashare-lake/releases/tag/v0.2.0
[0.1.0]: https://github.com/rootSunc/ashare-lake/releases/tag/v0.1.0
- Project URLs point at `rootSunc/cnequity`

[0.6.0]: https://github.com/rootSunc/cnequity/releases/tag/v0.6.0
[0.5.0]: https://github.com/rootSunc/cnequity/releases/tag/v0.5.0
[0.4.0]: https://github.com/rootSunc/cnequity/releases/tag/v0.4.0
[0.3.1]: https://github.com/rootSunc/cnequity/releases/tag/v0.3.1
[0.3.0]: https://github.com/rootSunc/cnequity/releases/tag/v0.3.0
[0.2.0]: https://github.com/rootSunc/cnequity/releases/tag/v0.2.0
[0.1.0]: https://github.com/rootSunc/cnequity/releases/tag/v0.1.0
14 changes: 7 additions & 7 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
cff-version: 1.2.0
message: "If ashare-lake supports your research or data work, please cite this repository."
message: "If CNEquity supports your research or data work, please cite this repository."
type: software
title: "ashare-lake"
title: "CNEquity"
abstract: >-
A free, self-hosted historical data layer for A-shares with multi-source
ingestion, provenance, adjustment semantics, point-in-time fundamentals,
and reproducible Parquet storage.
version: 0.6.0
date-released: 2026-08-10
version: 0.7.0
date-released: 2026-08-15
authors:
- name: "ashare-lake Contributors"
- name: "CNEquity Contributors"
license: Apache-2.0
repository-code: "https://github.com/rootSunc/ashare-lake"
url: "https://rootsunc.github.io/ashare-lake/"
repository-code: "https://github.com/rootSunc/cnequity"
url: "https://rootsunc.github.io/cnequity/"
keywords:
- A-shares
- financial data
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 贡献指南

**只用数据的用户**:`pip install ashare-lake` → 见 [快速开始](docs/getting-started/quickstart.md)。
**只用数据的用户**:`pip install cnequity` → 见 [快速开始](docs/getting-started/quickstart.md)。
本文面向向仓库提交代码的贡献者。

安全问题请走 [SECURITY.md](SECURITY.md),不要开公开 issue。
Expand All @@ -15,7 +15,7 @@
- 为现有数据集补一条离线 recipe、查询示例或字段说明
- 给已有 adapter 增加 schema 边界测试和清晰的源限制说明
- 修复中英文文档、CLI help 与实际默认值之间的漂移
- 改进 `asl demo`、`asl status` 或 dashboard 的错误提示
- 改进 `cne demo`、`cne status` 或 dashboard 的错误提示

数据源接入需要同时提交来源、保留期、限流和合规说明;请不要把真实数据文件提交到仓库。
较大的方向可以先在 issue / discussion 中确认范围。
Expand All @@ -30,7 +30,7 @@ pip install -e . --group dev
# 见 docs/getting-started/installation.md
```

请勿提交 `configs/ashare-lake.toml`、`data/`、`logs/`。
请勿提交 `configs/cnequity.toml`、`data/`、`logs/`。

```bash
ruff format .
Expand All @@ -42,7 +42,7 @@ pytest tests/integration

## 约定

- 代码在 `src/ashare_lake/`,按职责拆分(`domain`、`adapters`、`orchestrator`、
- 代码在 `src/cnequity/`,按职责拆分(`domain`、`adapters`、`orchestrator`、
`steps`、`storage`、`derive`、`quality`、`query`、`config`、`cli`)。
- Step 按 L0–L8 分层放在 `steps/`;新模块需在 `steps/__init__.py` 中 import 以注册。
- 新数据集:在 `domain/schemas.py` 声明 schema + 主键、分区键,以及溯源列
Expand Down
6 changes: 3 additions & 3 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ashare-lake
Copyright 2026 ashare-lake Contributors
CNEquity
Copyright 2026 CNEquity Contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -16,4 +16,4 @@ limitations under the License.
---------------------------------------------------------------------------
This product includes software derived from tdxpy 0.2.7
(https://github.com/mootdx/tdxpy), licensed under the MIT License.
See src/ashare_lake/adapters/tdx_protocol/_wire/LICENSE.tdxpy.
See src/cnequity/adapters/tdx_protocol/_wire/LICENSE.tdxpy.
Loading
Loading