Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Should PyWPS automatically set minOccurs=0 when literal data default is provided?

未关闭
#625 10 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
api, backend

调研方向

未识别出文件或测试。首先跟踪 PyWPS 对同时指定 default 和 min_occurs 的字面量输入进行输入验证以及生成过程描述的流程,然后查看报告中列出的相关 issue 和 pull request。完成的标准是,已就 default 和 min_occurs 的预期行为达成一致,并且该行为在执行期间和过程描述中都得到一致体现。

由索引模型根据 Issue 内容生成。

描述

Description

Field min_occurs=1 is the default of inputs. When default parameter is provided to define a default literal value, that default 1 occurrence loses its meaning. I would imagine most people expect that adding this default parameter will make their process pick that value if it was omitted, but this will never happen due to min_occurs=1 check at execution time. The process description also displays ``minOccurs=1anddefaultValue` simultaneously, which makes the default behaviour hard to understand.

I am questioning whether PyWPS should be smart about it and automatically adjust the value to 0 when default is provided, since it doesn't make sense to have that default if it cannot be resolved by default when omitting the input value.

Although the fix is relatively simple to manually adjust any process I/O incorrectly defined, I find this is a quite common and recurring issue. See for example additional information which is just a list of cases I found within a week, over many WPS process implementations.

Environment

  • operating system: ubuntu 20.04
  • Python version: 3.8
  • PyWPS version: latest
  • source/distribution
  • git clone
  • Debian
  • PyPI
  • zip/tar.gz
  • other (please specify):
  • web server
  • Apache/mod_wsgi
  • CGI
  • other (please specify):

Additional Information

Following related issues/PR where similar problem was noticed:

主要语言
Python
星标
186
派生
117
平均合并
16 天 16 小时
30 天内合并 PR
1

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

geopython/pywps 的其他 Issue

查看 geopython/pywps 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。