posit-dev / posit-dev/rsconnect-python
deploy manifest errs when give a directory containing a manifest
オープン
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 37
- フォーク
- 28
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 7
説明
The help for deploy manifest reads:
Usage: rsconnect deploy manifest [OPTIONS] FILE
Deploy content to Posit Connect, Posit Cloud, or shinyapps.io using an
existing manifest.json file. The specified file must either be named
"manifest.json" or refer to a directory that contains a file named
"manifest.json".
However, when providing a directory that contains a manifest.json, an error results.
Traceback (most recent call last):
File "BASE_DIR/env/lib/python3.11/site-packages/rsconnect/main.py", line 108, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "BASE_DIR/env/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "BASE_DIR/env/lib/python3.11/site-packages/rsconnect/main.py", line 1119, in deploy_manifest
kwargs["title"] = title or default_title_from_manifest(file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "BASE_DIR/env/lib/python3.11/site-packages/rsconnect/bundle.py", line 744, in default_title_from_manifest
source_manifest, _ = read_manifest_file(file)
^^^^^^^^^^^^^^^^^^^^^^^^
File "BASE_DIR/env/lib/python3.11/site-packages/rsconnect/bundle.py", line 757, in read_manifest_file
with open(manifest_path, "rb") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^
IsADirectoryError: [Errno 21] Is a directory: 'model'
Internal error: [Errno 21] Is a directory: 'model'
Providing the path to the manifest.json works.
# error
rsconnect deploy manifest model
# no error
rsconnect deploy manifest model/manifest.json
Using rsconnect-python 1.23.0.
The manifest is correctly identified:
rsconnect.bundle.validate_manifest_file("model")
#> 'model/manifest.json'
However, in deploy_manifest(), we rewrite the incoming file to file_name but do not consistently use that variable.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
rsconnect/main.py の deploy_manifest() から始め、次に rsconnect/bundle.py の default_title_from_manifest() と read_manifest_file() を追ってください。マニフェストの検証後に file と file_name がどのように使われているかを比較し、rsconnect deploy manifest model とマニフェストへの直接パスの両方がディレクトリエラーなしで完了することを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 48/100