Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #50

Merged
merged 15 commits into from
Sep 22, 2024
Merged

Develop #50

merged 15 commits into from
Sep 22, 2024

Conversation

tanbro
Copy link
Owner

@tanbro tanbro commented Sep 22, 2024

No description provided.

tanbro and others added 15 commits July 1, 2024 21:49
…doc comments

- Rename type variables with more descriptive names (`_TOpenFile` to `OpenFileT`, `_TLoaderType` to `LoaderTypeT`).
- Update doc comments to reflect changes and correct typos.
- Change `Generator` to `Iterator` in `managed_autoload` return type to better reflect its behavior.
- Enforce identifier string check in `is_kwds` function to ensure valid Python identifiers.
…ple Files

Added the flatten parameter, which allows flattening sequence objects when including multiple YAML files. This is applicable when top-level sequence objects are included in each matching YAML file, avoiding the creation of a two-dimensional array and instead providing a flattened sequence.

By setting flatten=true, users can merge sequence objects from multiple included files into a single sequence rather than having a sequence of sequences. If the flatten parameter is not set or is set to false (the default behavior), the sequences will remain nested as they were originally.

This feature is only available when multiple matching files are included, and each matching file must contain a sequence object at the top level; otherwise, it may trigger a TypeError exception.
…ny-files-matched

New Feature: Support Flattening Sequence Objects When Including Multiple Files
- 更新了文档构建流程的说明,以反映在Windows平台上使用`docs\make html`命令的新方式。
- 从项目的`requirements.txt`文件中移除了对`setuptools_scm`的引用,这是一个不再需要的依赖。
- 通过在`yaml_include/constructor.py`中对`DEFAULT_YAML_LOAD_FUNCTION`的条件判断增加`pragma: no cover`注解,确保代码覆盖率统计准确。
- 移除了测试中对`FlattenTestCase`类的不需要的设置和拆除逻辑,该逻辑与当前测试用例不再相关。

这些更改代表了文档构建过程的改进、项目依赖的精简、代码覆盖率的准确度提升,以及测试用例相关性的调整。
#### README.md
新增`flatten`参数说明,用于序列对象的解析优化。
在解析包含序列对象的多个匹配文件时,新增`flatten`参数,可将结果序列化为一维数组,优化了数据解析过程。

#### README.rst
更新PDF生成提示,指导使用`make rinoh`命令。
为便于PDF生成,更新文档提示,指导使用`make rinoh`命令,同时增加对相关工具的引用。

#### requirements.txt
增加PDF生成依赖项,扩展文档构建功能。
为支持直接PDF生成,新增`rinohtype`和`pillow`依赖项,以增强文档构建工具链。

#### data.py
文档更新,明确`urlpath`和`maxdepth`选项。
更新`Data`类文档,明确`urlpath`支持的通配符和`maxdepth`应用逻辑,提高了文档的清晰度。
- 更新`.pre-commit-config.yaml`中的`ruff-pre-commit`仓库版本至v0.6.5。
- 在`constructor.py`中调整`_Scalar`的导入方式,以解决类型检查问题。
ValueError raised when maxpath in sequence params is not an integer string
Copy link

Copy link

Please retry analysis of this Pull-Request directly on SonarCloud

@tanbro tanbro merged commit 14d3e40 into main Sep 22, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant