Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
Lily Kuang committed Jun 20, 2023
2 parents 9638f31 + 6dba6e3 commit 2b3d969
Show file tree
Hide file tree
Showing 936 changed files with 45,884 additions and 49,597 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
name: Bug report
about: Create a report to help us improve Superset's stability! For feature requests please open a discussion at https://github.com/apache/superset/discussions/categories/ideas
labels: "#bug"

about: "Create a report to help us improve Superset's stability! For feature requests please open a discussion [here](https://github.com/apache/superset/discussions/categories/ideas)."
labels: bug
---

A clear and concise description of what the bug is.
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/cosmetic.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name: Cosmetic Issue
about: Describe a cosmetic issue with CSS, positioning, layout, labeling, or similar
labels: "cosmetic-issue"

---

## Screenshot
Expand Down
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/sip.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: SIP
about: Superset Improvement Proposal (See SIP-0: https://github.com/apache/superset/issues/5602)
labels: "#SIP"
about: "Superset Improvement Proposal. See [here](https://github.com/apache/superset/issues/5602) for details."
labels: sip
title: "[SIP] Your Title Here (do not add SIP number)"
asignees: "apache/superset-committers"

---

*Please make sure you are familiar with the SIP process documented*
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docker-ephemeral-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jobs:
secrets.AWS_SECRET_ACCESS_KEY != '' &&
secrets.AWS_SECRET_ACCESS_KEY != '') || '' }}" ]; then
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
echo "has secrets!"
else
echo "has-secrets=0" >> "$GITHUB_OUTPUT"
echo "no secrets!"
fi
docker_ephemeral_env:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
run: |
if [ -n "${{ (secrets.DOCKERHUB_USER != '' && secrets.DOCKERHUB_TOKEN != '') || '' }}" ]; then
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
echo "has secrets!"
else
echo "has-secrets=0" >> "$GITHUB_OUTPUT"
echo "no secrets!"
fi
docker-build:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/superset-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
if: steps.check.outcome == 'failure'
working-directory: ./superset-frontend
run: |
npm run lint
npm run lint -- --quiet
npm run prettier-check
- name: Build plugins packages
if: steps.check.outcome == 'failure'
Expand All @@ -60,7 +60,7 @@ jobs:
if: steps.check.outcome == 'failure'
working-directory: ./superset-frontend
run: |
npm run test -- --coverage
npm run test -- --coverage --silent
# todo: remove this step when fix generator as a project in root jest.config.js
- name: generator-superset unit tests
if: steps.check.outcome == 'failure'
Expand Down
22 changes: 18 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,28 @@
# limitations under the License.
#
repos:
- repo: https://github.com/MarcoGorelli/auto-walrus
rev: v0.2.2
hooks:
- id: auto-walrus
- repo: https://github.com/asottile/pyupgrade
rev: v3.4.0
hooks:
- id: pyupgrade
args:
- --py39-plus
- repo: https://github.com/hadialqattan/pycln
rev: v2.1.2
hooks:
- id: pycln
args:
- --disable-all-dunder-policy
- --exclude=superset/config.py
- --extend-exclude=tests/integration_tests/superset_test_config.*.py
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/MarcoGorelli/auto-walrus
rev: v0.2.2
hooks:
- id: auto-walrus
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
hooks:
Expand Down
14 changes: 6 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsume
```
Then put this:
```bash
export NODE_OPTIONS=--no-experimental-fetch`
export NODE_OPTIONS=--no-experimental-fetch
```

#### Webpack dev server
Expand Down Expand Up @@ -1403,13 +1403,11 @@ Note not all fields are correctly categorized. The fields vary based on visualiz

### Time

| Field | Type | Notes |
| ------------------- | -------- | ------------------------------------- |
| `druid_time_origin` | _string_ | The Druid **Origin** widget |
| `granularity` | _string_ | The Druid **Time Granularity** widget |
| `granularity_sqla` | _string_ | The SQLA **Time Column** widget |
| `time_grain_sqla` | _string_ | The SQLA **Time Grain** widget |
| `time_range` | _string_ | The **Time range** widget |
| Field | Type | Notes |
| ------------------ | -------- | ------------------------------------- |
| `granularity_sqla` | _string_ | The SQLA **Time Column** widget |
| `time_grain_sqla` | _string_ | The SQLA **Time Grain** widget |
| `time_range` | _string_ | The **Time range** widget |

