Commit b6e90872 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

tweaks

parent 85d69654
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+5 −0
Original line number Diff line number Diff line
dagtest/
csst_dag.egg-info/
csst-msc-c9-50sqdeg-v3-plan/
build/
batch/
 No newline at end of file
+4 −1
Original line number Diff line number Diff line
@@ -10,3 +10,6 @@ install:

pull:
	git pull

compile:
	uv pip compile pyproject.toml -o requirements.txt
 No newline at end of file
+13 −11
Original line number Diff line number Diff line
# csst-dag
# `csst-dag`

更新:
# Change log
- [2025-09-15] 旧版csst-dag命令行工具安装方式
  - `pip install git+https://csst-tb.bao.ac.cn/code/csst-cicd/csst-dag.git@7a0108f3 --force-reinstall`
- [2025-09-09] csst-dag将被封装为Docker镜像,原有的基于`python -m csst_dag.cli`的命令行调用方式将被放弃
@@ -51,19 +51,21 @@ docker pull csu-harbor.csst.nao:10443/csst/csst-dag:latest
- `csst env`: 预设环境变量
- `csst plan`: 编排数据查询
  - `csst plan --obs-group=111`
  - `csst plan --dataset=111 --stats=obs_group`
  - `csst plan --dataset=111 --stats=obs_group --to-json`
- `csst dag`: DAG任务操作
  - `csst dag run --dataset=xxx --batch-id=xxx` ()
  - `csst dag candel --dataset=xxx --batch-id=xxx` (需要Scalebox、DFS支持)
- `csst data`:原始数据查询
  - `csst dag start --dataset=xxx --batch-id=xxx` 
  - `csst dag cancel --dataset=xxx --batch-id=xxx` (需要Scalebox、DFS支持)
  - `csst dag status --dataset=xxx --batch-id=xxx` (需要Scalebox、DFS支持)
  - `csst dag logs --dataset=xxx --batch-id=xxx --status=0` (需要Scalebox、DFS支持)
- `csst file`: 原始数据查询
  - `csst data --data-model=raw --obs-id=10100000001 --stats=obs_group`
    - 查询原始数据,并按照obs_group进行统计
  - `csst data --data-model=csst-msc-l1-mbi --obs-id=10100000001 --stats=obs_group`
  - `csst data --data-model=csst-msc-l1-mbi --obs-id=10100000001 --stats=obs_group` --output=json
    - 查询数据产品,并按照obs_group进行统计
- `csst catalog` DFS星表查询
  - `csst catalog list` 列出可用的星表
  - `csst catalog show --name=trilegal` 列出指定星表的具体信息
- `csst ccds` CCDS
- `csst ccds`: CCDS
  - `csst ccds pmap?`

## 1. `csst env` 环境变量

_setup.py

deleted100644 → 0
+0 −54
Original line number Diff line number Diff line
import setuptools

# 读取README.md作为长描述
with open("README.md", "r") as f:
    long_description = f.read()

# 读取依赖列表requirements.txt
# 忽略#开头或者版本号不明确指定的条目
with open("requirements.txt", "r") as f:
    requirements = [
        req.strip()
        for req in f.readlines()
        if not req.startswith("#") and req.__contains__("==")
    ]

# 配置、安装
setuptools.setup(
    name="csst_dag",  # 包名
    version="0.0.1",  # 版本号
    author="Bo Zhang",  # 作者
    author_email="bozhang@nao.cas.cn",  # 邮箱
    description="CSST DAG",  # 短描述
    long_description=long_description,  # 长描述
    long_description_content_type="text/markdown",  # 长描述类型
    url="https://csst-tb.bao.ac.cn/code/csst-cicd/csst-dag",  # 主页
    packages=setuptools.find_packages(
        where="."
    ),  # 用setuptools工具自动发现带有__init__.py的包
    license="MIT",  # 证书类型
    classifiers=[  # 程序分类, 参考 https://pypi.org/classifiers/
        # How mature is this project?
        #   3 - Alpha
        #   4 - Beta
        #   5 - Production/Stable
        "Development Status :: 3 - Alpha",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Topic :: Scientific/Engineering :: Physics",
        "Topic :: Scientific/Engineering :: Astronomy",
    ],
    include_package_data=True,  # 设置包含随包数据
    package_data={  # 具体随包数据路径
        "csst_dag": [
            "constants/*",
            "dag/*",
            "config/*",
        ],
    },
    # 请注意检查,防止临时文件或其他不必要的文件被提交到仓库,否则会一同安装
    python_requires=">=3.11",  # Python版本要求
    install_requires=requirements,
)

app/.csst/.env

deleted100644 → 0
+0 −5
Original line number Diff line number Diff line
# DFS1
CSST_DFS_GATEWAY="192.168.25.89:28000"
CSST_DFS_TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjQ4ODU0NTA2NjQsInN1YiI6InN5c3RlbSJ9.POsuUABytu8-WMtZiYehiYEa5BnlgqNTXT6X3OTyix0"
# DFS2
# ---
 No newline at end of file
Loading