Fail to import module via github url
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 65/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github, python
- Lĩnh vực
- build-system, tooling
Hướng nghiên cứu
Start by reproducing the import with the shown module definition and pixi run snakemake -c 2 all_grid_builder. Read workflow/Snakefile and the scripts._schema reference named in the traceback; the work is done when the GitHub-imported module resolves load_region_configs and the target completes without the ImportError.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
As of now, grid-builder cannot be imported into another Snakemake workflow by pointing to the github url.
To Reproduce
Steps to reproduce the behavior:
- Import the module into a Snakemake workflow.
configfile: "config/modules/grid_builder.yaml"
module module_grid_builder:
pathvars:
logs="results/module_grid_builder/logs",
resources="results/module_grid_builder/resources",
results="results/module_grid_builder/results",
snakefile:
github(
"pypsa/grid-builder",
path="workflow/Snakefile",
tag="6905b99",
)
config:
config["grid_builder"]
use rule * from module_grid_builder as module_grid_builder_*
rule all_grid_builder:
default_target: True
input:
rules.module_grid_builder_retrieve_osm_all.input,
- Request something from the module
pixi run snakemake -c 2 all_grid_builder
- See error
ImportError in file "https://raw.githubusercontent.com/pypsa/grid-builder/6905b99/workflow/Snakefile", line 8:
cannot import name 'load_region_configs' from 'scripts._schema'
File "https://raw.githubusercontent.com/pypsa/grid-builder/6905b99/workflow/Snakefile", line 8, in <module>
Expected behavior
The reference to scripts._schema should be correctly resolved.
Desktop (please complete the following information):
- OS: Linux Fedora 43
- Ngôn ngữ chính
- Python
- Star
- 7
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PyPSA/grid-builder
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
PyPSA/grid-builder#11 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
PyPSA/grid-builder#10 · 2 bình luận · 1 reaction ·
-
Bring-in regional line typesĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
PyPSA/grid-builder#7 · 1 bình luận ·
-
needs discussion
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
PyPSA/grid-builder#6 · 2 bình luận ·
-
RequirementsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
PyPSA/grid-builder#2 ·
Tất cả issue của PyPSA/grid-builder
Issue tương tự
-
cli good first issue help wanted python up-for-grabs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
andrewsiah/agentswarm-data-tasks#36 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug drawing-tools
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
cofade/open-garden-planner#827 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Methodology pageĐang mởdocumentation site texts
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Krasnopjorovs/temet#66 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày