Coder Social home page Coder Social logo

coderwanfeng / python-office Goto Github PK

View Code? Open in Web Editor NEW
810.0 12.0 168.0 138.97 MB

pip install python-office 自动化办公专用库

Home Page: https://www.python-office.com

License: Apache License 2.0

Python 80.08% CSS 0.99% HTML 18.75% Dockerfile 0.17%
office pip pypi python weixin

python-office's Introduction

github license

👉 项目官网:https://www.python-office.com/ 👈

👉 本开源项目的交流群 👈

github star gitee star


🌎English Documentation


📚简介

Python-office 是一个 Python 自动化办公第三方库,能解决大部分自动化办公的问题。而且每个功能只需一行代码,不需要小白用户学习 Python 知识,做到了真正的开箱即用。

功能持续更新中,提交你的功能需求/参与项目开发,联系👉开发者微信

🍺特点

  • 一键搭建所有 Python + 自动化办公的编程环境。
  • 使用一行代码解决大部分自动化办公的问题,不需要小白学习 Python 知识
  • 贴合职场办公需求
  • 极简编程,学习成本极低,工作效率提升显著

📦安装

🍊pip 自动下载&更新

pip install -i https://mirrors.aliyun.com/pypi/simple/ python-office -U

📝文档

📘官网:https://www.python-office.com/

全部功能 的 视频教程👉传送门

🛠️包含组件

很多朋友发现python-office这个库,下载很慢很大,是因为它集成了以下这些库,你可以去挑自己需要功能,单独下载对应的第三方库。

以下所有独立的子库,也都在持续地开发和维护中。

模块 介绍 源码 教程
PyOfficeRobot 微信机器人 https://github.com/CoderWanFeng/PyOfficeRobot github star
poimage 图片处理 https://github.com/CoderWanFeng/poimage github star
poai AI工具 https://github.com/CoderWanFeng/poai github star
poexcel excel处理 https://github.com/CoderWanFeng/poexcel github star
poword word处理 https://github.com/CoderWanFeng/poword github star
poocr 识别功能,例如:发票识别 https://github.com/CoderWanFeng/poocr github star
pofile 文件管理 https://github.com/CoderWanFeng/pofile github star
search4file 文档搜索 https://github.com/CoderWanFeng/search4file github star
popdf pdf处理 https://github.com/CoderWanFeng/popdf github star
poppt ppt处理 https://github.com/CoderWanFeng/poppt github star
wftools 便捷小工具 https://github.com/CoderWanFeng/wftools github star
pofinance 炒股工具 https://github.com/CoderWanFeng/pofinance github star
pohan 中文编程 https://github.com/CoderWanFeng/pohan github star
povideo 视频处理 https://github.com/CoderWanFeng/povideo github star
potime 时间工具 https://github.com/CoderWanFeng/potime github star
poprogress 进度条工具 https://github.com/CoderWanFeng/poprogress github star
pocode 代码管理 https://github.com/CoderWanFeng/pocode github star
porobot AI机器人 https://github.com/CoderWanFeng/porobot github star
poemail 自动发邮件 https://github.com/CoderWanFeng/poemail github star

可以根据需求对每个模块单独引入,也可以通过import office方式引入所有模块。


🏗️添砖加瓦

📐PR的建议

python-office欢迎任何人来添砖加瓦,贡献代码,建议提交的pr(pull request)放在一个单独的文件夹下:

  • contributors文件夹中,用自己的GitHub名字建一个文件夹;
  • 把自己的所有代码,都提交到这个自己的文件夹里;
  • 不要改其它任何文件夹里的代码!不要改别人的代码!
  • 对别人的代码有疑问,可以直接提issue。

🐞提供bug反馈或建议

提交问题反馈时,请务必填写和python-office代码本身有关的问题,不进行有关python学习,甚至是个人练习的知识答疑和讨论。


🪙支持python-office

o基础的朋友,想快速入门自动化办公,还可以学习下面这几套原创课程,👇。


