reportify-cli 0.1.2__tar.gz → 0.1.3__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.
Files changed (42) hide show
  1. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/PKG-INFO +1 -1
  2. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/pyproject.toml +1 -1
  3. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/skills/reportify-ai/SKILL.md +1 -1
  4. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/skills/reportify-ai/references/API_REFERENCE.md +8 -0
  5. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/skills/reportify-ai/references/COMMANDS.md +2 -0
  6. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/src/commands/search.py +29 -0
  7. reportify_cli-0.1.3/src/commands/user.py +92 -0
  8. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/src/params.py +20 -0
  9. reportify_cli-0.1.2/.dockerignore +0 -4
  10. reportify_cli-0.1.2/.git +0 -1
  11. reportify_cli-0.1.2/.gitlab-ci.yml +0 -104
  12. reportify_cli-0.1.2/Dockerfile +0 -10
  13. reportify_cli-0.1.2/Dockerfile.base +0 -10
  14. reportify_cli-0.1.2/Dockerfile.dev +0 -10
  15. reportify_cli-0.1.2/pip.conf +0 -10
  16. reportify_cli-0.1.2/src/commands/user.py +0 -33
  17. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/.gitignore +0 -0
  18. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/Makefile +0 -0
  19. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/README.md +0 -0
  20. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/scripts/README.md +0 -0
  21. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/scripts/bump_version.sh +0 -0
  22. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/scripts/publish.sh +0 -0
  23. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/src/__init__.py +0 -0
  24. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/src/client.py +0 -0
  25. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/src/commands/__init__.py +0 -0
  26. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/src/commands/channels.py +0 -0
  27. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/src/commands/concepts.py +0 -0
  28. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/src/commands/docs.py +0 -0
  29. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/src/commands/kb.py +0 -0
  30. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/src/commands/quant.py +0 -0
  31. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/src/commands/stock.py +0 -0
  32. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/src/commands/timeline.py +0 -0
  33. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/src/main.py +0 -0
  34. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/src/output.py +0 -0
  35. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/src/settings.py +0 -0
  36. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/src/utils.py +0 -0
  37. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/tests/__init__.py +0 -0
  38. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/tests/integration/test_docs_integration.py +0 -0
  39. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/tests/integration/test_stock_integration.py +0 -0
  40. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/tests/test_commands/__init__.py +0 -0
  41. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/tests/test_commands/test_docs.py +0 -0
  42. {reportify_cli-0.1.2 → reportify_cli-0.1.3}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reportify-cli
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: CLI wrapper for Reportify SDK - Access Reportify API through command line
5
5
  Project-URL: Homepage, https://reportify.ai
6
6
  Project-URL: Documentation, https://docs.reportify.ai
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "reportify-cli"
3
- version = "0.1.2"
3
+ version = "0.1.3"
4
4
  description = "CLI wrapper for Reportify SDK - Access Reportify API through command line"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -63,7 +63,7 @@ This approach:
63
63
  | `timeline` | Market timelines | 5 commands |
64
64
  | `channels` | Channel management | 5 commands |
65
65
  | `kb` | Knowledge base | 1 command |
66
- | `user` | User data | 1 command |
66
+ | `user` | User data | 3 commands |
67
67
  | `quant` | Quantitative analysis | 8 commands |
68
68
  | `concepts` | Concept dynamics | 2 commands |
69
69
 
@@ -109,3 +109,11 @@ Stock symbols must use `market:ticker` format:
109
109
  | `end_date` | str | | - | End date |
110
110
  | `num` | int | | 10 | Results count |
111
111
 
112
+ ---
113
+
114
+ ## User Module Parameters
115
+
116
+ ### user follow_company / unfollow_company
117
+ | Parameter | Type | Required | Default | Description |
118
+ |-----------|------|----------|---------|-------------|
119
+ | `symbol` | string | ✓ | - | Stock symbol, format: market:ticker (e.g. US:AAPL, HK:00700, SH:600519) |
@@ -81,6 +81,8 @@
81
81
  | Command | Description | Required Params |
82
82
  |---------|-------------|-----------------|
83
83
  | `followed_companies` | Get followed companies | (none) |
84
+ | `follow_company` | Follow a company (add to watchlist) | `symbol` |
85
+ | `unfollow_company` | Unfollow a company (remove from watchlist) | `symbol` |
84
86
 
85
87
  ## Quant Module
86
88
 
