You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2024/04/03 19:55:22 UTC
(superset) 01/01: chore: consolidate the Superset python package metadata
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch rm_setup_cfg
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 32458d8ee27b0a67161f18810b57ef46b9f85f49
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Wed Apr 3 12:42:22 2024 -0700
chore: consolidate the Superset python package metadata
Following up on https://github.com/apache/superset/pull/27859, where
I introduced a new file `pyproject.toml` to set up the
python project metadata, here I'd like to consolidate and modernize
further by pushing as much as possible into pyproject.toml,
except where things need to be dynamic, for which we'll keep using
setup.py:
- get rid of setup.cfg, everything there should be able to move to
pyproject.toml
- remove duplicate keys from setup.py and pyproject.toml
- minimize/simplify setup.py
---
pyproject.toml | 31 ++++++++++++++++++++++++++++++-
setup.cfg | 52 ----------------------------------------------------
setup.py | 9 +--------
3 files changed, 31 insertions(+), 61 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 7a77fcb9db..641bcaecdb 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -23,7 +23,9 @@ build-backend = "setuptools.build_meta"
name = "apache-superset"
description = "A modern, enterprise-ready business intelligence web application"
readme = "README.md"
-dynamic = ["version", "scripts", "entry-points", "license", "requires-python"]
+dynamic = ["version", "scripts", "entry-points"]
+requires-python = "~=3.9"
+license = { file="LICENSE.txt" }
authors = [
{ name = "Apache Software Foundation", email = "dev@superset.apache.org" },
]
@@ -197,3 +199,30 @@ development = [
[project.urls]
homepage = "https://superset.apache.org/"
documentation = "https://superset.apache.org/docs/intro"
+
+
+[tool.isort]
+combine_as_imports = true
+include_trailing_comma = true
+line_length = 88
+known_first_party = "superset"
+known_third_party = "alembic, apispec, backoff, celery, click, colorama, cron_descriptor, croniter, cryptography, dateutil, deprecation, flask, flask_appbuilder, flask_babel, flask_caching, flask_compress, flask_jwt_extended, flask_login, flask_migrate, flask_sqlalchemy, flask_talisman, flask_testing, flask_wtf, freezegun, geohash, geopy, holidays, humanize, isodate, jinja2, jwt, markdown, markupsafe, marshmallow, msgpack, nh3, numpy, pandas, parameterized, parsedatetime, pgsanity, pkg_r [...]
+multi_line_output = 3
+order_by_type = false
+
+[tool.mypy]
+check_untyped_defs = true
+disallow_any_generics = true
+disallow_untyped_calls = true
+disallow_untyped_defs = true
+ignore_missing_imports = true
+no_implicit_optional = true
+warn_unused_ignores = true
+
+[tool.mypy."superset.migrations.versions.*"]
+ignore_errors = true
+
+[tool.mypy."tests.*"]
+check_untyped_defs = false
+disallow_untyped_calls = false
+disallow_untyped_defs = false
diff --git a/setup.cfg b/setup.cfg
deleted file mode 100644
index 0d7c0b655f..0000000000
--- a/setup.cfg
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-[metadata]
-name = Superset
-summary = a data exploration platform
-description_file = README.md
-author = Apache Superset Dev
-author_email = dev@superset.apache.org
-license = Apache License, Version 2.0
-
-[files]
-packages = superset
-
-[isort]
-combine_as_imports = true
-include_trailing_comma = true
-line_length = 88
-known_first_party = superset
-known_third_party =alembic,apispec,backoff,celery,click,colorama,cron_descriptor,croniter,cryptography,dateutil,deprecation,flask,flask_appbuilder,flask_babel,flask_caching,flask_compress,flask_jwt_extended,flask_login,flask_migrate,flask_sqlalchemy,flask_talisman,flask_testing,flask_wtf,freezegun,geohash,geopy,holidays,humanize,isodate,jinja2,jwt,markdown,markupsafe,marshmallow,msgpack,nh3,numpy,pandas,parameterized,parsedatetime,pgsanity,pkg_resources,polyline,prison,progress,pyarrow,s [...]
-multi_line_output = 3
-order_by_type = false
-
-[mypy]
-check_untyped_defs = true
-disallow_any_generics = true
-disallow_untyped_calls = true
-disallow_untyped_defs = true
-ignore_missing_imports = true
-no_implicit_optional = true
-warn_unused_ignores = true
-
-[mypy-superset.migrations.versions.*]
-ignore_errors = true
-
-[mypy-tests.*]
-check_untyped_defs = false
-disallow_untyped_calls = false
-disallow_untyped_defs = false
diff --git a/setup.py b/setup.py
index 47502c0823..4a7247a3a9 100644
--- a/setup.py
+++ b/setup.py
@@ -23,12 +23,10 @@ from setuptools import find_packages, setup
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
PACKAGE_JSON = os.path.join(BASE_DIR, "superset-frontend", "package.json")
+
with open(PACKAGE_JSON) as package_file:
version_string = json.load(package_file)["version"]
-with open("README.md", encoding="utf-8") as f:
- long_description = f.read()
-
def get_git_sha() -> str:
try:
@@ -54,10 +52,6 @@ with open(VERSION_INFO_FILE, "w") as version_file:
version_string = version_string.replace("-dev", ".dev0")
setup(
- name="apache-superset",
- description="A modern, enterprise-ready business intelligence web application",
- long_description=long_description,
- long_description_content_type="text/markdown",
version=version_string,
packages=find_packages(),
include_package_data=True,
@@ -75,6 +69,5 @@ setup(
"superset=superset.extensions.metadb:SupersetShillelaghAdapter"
],
},
- python_requires="~=3.9",
download_url="https://www.apache.org/dist/superset/" + version_string,
)