### GROUP BY

Expand Down
29 changes: 15 additions & 14 deletions RELEASING/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
import os
import re
import sys
from collections.abc import Iterator
from dataclasses import dataclass
from typing import Any, Dict, Iterator, List, Optional, Union
from typing import Any, Optional, Union

import click
from click.core import Context
Expand Down Expand Up @@ -67,15 +68,15 @@ class GitChangeLog:
def __init__(
self,
version: str,
logs: List[GitLog],
logs: list[GitLog],
access_token: Optional[str] = None,
risk: Optional[bool] = False,
) -> None:
self._version = version
self._logs = logs
self._pr_logs_with_details: Dict[int, Dict[str, Any]] = {}
self._github_login_cache: Dict[str, Optional[str]] = {}
self._github_prs: Dict[int, Any] = {}
self._pr_logs_with_details: dict[int, dict[str, Any]] = {}
self._github_login_cache: dict[str, Optional[str]] = {}
self._github_prs: dict[int, Any] = {}
self._wait = 10
github_token = access_token or os.environ.get("GITHUB_TOKEN")
self._github = Github(github_token)
Expand Down Expand Up @@ -126,7 +127,7 @@ def _has_commit_migrations(self, git_sha: str) -> bool:
"superset/migrations/versions/" in file.filename for file in commit.files
)

def _get_pull_request_details(self, git_log: GitLog) -> Dict[str, Any]:
def _get_pull_request_details(self, git_log: GitLog) -> dict[str, Any]:
pr_number = git_log.pr_number
if pr_number:
detail = self._pr_logs_with_details.get(pr_number)
Expand Down Expand Up @@ -156,7 +157,7 @@ def _get_pull_request_details(self, git_log: GitLog) -> Dict[str, Any]:

return detail

def _is_risk_pull_request(self, labels: List[Any]) -> bool:
def _is_risk_pull_request(self, labels: list[Any]) -> bool:
for label in labels:
risk_label = re.match(SUPERSET_RISKY_LABELS, label.name)
if risk_label is not None:
Expand All @@ -174,8 +175,8 @@ def _get_changelog_version_head(self) -> str:

