Skip to content

Commit

Permalink
🔖 release v4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kinegratii committed Jan 31, 2024
1 parent b7ec13d commit a9b410e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 7 deletions.
22 changes: 16 additions & 6 deletions docs/develop_note.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# 开发笔记

## python版本约束
## 代码编写

### python版本约束

Borax 4.1.0开始,要求python最低版本为3.9,主要是引入了新的特性,包括:

- `functools.cached_property` 装饰器 (python3.8+)
- `typing.Literal` 类型注释(python3.8+)

## 代码风格
### 代码风格

项目代码风格以 [PEP8](https://peps.python.org/pep-0008/) + pycharm 的配置为基准,并增加下列的一些自定义规则。

Expand All @@ -16,7 +18,13 @@ Borax 4.1.0开始,要求python最低版本为3.9,主要是引入了新的特
- 禁止使用 `\` 作为代码行分割的标志,需使用括号
- 不再接受注释方式的类型声明,如 `a = 2 # type:int` 应该为 `a:int = 2` (pyflake触发 `F401` 警告)

## 项目开发
### API稳定性

Borax 保证API的稳定性,使用 `warnings` 模块标识已经被废弃的类和函数,并在首次标识之后的2-3个系列版本移除这些类和函数。

## 项目构建

### 配置文件

Borax 默认使用 *pyproject.toml* 文件作为项目配置文件,具体包括单元测试、静态检查等内容。

Expand All @@ -33,21 +41,23 @@ Borax 默认使用 *pyproject.toml* 文件作为项目配置文件,具体包



## 项目构建
### 项目构建

项目使用 `build` 作为包构建工具,使用下列命令生成 wheel 文件。

```shell
python -m build -w
```

## 文档编写
## 文档

### 文档编写

除了常规的模块文档外,项目包括以下两种日志文档:

- 更新日志:每个版本的changelog。
- 发布日志:某些重要版本的 release note,每个版本单独一篇文章。

## 文档生成
### 文档生成

Borax项目使用 [Material for MkDocs ](https://squidfunk.github.io/mkdocs-material/) 作为文档生成工具,不再支持 docsify 文档生成工具。
23 changes: 22 additions & 1 deletion docs/release-note/v410.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,27 @@ Borax 提供了一个基于 tkinter 的日历应用程序,该日历应用包
- 查看节日、节气、干支信息
- 创建和导出节日源

在安装 Borax 之后,使用 `python -m borax.capp` 启动该界面程序 。

## 3 其他功能

参见更新日志。
Borax 4.1.0 主要更新了 `borax.calendars.festivals2` 模块的功能。

### 3.1 WrappedDate

`WrappedDate.solar``WrappedDate.lunar` 属性修改为 **只读属性,不可写入**

### 3.2 Festival

`Festival` 新增 `code` 属性,表示节日的编码,该属性为惰性属性,使用 `cached_property` 装饰。

### 3.3 FestivalLibrary

新增 `FestivalLibrary.load` 函数,这是 `load_file``load_builtin` 的混合接口 。

```python
fl1 = FestivalLibrary.load('basic')

fl2 = FestivalLibrary.load('c:\\users\\samuel\\festival_data\\my_festivals.csv')
```

0 comments on commit a9b410e

Please sign in to comment.