From 2988ca0a53630ddd3ecbf2ab011bc5f8adb74d76 Mon Sep 17 00:00:00 2001 From: xhong Date: Mon, 13 Apr 2026 12:07:05 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE=E4=B8=8E=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 .gitignore 以忽略 powershell/ 目录和 .env* 文件 - 在 environment.yml 中调整依赖项顺序,添加 planetary-computer 和 rich,并固定 python 版本为 3.12 - 新增 .vscode 配置文件,包含推荐的扩展和编辑器设置,以统一开发环境 --- .gitignore | 4 +++- .vscode/extensions.json | 12 ++++++++++++ .vscode/settings.json | 25 +++++++++++++++++++++++++ setup/environment.yml | 5 +++-- setup/openearth.yml | Bin 32796 -> 33014 bytes 5 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index 77975bd..fa7a391 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .dodsrc __pycache__/ +powershell/ data/ *.pdf *.doc @@ -24,4 +25,5 @@ data/ *.zip *.7z *.tar* -*.rar \ No newline at end of file +*.rar +.env* \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..2ae50c3 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,12 @@ +{ + // 推荐此项目所需的 VS Code 扩展 (如果尚未安装) + "recommendations": [ + "vscode-icons-team.vscode-icons", // 文件图标主题 + "streetsidesoftware.code-spell-checker", // 拼写检查工具 + "esbenp.prettier-vscode", // Prettier 代码格式化工具 + "dbaeumer.vscode-eslint", // ESLint 代码检查工具 + "ms-python.python", // Python 语言支持 + "charliermarsh.ruff", // Ruff 代码检查和格式化工具 + "detachhead.BasedPyright", // Python 类型检查工具 + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5563b1f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,25 @@ +{ + // 为 Python 文件设置 Ruff 为默认格式化工具 + "[python]": { + "editor.defaultFormatter": "charliermarsh.ruff", + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.fixAll.ruff": "explicit", + "source.organizeImports.ruff": "explicit" + } + }, + // 全局-编辑其他语言时保存时Ruff格式化开关 + "editor.formatOnSave": false, + // 启用 Ruff 扩展的自动修复功能 + "ruff.fixAll": true, + "ruff.organizeImports": true, + // 设置最大行宽 + "ruff.lineLength": 88, + // 排除不需要格式化的文件或目录 + "ruff.exclude": [ + "**/__pycache__/**", + "**/migrations/**", + "**/node_modules/**", + "**/.git/**" + ] +} \ No newline at end of file diff --git a/setup/environment.yml b/setup/environment.yml index b8b3601..09f47dd 100644 --- a/setup/environment.yml +++ b/setup/environment.yml @@ -2,6 +2,7 @@ name: openearth channels: - conda-forge dependencies: + - python=3.12 - dask - earthaccess - fiona @@ -19,14 +20,14 @@ dependencies: - odc-stac - pyresample - pystac-client - - python=3.12 + - planetary-computer - rasterio - ray-default - rioxarray - scikit-image - - pystac-client - seaborn - spectral + - rich - selenium - firefox - geckodriver diff --git a/setup/openearth.yml b/setup/openearth.yml index 36ce601e04d5b121b65d6ff88b203d8238d41b07..202bc08c41fff83ae20c7b4fec6ed6235a729438 100644 GIT binary patch delta 102 zcmbQ!!1S$=X@f$bVje>(LkUA7LlHwIgDyidLq0<;Ljgl6P%ITFX3JnW`Fy$lW~sm( zJiH|gRX_nF1_K~An=B|PIr&$p(&kIC>sWY`88Sd>8B7`U7z`$FWYpeVle9n<0DdYP AXaE2J delta 24 gcmey?$TX*cX@f%G=CZ&|Jev#R*0F4kN}eMN0EKi4O#lD@