Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
openEuler-Advisor
提交
a2e55fb6
O
openEuler-Advisor
项目概览
openeuler
/
openEuler-Advisor
通知
32
Star
4
Fork
4
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openEuler-Advisor
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a2e55fb6
编写于
7月 09, 2020
作者:
S
solarhu
提交者:
Gitee
7月 09, 2020
浏览文件
操作
浏览文件
下载
差异文件
!38 File specification modification, including __init__ file description, single quote modification
Merge pull request !38 from gongzhengtang/master
上级
38857031
a14314a4
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
56 addition
and
25 deletion
+56
-25
packageship/packageship/application/__init__.py
packageship/packageship/application/__init__.py
+4
-4
packageship/packageship/application/apps/__init__.py
packageship/packageship/application/apps/__init__.py
+4
-0
packageship/packageship/application/initsystem/data_import.py
...ageship/packageship/application/initsystem/data_import.py
+9
-0
packageship/packageship/application/initsystem/datamerge.py
packageship/packageship/application/initsystem/datamerge.py
+1
-0
packageship/packageship/application/models/package.py
packageship/packageship/application/models/package.py
+6
-10
packageship/packageship/libs/__init__.py
packageship/packageship/libs/__init__.py
+4
-0
packageship/packageship/libs/dbutils/__init__.py
packageship/packageship/libs/dbutils/__init__.py
+5
-1
packageship/packageship/libs/exception/__init__.py
packageship/packageship/libs/exception/__init__.py
+4
-0
packageship/packageship/libs/log/__init__.py
packageship/packageship/libs/log/__init__.py
+4
-0
packageship/packageship/libs/log/loghelper.py
packageship/packageship/libs/log/loghelper.py
+10
-10
packageship/setup.py
packageship/setup.py
+5
-0
未找到文件。
packageship/packageship/application/__init__.py
浏览文件 @
a2e55fb6
#!/usr/bin/python3
'''
"""
Initial operation and configuration of the flask project
'''
"""
from
flask
import
Flask
from
flask_session
import
Session
from
packageship.application.settings
import
Config
...
...
@@ -11,9 +11,9 @@ OPERATION = None
def
init_app
(
operation
):
'''
"""
Project initialization function
'''
"""
app
=
Flask
(
__name__
)
# log configuration
...
...
packageship/packageship/application/apps/__init__.py
浏览文件 @
a2e55fb6
#!/usr/bin/python3
"""
Blueprint collection trying to page
"""
from
packageship.application.apps.package
import
package
,
api
as
package_api
blue_point
=
[
...
...
packageship/packageship/application/initsystem/data_import.py
浏览文件 @
a2e55fb6
...
...
@@ -59,6 +59,15 @@ class InitDataBase():
if
self
.
db_type
not
in
[
'mysql'
,
'sqlite'
]:
LOGGER
.
logger
.
error
(
"database type configuration error"
)
raise
Error
(
'database type configuration error'
)
self
.
_src_requires_dicts
=
dict
()
self
.
_bin_package_dicts
=
dict
()
self
.
_bin_package_name
=
dict
()
self
.
_bin_requires_dicts
=
dict
()
self
.
_bin_provides_dicts
=
dict
()
self
.
_src_packages
=
dict
()
self
.
_src_package_names
=
dict
()
self
.
_sqlite_db
=
None
self
.
requires
=
dict
()
def
__read_config_file
(
self
):
"""
...
...
packageship/packageship/application/initsystem/datamerge.py
浏览文件 @
a2e55fb6
...
...
@@ -40,6 +40,7 @@ class MergeData():
self
.
bin_provides_dicts
=
dict
()
self
.
bin_package_datas
=
[]
self
.
mainter_infos
=
dict
()
self
.
bin_requires_dicts
=
dict
()
@
staticmethod
def
__columns
(
cursor
):
...
...
packageship/packageship/application/models/package.py
浏览文件 @
a2e55fb6
...
...
@@ -10,7 +10,6 @@ from packageship.libs.dbutils.sqlalchemy_helper import DBHelper
class
src_pack
(
DBHelper
.
BASE
):
# pylint: disable=C0103,R0903
"""
Description: functional description:Source package model
modify record:
"""
__tablename__
=
'src_pack'
...
...
@@ -35,7 +34,6 @@ class src_pack(DBHelper.BASE): # pylint: disable=C0103,R0903
class
bin_pack
(
DBHelper
.
BASE
):
# pylint: disable=C0103,R0903
"""
Description: functional description:Binary package data
modify record:
"""
__tablename__
=
'bin_pack'
...
...
@@ -51,10 +49,9 @@ class bin_pack(DBHelper.BASE): # pylint: disable=C0103,R0903
class
pack_requires
(
DBHelper
.
BASE
):
# pylint: disable=C0103,R0903
'''
"""
functional description:
modify record:
'''
"""
__tablename__
=
'pack_requires'
...
...
@@ -72,10 +69,9 @@ class pack_requires(DBHelper.BASE): # pylint: disable=C0103,R0903
class
pack_provides
(
DBHelper
.
BASE
):
# pylint: disable=C0103,R0903
'''
"""
functional description:
modify record:
'''
"""
__tablename__
=
'pack_provides'
id
=
Column
(
Integer
,
primary_key
=
True
)
...
...
@@ -86,9 +82,9 @@ class pack_provides(DBHelper.BASE): # pylint: disable=C0103,R0903
class
maintenance_info
(
DBHelper
.
BASE
):
# pylint: disable=C0103,R0903
'''
"""
Maintain data related to person information
'''
"""
__tablename__
=
'maintenance_info'
id
=
Column
(
Integer
,
primary_key
=
True
)
...
...
packageship/packageship/libs/__init__.py
浏览文件 @
a2e55fb6
#!/usr/bin/python3
"""
Encapsulation of public class methods
"""
packageship/packageship/libs/dbutils/__init__.py
浏览文件 @
a2e55fb6
#!/usr/bin/python3
"""
Database access public class method
"""
from
.sqlalchemy_helper
import
DBHelper
__all__
=
[
'DBHelper'
]
\ No newline at end of file
__all__
=
[
'DBHelper'
]
packageship/packageship/libs/exception/__init__.py
浏览文件 @
a2e55fb6
#!/usr/bin/python3
"""
Customized exception information class
"""
from
packageship.libs.exception.ext
import
ContentNoneException
from
packageship.libs.exception.ext
import
DatabaseRepeatException
from
packageship.libs.exception.ext
import
DataMergeException
...
...
packageship/packageship/libs/log/__init__.py
浏览文件 @
a2e55fb6
#!/usr/bin/python3
"""
Common methods for logging
"""
from
packageship.libs.log.loghelper
import
setup_log
from
packageship.libs.log.loghelper
import
Log
...
...
packageship/packageship/libs/log/loghelper.py
浏览文件 @
a2e55fb6
#!/usr/bin/python3
'''
"""
Logging related
'''
"""
import
os
import
pathlib
import
logging
...
...
@@ -13,9 +13,9 @@ READCONFIG = ReadConfig()
def
setup_log
(
config
=
None
):
'''
"""
Log logging in the context of flask
'''
"""
if
config
:
logging
.
basicConfig
(
level
=
config
.
LOG_LEVEL
)
else
:
...
...
@@ -47,9 +47,9 @@ def setup_log(config=None):
class
Log
():
'''
"""
General log operations
'''
"""
def
__init__
(
self
,
name
=
__name__
,
path
=
None
):
self
.
__name
=
name
...
...
@@ -95,17 +95,17 @@ class Log():
self
.
__file_handler
.
setFormatter
(
formatter
)
def
close_handler
(
self
):
'''
"""
Turn off log processing
'''
"""
# self.__stream_handler.close()
self
.
__file_handler
.
close
()
@
property
def
logger
(
self
):
'''
"""
Get logs
'''
"""
self
.
__ini_handler
()
self
.
__set_handler
()
self
.
__set_formatter
()
...
...
packageship/setup.py
浏览文件 @
a2e55fb6
#!/usr/bin/python3
"""
Package management program installation configuration
file for software packaging
"""
from
distutils.core
import
setup
import
os
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录