⭐Star python-office

Stargazers over time

📌联系作者

📕拓展资料

python-office's People

Contributors

babyfengfjx avatar bob-afei avatar chaodreaming avatar chenjie666666 avatar cnseniorious000 avatar coderwanfeng avatar heywfeng avatar hktkzyx avatar maxcrazy1101 avatar nf000 avatar townboats avatar yinzeyuan avatar zhaofeng092 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-office's Issues

Mac 没办法做支持的吧

Mac 没办法做支持的吧,安装pip python-office 不报错,执行
/Users/betty/PycharmProjects/pythonProject/venv/bin/python /Users/betty/PycharmProjects/pythonProject/myfaker.py
Traceback (most recent call last):
File "/Users/betty/PycharmProjects/pythonProject/myfaker.py", line 6, in
import office
File "/Users/betty/PycharmProjects/pythonProject/venv/lib/python3.10/site-packages/office/init.py", line 1, in
from office.api import word
File "/Users/betty/PycharmProjects/pythonProject/venv/lib/python3.10/site-packages/office/api/word.py", line 13, in
from office.core.WordType import MainWord
File "/Users/betty/PycharmProjects/pythonProject/venv/lib/python3.10/site-packages/office/core/WordType.py", line 2, in
from win32com.client import constants, gencache
ModuleNotFoundError: No module named 'win32com'

找不到pofile模块

#无法导入破file模块
ImportError: cannot import name 'check_suffix' from 'pofile' (**\python3.11\Lib\site-packages\pofile_init_.py)

微信消息发送

发微信消息,如何换行呢,试了下很多方法都不行。

docstring 格式不统一

建议统一 docstring 的格式。
core/ExcelType.py里不是和core/FileType.py不是一种格式。

建议在文档里约定好格式。个人推荐 numpydoc 的格式。

安装报错

在Pycharm 中 输入pip install -i https://pypi.tuna.tsinghua.edu.cn/simple python-office -U
都能正常安装,但有一个报错,导致安装失败

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
paddlepaddle-gpu 2.2.2 requires numpy<=1.19.3,>=1.13; python_version >= "3.5" and platform_system == "Windows", but you have numpy 1.22.3 which is incompatible.

pdf转word提示字体错误

