mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
improvement: maintain project meta data all in pyproject.toml
1, remove __about__.py 2, project version and description are all configured in pyproject.toml
This commit is contained in:
@@ -1,9 +0,0 @@
|
|||||||
__title__ = 'HttpRunner'
|
|
||||||
__description__ = 'One-stop solution for HTTP(S) testing.'
|
|
||||||
__url__ = 'https://github.com/HttpRunner/HttpRunner'
|
|
||||||
__version__ = '2.2.4'
|
|
||||||
__author__ = 'debugtalk'
|
|
||||||
__author_email__ = 'mail@debugtalk.com'
|
|
||||||
__license__ = 'Apache-2.0'
|
|
||||||
__copyright__ = 'Copyright 2017 debugtalk'
|
|
||||||
__cake__ = u'\u2728 \U0001f370 \u2728'
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import configparser
|
||||||
|
import json
|
||||||
|
|
||||||
|
cf_parser = configparser.ConfigParser(allow_no_value=True)
|
||||||
|
cf_parser.read("pyproject.toml")
|
||||||
|
__version__ = json.loads(cf_parser["tool.poetry"]["version"])
|
||||||
|
__description__ = json.loads(cf_parser["tool.poetry"]["description"])
|
||||||
|
|
||||||
|
__all__ = ["__version__", "__description__"]
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ def main_hrun():
|
|||||||
"""
|
"""
|
||||||
import argparse
|
import argparse
|
||||||
from httprunner import logger
|
from httprunner import logger
|
||||||
from httprunner.__about__ import __description__, __version__
|
from httprunner import __description__, __version__
|
||||||
from httprunner.api import HttpRunner
|
from httprunner.api import HttpRunner
|
||||||
from httprunner.compat import is_py2
|
from httprunner.compat import is_py2
|
||||||
from httprunner.validator import validate_json_file
|
from httprunner.validator import validate_json_file
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ from collections import Iterable
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from httprunner import loader, logger
|
from httprunner import __version__, loader, logger
|
||||||
from httprunner.__about__ import __version__
|
|
||||||
from httprunner.compat import basestring, bytes, json, numeric_types
|
from httprunner.compat import basestring, bytes, json, numeric_types
|
||||||
from jinja2 import Template, escape
|
from jinja2 import Template, escape
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ version = "2.2.4"
|
|||||||
description = "One-stop solution for HTTP(S) testing."
|
description = "One-stop solution for HTTP(S) testing."
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = ["debugtalk <mail@debugtalk.com>"]
|
authors = ["debugtalk <debugtalk@gmail.com>"]
|
||||||
|
|
||||||
homepage = "https://github.com/HttpRunner/HttpRunner"
|
homepage = "https://github.com/HttpRunner/HttpRunner"
|
||||||
repository = "https://github.com/HttpRunner/HttpRunner"
|
repository = "https://github.com/HttpRunner/HttpRunner"
|
||||||
|
|||||||
Reference in New Issue
Block a user