Fail to import module via github url

オープン
#9 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

@jnnr がすでに取り組んでいます。

2026年10月11日 から。

  • #13 @jnnr による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
github, python

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

bug

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:

  1. 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,
  1. Request something from the module

pixi run snakemake -c 2 all_grid_builder

  1. 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
主要言語
Python
スター
7
フォーク
2
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PyPSA/grid-builder のほかの issue

PyPSA/grid-builder の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。