[INFO] Start to convert C:\Users\zspym\Desktop\PyQt6 Python桌面开发.pdf
[INFO] [1/4] Opening document...
[INFO] [2/4] Analyzing document...
Traceback (most recent call last):
File "D:\python\tools\app\view\ocr_ofd_to_pdf_ui.py", line 33, in doTransfor
popdf.pdf2docx(file_path=r''+self.fname,output_path=r''+newfile)
File "D:\installed\Python311\Lib\site-packages\popdf\api\pdf.py", line 70, in pdf2docx
mainPDF.pdf2docx(file_path, output_path)
File "D:\installed\Python311\Lib\site-packages\popdf\core\PDFType.py", line 86, in pdf2docx
cv.convert(word_path)
File "D:\installed\Python311\Lib\site-packages\pdf2docx\converter.py", line 329, in convert
self.parse(start, end, pages, **settings).make_docx(docx_filename, **settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\installed\Python311\Lib\site-packages\pdf2docx\converter.py", line 112, in parse
return self.load_pages(start, end, pages)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\installed\Python311\Lib\site-packages\pdf2docx\converter.py", line 153, in parse_document
self._pages.parse(self.fitz_doc, **kwargs)
File "D:\installed\Python311\Lib\site-packages\pdf2docx\page\Pages.py", line 37, in parse
raw_page.restore(**settings)
File "D:\installed\Python311\Lib\site-packages\pdf2docx\common\share.py", line 226, in inner
objects = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\installed\Python311\Lib\site-packages\pdf2docx\page\RawPage.py", line 67, in restore
super().restore(raw_dict)
File "D:\installed\Python311\Lib\site-packages\pdf2docx\layout\Layout.py", line 74, in restore
self.blocks.restore(data.get('blocks', []))
File "D:\installed\Python311\Lib\site-packages\pdf2docx\layout\Blocks.py", line 98, in restore
block = TextBlock(raw_block)
^^^^^^^^^^^^^^^^^^^^
File "D:\installed\Python311\Lib\site-packages\pdf2docx\text\TextBlock.py", line 49, in init
self.lines = Lines(parent=self).restore(raw.get('lines', []))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\installed\Python311\Lib\site-packages\pdf2docx\text\Lines.py", line 31, in restore
line = Line(raw)
^^^^^^^^^
File "D:\installed\Python311\Lib\site-packages\pdf2docx\text\Line.py", line 54, in init
self.spans = Spans(parent=self).restore(raw.get('spans', []))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\installed\Python311\Lib\site-packages\pdf2docx\text\Spans.py", line 19, in restore
span = TextSpan(raw_span)
^^^^^^^^^^^^^^^^^^
File "D:\installed\Python311\Lib\site-packages\pdf2docx\text\TextSpan.py", line 78, in init
self._change_font_and_update_bbox(constants.DEFAULT_FONT_NAME)
File "D:\installed\Python311\Lib\site-packages\pdf2docx\text\TextSpan.py", line 121, in _change_font_and_update_bbox
font = fitz.Font(font_name)
^^^^^^^^^^^^^^^^^^^^
File "D:\installed\Python311\Lib\site-packages\fitz\fitz.py", line 9404, in init
_fitz.Font_swiginit(self, _fitz.new_Font(fontname, fontfile, fontbuffer, script, language, ordering, is_bold, is_italic, is_serif, embed))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: cannot find builtin font with name 'Arial'

是不是只能在Windows环境下运行 在linux环境下报错

图片
Traceback (most recent call last):
File "/home/ABB/Extract_table/Image_conversion.py", line 1, in
import office
File "/public/software/Anaconda3/lib/python3.9/site-packages/office/init.py", line 1, in
from office.api import word
File "/public/software/Anaconda3/lib/python3.9/site-packages/office/api/word.py", line 13, in
from office.core.WordType import MainWord
File "/public/software/Anaconda3/lib/python3.9/site-packages/office/core/WordType.py", line 2, in
from win32com.client import constants, gencache
ModuleNotFoundError: No module named 'win32com'

Process finished with exit code 1

社区规范化问题:预设

目前,这个开源项目正处在蓬勃的发展当中,但是在发展的过程中需要更多的规范化。客户以及开发者提出了各种各样的需求,有一些需求比较大众,有一些需求比较小众。如果不对这些需求加以区分而盲目的将api合入office的库中,会导致整个库十分臃肿且没有中心,这势必会对于整个开源生态的发展非常的不利。
为此,我建议采用类似主体+插件的形式对于开源代码进行维护。主体保留最常见的相应功能,这一部分功能是用户使用的频率最高的,呼声最大的功能。而插件——在这里被我称为预设,则保证小众的需求,让客户可以选择的下载。同时在某些预设的使用量较高的情况下,将其合入主体。
这样子有几个好处:首先是,可以分清楚主次以及开发者的职责。主体由项目的主要开发者维护,而预设则主要由预设的创作者来维护。这样子不会出现某些主要开发者专注于维护低频次使用的功能而忽视主要功能的维护升级。
其次是方便项目维护,稳定的特性可以放置在主体中进行维护与迭代,而非稳定的特性可以放到预设进行开发,直到稳定再合入主体。
另外就是鼓励了创作者的开发热情。由于预设并不一定要是完整的功能,仅仅是一个小的办公脚本中就可以加入预设,这样子每一个使用了python脚本的人都可以把自己的脚本分享出来。这就有点类似创意工坊的感觉,可以极大的增加创作者的热情。
当然,预设仍有许多规范化问题需要解决,这需要社区进行讨论,制定相应的预设编写规范以及导入方法

希望每个功能都能提供一个CLI接口

使用场景:在一个充满屏幕截图的文件夹下,用一行命令将这些截图转为ppt

建议:将命令命名为py-office或者poffice或者po,短命令好打

这样上述使用场景需要的命令大概是:

po img2ppt -i . -o output.pptx
# or:
python -m python-office img2ppt -i . -o output.pptx

要实现这个功能,需要:

  1. python-office的每个子包都有一个__main__.py文件
  2. 打包一个总的__main__.py为一个exe文件,比如命名为po.exe

建议:对CLI参数的解析可以借助标准库的argparse模块,

但个人更推荐使用第三方库typer,用装饰器的方式,更直观更便捷地将已有的功能函数转为cli接口


提供cli接口的一个用处是,让几乎完全没有python基础的人也能使用python-office

xlsx 转 PDF 报错: File "<COMObject <unknown>>", line 3, in ExportAsFixedFormat ?

my project dir

  • m1.xlsx
  • main.py

this main.py code

import poexcel
if __name__ == '__main__':
    poexcel.excel2pdf(excel_path=r".\m1.xlsx",pdf_path=r".\test.pdf")

exec result

files amount:1
files amount:1
Traceback (most recent call last):
  File "C:\Users\xxx\python_project\xlsx2pdf\main.py", line 6, in <module>
    poexcel.excel2pdf(
  File "C:\Users\xxx\python_project\xlsx2pdf\venv\lib\site-packages\poexcel\api\excel.py", line 58, in excel2pdf
    mainExcel.excel2pdf(excel_path, pdf_path, sheet_id)
  File "C:\Users\xxx\python_project\xlsx2pdf\venv\lib\site-packages\poexcel\core\ExcelType.py", line 162, in excel2pdf
    sheet.to_pdf(path=pdf_path_name, show=False)
  File "C:\Users\xxx\python_project\xlsx2pdf\venv\lib\site-packages\xlwings\main.py", line 1569, in to_pdf
    return self.book.to_pdf(
  File "C:\Users\xxx\python_project\xlsx2pdf\venv\lib\site-packages\xlwings\main.py", line 1275, in to_pdf
    return utils.to_pdf(
  File "C:\Users\xxx\python_project\xlsx2pdf\venv\lib\site-packages\xlwings\utils.py", line 662, in to_pdf
    obj.impl.to_pdf(os.path.realpath(report_path), quality=quality)
  File "C:\Users\xxx\python_project\xlsx2pdf\venv\lib\site-packages\xlwings\_xlwindows.py", line 920, in to_pdf
    self.xl.ExportAsFixedFormat(
  File "C:\Users\xxx\python_project\xlsx2pdf\venv\lib\site-packages\xlwings\_xlwindows.py", line 122, in __call__
    v = self.__method(*args, **kwargs)
  File "<COMObject <unknown>>", line 3, in ExportAsFixedFormat

没找到自动化汇总Word表格的Python脚本,可能是我笨

作者您好,我是一个非计算机专业的编程小白,在写一个自动化汇总Word表格的Python脚本,我没找到相应的内容,所以就在这里写一下,如果有的话,不好意思添麻烦了。
我在写脚本的时候,对于特定的表格来说这是一个很简单的东西,直接行列号定位取数据就可以了,代码很好写,对于不同的表格可以微调,但是这也需要花时间和调试,而随表格结构的复杂性上升,花费的时间也不短,所以我就想能不能写一个自己判断表格结构的脚本,给一张空表分析一下就可以读取其他表格提取内容。然后我发现,有的复杂的表格表头到处都是,有横着填的、竖着填的、空着不填的,甚至有的用户还擅自修改表格的长度(Word表格哎),有些问题我不会解决,一星期了也没写好。

是否支持同时监听多个好友/群的功能?

看了下例子上了下手,确实不错,但有个功能请教一下两个问题:

  1. 比如我有多个好友/群,那么这几个群都要去接收消息,做出回应,而接收消息需要使用Wechat().ChatWith(who)打开聊天界面

我水平也有限,目前能想到的就是,将who写成一个列表,间隔一段时间,打开一个好友/群的聊天框,获取聊天记录然后找到最近的@机器人的消息做出回复,但这样群消息多了感觉也处理不过来😟

请问是否有,或以后会添加这样的功能呢?

  1. Wechat().GetSessionList()可以获取当前页面的联系人,那么如何获取所有的呢?我想的比较笨的方法是,增大滚动条的时间,从上到下拉一遍,但这个似乎无法解决有的群不在左侧最近联系人的列表中的情况

不过我发现微信左侧的通讯录中,通讯录管理有需要的所有的信息,不过win32gui和uiautomation真不会,还烦请作者考虑一下加功能

微信机器人

微信机器人发送文件会导致wechatwin.dll错误,导致微信程序崩溃

项目文件结构需要修改

office 包是该项目用户调用的接口。office 依赖的包core应当放在office文件夹下。

pyproject.toml里的这一段配置

packages = [
    { include = "office" }, # 调用的方法
    { include = "cli" }, # 命令行工具
    { include = "core" }, # 核心功能实现类
    { include = "lib" }, # 工具类、第三方库的使用
]

会在python的环境里同级得安装office, cli, core, lib包。这个是不对的。这个配置应该只include office就可以了。

lib文件夹在.gitignore里被忽略了。

希望加入xps与pdf 互转的功能函数。

1 希望加入xps与pdf 互转的功能函数。
2 希望加入doc,ppt,转xps的功能函数。
3 希望加入,excel,里面,每页,自动输出xps,ppt的功能。
谢谢。单位都用xps,不怎么用pdf。只有向外部发文件用xps的打印成pdf功能。
谢谢。主要处理批量任务。

按照示例代码达不到期望效果

poimage.del_watermark(input_image=r"./train_data_path/01a0f25ef9a3fca801215aa0ffb6fd.jpeg" ,output_image=r'./train_data_path/1.jpg')

原图中不止一处水印,输出的图片和原图一样,这是啥问题,以下是原图
01a0f25ef9a3fca801215aa0ffb6fd

AttributeError: 'NoneType' object has no attribute 'shape'

import poimage

def removesy(input_image,output_image):
# 支持jpg、png等所有图片格式
poimage.del_watermark(input_image=input_image,output_image=output_image)

if name == "main":

input_image="C:/Users/zhangtao/Desktop/1/1.png"
output_image="C:/Users/zhangtao/Desktop/1/1.0.png"
removesy(input_image,output_image)

QQ截图20240222184741

Excel转PDF

建议出一个Excel转PDF的命令,谢谢

mac 安装后, 运行报错

  1. 安装后
    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple python-office -U

  2. 执行
    office.excel.fake2excel(columns=['name', 'text'], rows=20)

  3. 报错

Traceback (most recent call last):
  File "/Users/xxx/work_code/python-lessons/main.py", line 9, in <module>
    import office
  File "/Users/xxx/work_code/python-lessons/venv/lib/python3.8/site-packages/office/__init__.py", line 1, in <module>
    from . import word
  File "/Users/xxx/work_code/python-lessons/venv/lib/python3.8/site-packages/office/word.py", line 12, in <module>
    from win32com.client import constants, gencache
ModuleNotFoundError: No module named 'win32com'
  1. 再次安装缺少的 win32
pip install pypiwin32
  1. 安装 win32 报错
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting pypiwin32
  Using cached https://mirrors.aliyun.com/pypi/packages/d0/1b/2f292bbd742e369a100c91faa0483172cd91a1a422a6692055ac920946c5/pypiwin32-223-py3-none-any.whl (1.7 kB)
  Using cached https://mirrors.aliyun.com/pypi/packages/2b/ca/5c086c18de8f70222787b3e824e755b68d99272531522e77bb381d4f60c8/pypiwin32-219.zip (4.8 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/2p/c0c3rrys09b8c8y0rrkscn8r0000gn/T/pip-install-b18sn648/pypiwin32_0e47d8d13683441e9c213f629f92a95f/setup.py", line 121
          print "Building pywin32", pywin32_version
                ^
      SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Building pywin32", pywin32_version)?
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

解决需求场景:按员工表(csv/xls)批量进行ocr检测(例如识别核酸打卡)

有没有这种使用场景:我有一个员工表(csv或者Excel),我每天需要统计他们的核酸记录(每天自动从微信缓存文件夹中复制过来,文件名都是雪花主键)

每天需要对所有图片进行OCR识别出是谁,最后输出没有提交核酸记录的员工

目前想到的实现需要

  1. excel模块提供一个forEach函数,对特定列每一行的属性值进行给定操作(将一个回调函数作为参数传入)
  2. ocr模块实现对绿码的识别(现在已经实现了,通过ImgReader.classify()可以将图片分类为["24小时", "48小时", "72小时"]中的一个)
  3. ocr模块实现对特定文字的模糊匹配,例如给定员工名字总表,从一张截图模糊匹配出此人是谁(同上,已实现)
  4. files模块提供forEach函数,对某目录下的每一个文件执行给定操作(例如遍历微信图片缓存文件夹下的每一个图片)

复旦博士实现这个功能写了130行,我们的目标是让任何一个学过1小时python的人都能在13行内实现这个功能。

office.excel.excel2pdf方法只能转换第一个工作表.

# poexcel.api.excel
# line:71
# def excel2pdf(excel_path, pdf_path, sheet_id: int = 0):
#     mainExcel.excel2pdf(excel_path, pdf_path, sheet_id)

sheet_id设定了默认值0.
在office.api.excel.excel2pdf的定义种并没有提供sheet_id参数

# poexcel.core.ExcelType.MainExcel.excel2pdf
# line:149
# sheet = book.sheets[sheet_id]
# sheet.to_pdf(path=pdf_path_name, show=False)

这里仅读取了sheet_id对应的sheet并转换为pdf.由于sheet_id是固定值,因此只能转换首个工作表.
可以将 poexcel.core.ExcelType.MainExcel.excel2pdf line165:
sheet.to_pdf(path=pdf_path_name, show=False)
修改为:
book.to_pdf(path=pdf_path_name, show=False,include=sheet_id)
并且修改 poexcel.api.excel line:71
def excel2pdf(excel_path, pdf_path, sheet_id: int = 0):
为:
def excel2pdf(excel_path, pdf_path, sheet_id: int = None):

用 pyinstaller 打包exe后,执行报错

系统:win10
python版本:3.10
用 pyinstaller -F -w -i logoExe.ico test.py 打包为exe程序后,启动程序出错。
如果不导入“import office”,打包执行程序不会出错,定位到是python-office包的问题。
微信截图_20221018095440

添加单元测试

现在的贡献方式是在contributors文件夹下编辑各自的代码,再由核心维护者手动把功能整合进office文件夹中,再上传到PyPI上,这种方式有以下弊端:

  • 增加了核心维护者 @CoderWanFeng 进行code review的工作量
  • 贡献者代码质量难以保证,同时优质功能上线周期也长
  • 由于相对路径、相对导入存在一些坑,从contributors到主文件夹的迁移可能产生新的bug
  • office文件夹下现存的实现有的是半成品,有的有待优化,但大家不敢乱动,生怕向后不兼容

综上原因我建议,在根目录(与office文件夹)建一个tests文件夹,里面存储各模块的单元测试,
同时也改变一下贡献的方式,允许有把握的同学在不改变原有单元测试的前提下,直接commit到office目录,保证新增的功能也提供了有效的单元测试,测试通过后,在核心开发者认定代码质量够高后,即可直接merge并推送到PyPI,实现新功能的快速上线

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.