@@ -221,3 +221,32 @@ def webpages(
221
221
  except Exception as e:
222
222
  typer.echo(f"Error: {e}", err=True)
223
223
  raise typer.Exit(1)
224
+
225
+
226
+ @app.command(
227
+ name="crawl",
228
+ epilog=generate_epilog(
229
+ params.SEARCH_CRAWL_PARAMS,
230
+ [
231
+ 'reportify-cli search crawl --input \'{"urls": ["https://example.com"]}\'',
232
+ 'reportify-cli search crawl --input \'{"urls": ["https://example.com"], "summary": {"query": "核心观点"}}\'',
233
+ ],
234
+ ),
235
+ )
236
+ def crawl(
237
+ input: Annotated[str, typer.Option(help="JSON input parameters")] = "{}",
238
+ format: Annotated[str, typer.Option(help="Output format: json, table, csv")] = "json",
239
+ ):
240
+ """Crawl web content from given URLs"""
241
+ try:
242
+ params_dict = parse_json_input(input)
243
+ client = get_client()
244
+ urls = params_dict.pop("urls", [])
245
+ if not urls:
246
+ raise ValueError("urls is required")
247
+ result = client.search.crawl(urls, **params_dict)
248
+ format_output(result, format)
249
+ except Exception as e:
250
+ typer.echo(f"Error: {e}", err=True)
251
+ raise typer.Exit(1)
252
+
@@ -0,0 +1,92 @@
1
+ """User module commands."""
2
+
3
+ from typing import Annotated
4
+
5
+ import typer
6
+
7
+ from src import params
8
+ from src.client import get_client
9
+ from src.output import format_output
10
+ from src.utils import generate_epilog, parse_json_input
11
+
12
+ app = typer.Typer(help="User data", rich_markup_mode="rich")
13
+
14
+
15
+ @app.command(
16
+ name="followed_companies",
17
+ epilog=generate_epilog(
18
+ params.USER_FOLLOWED_COMPANIES_PARAMS, ["reportify-cli user followed_companies"]
19
+ ),
20
+ )
21
+ def followed_companies(
22
+ input: Annotated[str, typer.Option(help="JSON input parameters")] = "{}",
23
+ format: Annotated[str, typer.Option(help="Output format: json, table, csv")] = "json",
24
+ ):
25
+ """Get all followed companies"""
26
+ try:
27
+ params_dict = parse_json_input(input)
28
+ client = get_client()
29
+ result = client.user.followed_companies(**params_dict)
30
+ format_output(result, format)
31
+ except Exception as e:
32
+ typer.echo(f"Error: {e}", err=True)
33
+ raise typer.Exit(1)
34
+
35
+
36
+ @app.command(
37
+ name="follow_company",
38
+ epilog=generate_epilog(
39
+ params.USER_FOLLOW_COMPANY_PARAMS,
40
+ [
41
+ 'reportify-cli user follow_company --input \'{"symbol": "US:AAPL"}\'',
42
+ 'reportify-cli user follow_company --input \'{"symbol": "HK:00700"}\'',
43
+ 'reportify-cli user follow_company --input \'{"symbol": "SH:600519"}\'',
44
+ 'reportify-cli user follow_company --input \'{"symbol": "SZ:000001"}\'',
45
+
46
+ ],
47
+ ),
48
+ )
49
+ def follow_company(
50
+ input: Annotated[str, typer.Option(help="JSON input parameters")] = "{}",
51
+ format: Annotated[str, typer.Option(help="Output format: json, table, csv")] = "json",
52
+ ):
53
+ """Follow a company (add to watchlist)"""
54
+ try:
55
+ params_dict = parse_json_input(input)
56
+ client = get_client()
57
+ symbol = params_dict.get("symbol")
58
+ if not symbol:
59
+ raise ValueError("symbol is required")
60
+ result = client.user.follow_company(symbol)
61
+ format_output(result, format)
62
+ except Exception as e:
63
+ typer.echo(f"Error: {e}", err=True)
64
+ raise typer.Exit(1)
65
+
66
+
67
+ @app.command(
68
+ name="unfollow_company",
69
+ epilog=generate_epilog(
70
+ params.USER_UNFOLLOW_COMPANY_PARAMS,
71
+ [
72
+ 'reportify-cli user unfollow_company --input \'{"symbol": "US:AAPL"}\'',
73
+ 'reportify-cli user unfollow_company --input \'{"symbol": "HK:00700"}\'',
74
+ ],
75
+ ),
76
+ )
77
+ def unfollow_company(
78
+ input: Annotated[str, typer.Option(help="JSON input parameters")] = "{}",
79
+ format: Annotated[str, typer.Option(help="Output format: json, table, csv")] = "json",
80
+ ):
81
+ """Unfollow a company (remove from watchlist)"""
82
+ try:
83
+ params_dict = parse_json_input(input)
84
+ client = get_client()
85
+ symbol = params_dict.get("symbol")
86
+ if not symbol:
87
+ raise ValueError("symbol is required")
88
+ result = client.user.unfollow_company(symbol)
89
+ format_output(result, format)
90
+ except Exception as e:
91
+ typer.echo(f"Error: {e}", err=True)
92
+ raise typer.Exit(1)
@@ -392,6 +392,26 @@ KB_SEARCH_PARAMS = [
392
392
  # User module parameters
393
393
  USER_FOLLOWED_COMPANIES_PARAMS = []
394
394
 
395
+ USER_FOLLOW_COMPANY_PARAMS = [
396
+ ParamDef("symbol", "string", "Stock symbol, format: market:ticker, e.g. US:AAPL, HK:00700, SH:600519", required=True),
397
+ ]
398
+
399
+ USER_UNFOLLOW_COMPANY_PARAMS = [
400
+ ParamDef("symbol", "string", "Stock symbol, format: market:ticker, e.g. US:AAPL, HK:00700, SH:600519", required=True),
401
+ ]
402
+
403
+ # Search crawl parameters
404
+ SEARCH_CRAWL_PARAMS = [
405
+ ParamDef("urls", "list[str]", "List of URLs to crawl", required=True),
406
+ ParamDef("text", "bool|dict", "Extract text content (true or options dict with maxCharacters, includeHtmlTags, verbosity)", default=True),
407
+ ParamDef("highlights", "dict", "Extract highlights, e.g. {\"query\": \"key data\", \"maxCharacters\": 500, \"numSentences\": 3, \"highlightsPerUrl\": 2}"),
408
+ ParamDef("summary", "dict", "Extract summary, e.g. {\"query\": \"summarize key points\"}"),
409
+ ParamDef("subpages", "int", "Max number of subpages to crawl per URL"),
410
+ ParamDef("subpage_target", "list[str]", "Keywords to prioritize when selecting subpages"),
411
+ ParamDef("max_age_hours", "int", "Maximum age of cached content in hours"),
412
+ ParamDef("livecrawl_timeout", "int", "Timeout in ms for live crawling fallback"),
413
+ ]
414
+
395
415
  # Quant module parameters
396
416
  QUANT_LIST_INDICATORS_PARAMS = []
397
417
 
@@ -1,4 +0,0 @@
1
- .git
2
- data
3
- logs
4
- *.log
reportify_cli-0.1.2/.git DELETED
@@ -1 +0,0 @@
1
- gitdir: ../../.git/modules/modules/cli
@@ -1,104 +0,0 @@
1
- image: harbor.xiaobangtouzi.com/base/docker:kube-istio-jdk11
2
-
3
- stages:
4
- - pre_build
5
- - build
6
- - push_image
7
-
8
- variables:
9
- DOCKER_DRIVER: overlay2
10
-
11
- cache:
12
- paths:
13
- - .m2/repository
14
- - .sonar/cache
15
-
16
- build base images:
17
- stage: pre_build
18
- tags:
19
- - arm
20
- only:
21
- refs:
22
- - production@backend/reportify-api-cli
23
- changes:
24
- - pyproject.toml
25
- - uv.lock
26
- - Dockerfile.base
27
- - pip.conf
28
- script:
29
- - build_base_image
30
-
31
- build image:
32
- stage: build
33
- when: on_success
34
- tags:
35
- - arm
36
- only:
37
- - production@backend/reportify-api-cli
38
- script:
39
- - build_image
40
-
41
- push image to volc:
42
- stage: push_image
43
- when: manual
44
- tags:
45
- - arm
46
- only:
47
- - production@backend/reportify-api-cli
48
- script:
49
- - push_to_volc
50
-
51
- .auto_devops: &auto_devops |
52
- # Auto DevOps variables and functions
53
- [[ "$TRACE" ]] && set -x
54
- export CI_REGISTRY='harbor.xiaobangtouzi.com'
55
- export CI_IMAGE_TAG=${CI_COMMIT_SHA:0:10}
56
- export VOLC_IMAGE_NAME=harbror-cn-beijing.cr.volces.com/backend/reportify-api-cli:$CI_IMAGE_TAG
57
- # TODO rm "reportify-api-cli"
58
- export SERVICES=( "reportify-api-cli" )
59
-
60
- function registry_login() {
61
- if [[ -n "$CI_REGISTRY_USER" ]]; then
62
- echo "Logging to Harbor Registry with CI credentials..."
63
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY"
64
- fi
65
- }
66
-
67
- function build_base_image() {
68
- registry_login
69
- echo "Build Python Base Image"
70
- image_name=$CI_REGISTRY/base/reportify-api-cli-base-sandbox-$CI_COMMIT_REF_NAME:$CI_IMAGE_TAG
71
- image_name_tag=$CI_REGISTRY/base/reportify-api-cli-base-sandbox-$CI_COMMIT_REF_NAME:latest
72
- docker build -t ${image_name} -t ${image_name_tag} -f Dockerfile.base .
73
- docker push ${image_name}
74
- docker push ${image_name_tag}
75
- docker rmi ${image_name}
76
- docker rmi ${image_name_tag}
77
- }
78
-
79
- function build_image() {
80
- registry_login
81
-
82
- BASE_IMAGE=$CI_REGISTRY/base/reportify-api-cli-base-sandbox-$CI_COMMIT_REF_NAME:latest
83
- echo "BASE IMAGE $BASE_IMAGE"
84
-
85
- # build service image
86
- for service in "${SERVICES[@]}"
87
- do
88
- CI_IMAGE_NAME=$CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$service/$CI_COMMIT_REF_NAME:$CI_IMAGE_TAG
89
-
90
- echo "Build $CI_IMAGE_NAME for branch $CI_COMMIT_REF_NAME"
91
- echo "CURRENT PATH `pwd`"
92
- docker pull $BASE_IMAGE
93
- docker build --tag $CI_IMAGE_NAME --tag $VOLC_IMAGE_NAME --build-arg base_image=$BASE_IMAGE -f Dockerfile .
94
- docker push $CI_IMAGE_NAME
95
- docker rmi $CI_IMAGE_NAME
96
- done
97
- }
98
-
99
- function push_to_volc() {
100
- docker push $VOLC_IMAGE_NAME
101
- }
102
-
103
- before_script:
104
- - *auto_devops
@@ -1,10 +0,0 @@
1
- ARG base_image
2
- FROM $base_image
3
-
4
- WORKDIR /reportify-api-cli
5
-
6
- ADD src /reportify-api-cli/src
7
-
8
- RUN uv sync
9
- RUN ln -s /reportify-api-cli/.venv/bin/reportify-api-cli /usr/local/bin/reportify-api-cli
10
-
@@ -1,10 +0,0 @@
1
- FROM harbor.xiaobangtouzi.com/thirdpart/vefaas-public/all-in-one-sandbox:latest AS builder
2
-
3
- WORKDIR /reportify-api-cli
4
-
5
- ADD pyproject.toml /reportify-api-cli/pyproject.toml
6
- ADD uv.lock /code/uv.lock
7
-
8
- RUN uv sync
9
-
10
- RUN pip install --no-cache-dir --upgrade reportify-sdk
@@ -1,10 +0,0 @@
1
- FROM enterprise-public-cn-beijing.cr.volces.com/vefaas-public/all-in-one-sandbox:latest AS builder
2
-
3
- WORKDIR /reportify-api-cli
4
-
5
- ADD src /reportify-api-cli/src
6
- ADD pyproject.toml /reportify-api-cli/pyproject.toml
7
-
8
- RUN uv sync
9
- RUN ln -s /reportify-api-cli/.venv/bin/reportify-api-cli /usr/local/bin/reportify-api-cli
10
-
@@ -1,10 +0,0 @@
1
- [global]
2
- index-url=https://mirrors.cloud.tencent.com/pypi/simple
3
- extra-index-url=
4
- http://mirrors.aliyun.com/pypi/simple/
5
- https://pypi.tuna.tsinghua.edu.cn/simple/
6
- [install]
7
- trusted-host=
8
- mirrors.cloud.tencent.com
9
- mirrors.aliyun.com
10
- pypi.tuna.tsinghua.edu.cn
@@ -1,33 +0,0 @@
1
- """User module commands."""
2
-
3
- from typing import Annotated
4
-
5
- import typer
6
-
7
- from src import params
8
- from src.client import get_client
9
- from src.output import format_output
10
- from src.utils import generate_epilog, parse_json_input
11
-
12
- app = typer.Typer(help="User data", rich_markup_mode="rich")
13
-
14
-
15
- @app.command(
16
- name="followed_companies",
17
- epilog=generate_epilog(
18
- params.USER_FOLLOWED_COMPANIES_PARAMS, ["reportify-cli user followed_companies"]
19
- ),
20
- )
21
- def followed_companies(
22
- input: Annotated[str, typer.Option(help="JSON input parameters")] = "{}",
23
- format: Annotated[str, typer.Option(help="Output format: json, table, csv")] = "json",
24
- ):
25
- """Get all followed companies"""
26
- try:
27
- params_dict = parse_json_input(input)
28
- client = get_client()
29
- result = client.user.followed_companies(**params_dict)
30
- format_output(result, format)
31
- except Exception as e:
32
- typer.echo(f"Error: {e}", err=True)
33
- raise typer.Exit(1)
File without changes
File without changes
File without changes
File without changes
File without changes