def _parse_change_log(
self,
changelog: Dict[str, str],
pr_info: Dict[str, str],
changelog: dict[str, str],
pr_info: dict[str, str],
github_login: str,
) -> None:
formatted_pr = (
Expand Down Expand Up @@ -227,7 +228,7 @@ def __repr__(self) -> str:
result += f"**{key}** {changelog[key]}\n"
return result

def __iter__(self) -> Iterator[Dict[str, Any]]:
def __iter__(self) -> Iterator[dict[str, Any]]:
for log in self._logs:
yield {
"pr_number": log.pr_number,
Expand All @@ -250,20 +251,20 @@ class GitLogs:

def __init__(self, git_ref: str) -> None:
self._git_ref = git_ref
self._logs: List[GitLog] = []
self._logs: list[GitLog] = []

@property
def git_ref(self) -> str:
return self._git_ref

@property
def logs(self) -> List[GitLog]:
def logs(self) -> list[GitLog]:
return self._logs

def fetch(self) -> None:
self._logs = list(map(self._parse_log, self._git_logs()))[::-1]

def diff(self, git_logs: "GitLogs") -> List[GitLog]:
def diff(self, git_logs: "GitLogs") -> list[GitLog]:
return [log for log in git_logs.logs if log not in self._logs]

def __repr__(self) -> str:
Expand All @@ -284,7 +285,7 @@ def _git_checkout(self, git_ref: str) -> None:
print(f"Could not checkout {git_ref}")
sys.exit(1)

def _git_logs(self) -> List[str]:
def _git_logs(self) -> list[str]:
# let's get current git ref so we can revert it back
current_git_ref = self._git_get_current_head()
self._git_checkout(self._git_ref)
Expand Down
6 changes: 3 additions & 3 deletions RELEASING/from_tarball_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ superset fab create-admin \
# Initialize the database
superset db upgrade

# Loading examples
superset load_examples

# Create default roles and permissions
superset init

# Loading examples
superset load-examples --force

FLASK_ENV=development FLASK_APP="superset.app:create_app()" \
flask run -p 8088 --with-threads --reload --debugger --host=0.0.0.0
8 changes: 4 additions & 4 deletions RELEASING/generate_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from typing import Any, Dict, List
from typing import Any

from click.core import Context

Expand All @@ -34,7 +34,7 @@
PROJECT_DESCRIPTION = "Apache Superset is a modern, enterprise-ready business intelligence web application"


def string_comma_to_list(message: str) -> List[str]:
def string_comma_to_list(message: str) -> list[str]:
if not message:
return []
return [element.strip() for element in message.split(",")]
Expand All @@ -52,15 +52,15 @@ def render_template(template_file: str, **kwargs: Any) -> str:
return template.render(kwargs)


class BaseParameters(object):
class BaseParameters:
def __init__(
self,
version: str,
version_rc: str,
) -> None:
self.version = version
self.version_rc = version_rc
self.template_arguments: Dict[str, Any] = {}
self.template_arguments: dict[str, Any] = {}

def __repr__(self) -> str:
return f"Apache Credentials: {self.version}/{self.version_rc}"
Expand Down
4 changes: 2 additions & 2 deletions RESOURCES/FEATURE_FLAGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ These features are considered **unfinished** and should only be used on developm
[//]: # "PLEASE KEEP THE LIST SORTED ALPHABETICALLY"

- ENABLE_ADVANCED_DATA_TYPES
- ENABLE_TEMPLATE_REMOVE_FILTERS
- KV_STORE
- PRESTO_EXPAND_DATA
- SHARE_QUERIES_VIA_KV_STORE
Expand Down Expand Up @@ -56,7 +55,6 @@ These features are **finished** but currently being tested. They are usable, but
- RLS_IN_SQLLAB
- SSH_TUNNELING [(docs)](https://superset.apache.org/docs/installation/setup-ssh-tunneling)
- USE_ANALAGOUS_COLORS
- VERSIONED_EXPORT

## Stable

Expand Down Expand Up @@ -95,5 +93,7 @@ These features flags currently default to True and **will be removed in a future
- DISABLE_DATASET_SOURCE_EDIT
- ENABLE_EXPLORE_DRAG_AND_DROP
- ENABLE_EXPLORE_JSON_CSRF_PROTECTION
- ENABLE_TEMPLATE_REMOVE_FILTERS
- GENERIC_CHART_AXES
- REMOVE_SLICE_LEVEL_LABEL_COLORS
- VERSIONED_EXPORT
9 changes: 5 additions & 4 deletions RESOURCES/INTHEWILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,20 @@ Join our growing community!
- [Windsor.ai](https://www.windsor.ai/) [@octaviancorlade]
- [Zeta](https://www.zeta.tech/) [@shaikidris]

### Entertainment
### Media & Entertainment
- [6play](https://www.6play.fr) [@CoryChaplin]
- [bilibili](https://www.bilibili.com) [@Moinheart]
- [BurdaForward](https://www.burda-forward.de/en/)
- [Douban](https://www.douban.com/) [@luchuan]
- [Kuaishou](https://www.kuaishou.com/) [@zhaoyu89730105]
- [Netflix](https://www.netflix.com/)
- [Prensa Iberica](https://www.prensaiberica.es/) [@zamar-roura]
- [TME QQMUSIC/WESING](https://www.tencentmusic.com/)[@shenyuanli,@marklaw]
- [Xite](https://xite.com/) [@shashankkoppar]
- [Zaihang](http://www.zaih.com/)



### Education
- [Brilliant.org](https://brilliant.org/)
- [Platzi.com](https://platzi.com/)
Expand Down Expand Up @@ -156,9 +160,6 @@ Join our growing community!
- [Swile](https://www.swile.co/) [@PaoloTerzi]
- [Symmetrics](https://www.symmetrics.fyi)

### News
- [Prensa Iberica](https://www.prensaiberica.es/) [@zamar-roura]

### Government
- [City of Ann Arbor, MI](https://www.a2gov.org/) [@sfirke]

Expand Down
Loading

0 comments on commit 2b3d969

Please sign in to comment.