Skip to content

Commit

Permalink
chore: pre-commit run --all-files (apache#10500)
Browse files Browse the repository at this point in the history
Co-authored-by: John Bodley <[email protected]>
  • Loading branch information
john-bodley and John Bodley authored Aug 2, 2020
1 parent ce10e13 commit 821916a
Show file tree
Hide file tree
Showing 48 changed files with 106 additions and 113 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/license-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
run: |
set -eo pipefail
if [[ "${{github.event_name}}" != "pull_request" ]]; then
if [[ "${{github.event_name}}" != "pull_request" ]]; then
./scripts/fossa.sh
exit 0
fi
Expand All @@ -30,7 +30,7 @@ jobs:
cat<<EOF
CHANGED FILES:
$FILES
EOF
if [[ "${FILES}" =~ (.*package*\.json|requirements.*\.txt|setup\.py) ]]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prefer_typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
msg: |
### WARNING: Prefer TypeScript
Looks like your PR contains new `.js` or `.jsx` files:
```
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ repos:
- id: check-docstring-first
- id: check-added-large-files
- id: check-yaml
exclude: ^helm/superset/templates/
- id: debug-statements
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ See [`superset-frontend/cypress_build.sh`](https://github.com/apache/incubator-s

### Storybook

Superset includes a [Storybook](https://storybook.js.org/) to preview the layout/styling of various Superset components, and variations thereof. To open and view the Storybook:
Superset includes a [Storybook](https://storybook.js.org/) to preview the layout/styling of various Superset components, and variations thereof. To open and view the Storybook:

```bash
cd superset-frontend
Expand Down
2 changes: 1 addition & 1 deletion DISCLAIMER
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ have stabilized in a manner consistent with other successful ASF projects.

While incubation status is not necessarily a reflection of the completeness or
stability of the code, it does indicate that the project has yet to be fully
endorsed by the ASF.
endorsed by the ASF.
33 changes: 16 additions & 17 deletions INTHEWILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Join our growing community!


### Sharing Economy
- [Airbnb](https://github.com/airbnb)
- [Airbnb](https://github.com/airbnb)
- [Faasos](http://faasos.com/) [@shashanksingh]
- [Hostnfly](https://www.hostnfly.com/) [@alexisrosuel]
- [Lime](https://www.limebike.com/) [@cxmcc]
Expand All @@ -37,11 +37,11 @@ Join our growing community!
- [Aktia Bank plc](https://www.aktia.com) [@villebro]
- [American Express](https://www.americanexpress.com) [@TheLastSultan]
- [Capital Service S.A.](http://capitalservice.pl) [@pkonarzewski]
- [Clark.de](http://clark.de/)
- [Clark.de](http://clark.de/)

### Gaming
- [Digit Game Studios](https://www.digitgaming.com/)
- [Popoko VM Games Studio](https://popoko.live)
- [Popoko VM Games Studio](https://popoko.live)

### E-Commerce
- [AiHello](https://www.aihello.com) [@ganeshkrishnan1]
Expand All @@ -52,7 +52,7 @@ Join our growing community!
- [HuiShouBao](http://www.huishoubao.com/) [@Yukinoshita-Yukino]
- [Now](https://www.now.vn/) [@davidkohcw]
- [Qunar](https://www.qunar.com/) [@flametest]
- [Rakuten Viki](https://www.viki.com)
- [Rakuten Viki](https://www.viki.com)
- [Shopee](https://shopee.sg) [@xiaohanyu]
- [Shopkick](https://www.shopkick.com) [@LAlbertalli]
- [Tails.com](https://tails.com) [@alanmcruickshank]
Expand All @@ -66,25 +66,25 @@ Join our growing community!
- [Cloudsmith](https://cloudsmith.io) [@alancarson]
- [CnOvit](http://www.cnovit.com/) [@xieshaohu]
- [Deepomatic](https://deepomatic.com/) [@Zanoellia]
- [Dial Once](https://www.dial-once.com/)
- [Dial Once](https://www.dial-once.com/)
- [Dremio](https://dremio.com) [@narendrans]
- [ELMO Cloud HR & Payroll](https://elmosoftware.com.au/)
- [Endress+Hauser](http://www.endress.com/) [@rumbin]
- [FBK - ICT center](http://ict.fbk.eu)
- [FBK - ICT center](http://ict.fbk.eu)
- [GfK Data Lab](http://datalab.gfk.com) [@mherr]
- [GrowthSimple](https://growthsimple.ai/)
- [Intercom](https://www.intercom.com/) [@kate-gallo]
- [jampp](https://jampp.com/)
- [jampp](https://jampp.com/)
- [Konfío](http://konfio.mx) [@uis-rodriguez]
- [Myra Labs](http://www.myralabs.com/) [@viksit]
- [Nielsen](http://www.nielsen.com/) [@amitNielsen]
- [Ona](https://ona.io) [@pld]
- [Peak AI](https://www.peak.ai/) [@azhar22k]
- [PeopleDoc](https://www.people-doc.com) [@rodo]
- [Preset, Inc.](https://preset.io)
- [Preset, Inc.](https://preset.io)
- [Pronto Tools](http://www.prontotools.io) [@zkan]
- [PubNub](https://pubnub.com) [@jzucker2]
- [Reward Gateway](https://www.rewardgateway.com)
- [Reward Gateway](https://www.rewardgateway.com)
- [ScopeAI](https://www.getscopeai.com) [@iloveluce]
- [Showmax](https://tech.showmax.com) [@bobek]
- [source{d}](https://www.sourced.tech) [@marnovo]
Expand All @@ -102,11 +102,11 @@ Join our growing community!
- [Douban](https://www.douban.com/) [@luchuan]
- [Kuaishou](https://www.kuaishou.com/) [@zhaoyu89730105]
- [Netflix](https://www.netflix.com/)
- [TME QQMUSIC/WESING](https://www.tencentmusic.com/)
- [TME QQMUSIC/WESING](https://www.tencentmusic.com/)
- [Zaihang](http://www.zaih.com/)

### Education
- [Brilliant.org](https://brilliant.org/)
- [Brilliant.org](https://brilliant.org/)
- [Udemy](https://www.udemy.com/) [@sungjuly]
- [VIPKID](https://www.vipkid.com.cn/) [@illpanda]

Expand All @@ -120,14 +120,13 @@ Join our growing community!
- [Amino](https://amino.com) [@shkr]
- [Living Goods](https://www.livinggoods.org) [@chelule]
- [Maieutical Labs](https://maieuticallabs.it) [@xrmx]
- [QPID Health](http://www.qpidhealth.com/)
- [QPID Health](http://www.qpidhealth.com/)
- [TrustMedis](https://trustmedis.com) [@famasya]
- [WeSure](https://www.wesure.cn/)

### Others
- [Grassroot](https://www.grassrootinstitute.org/)
- [Grassroot](https://www.grassrootinstitute.org/)
- [komoot](https://www.komoot.com/) [@christophlingg]
- [Let's Roam](https://www.letsroam.com/)
- [Twitter](https://twitter.com/)
- [Yahoo!](https://yahoo.com/)

- [Let's Roam](https://www.letsroam.com/)
- [Twitter](https://twitter.com/)
- [Yahoo!](https://yahoo.com/)
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,4 @@ Third party SIL Open Font License v1.1 (OFL-1.1)
========================================================================

(SIL OPEN FONT LICENSE Version 1.1) The Inter font family (https://github.com/rsms/inter)
(SIL OPEN FONT LICENSE Version 1.1) The Fira Code font family (https://github.com/tonsky/FiraCode)
(SIL OPEN FONT LICENSE Version 1.1) The Fira Code font family (https://github.com/tonsky/FiraCode)
8 changes: 4 additions & 4 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ under the License.

# Getting Started with Superset using Docker

Docker is an easy way to get started with Superset.
Docker is an easy way to get started with Superset.

## Prerequisites

Expand All @@ -28,8 +28,8 @@ Docker is an easy way to get started with Superset.

## Configuration

The `/app/pythonpath` folder is mounted from [./docker/pythonpath_dev](./docker/pythonpath_dev)
which contains a base configuration [./docker/pythonpath/superset_config.py](./docker/pythonpath/superset_config.py)
The `/app/pythonpath` folder is mounted from [./docker/pythonpath_dev](./docker/pythonpath_dev)
which contains a base configuration [./docker/pythonpath/superset_config.py](./docker/pythonpath/superset_config.py)
intended for use with local development.

### Local overrides
Expand Down Expand Up @@ -62,7 +62,7 @@ To run the container, simply run:
docker-compose up
```

After several minutes for superset initialization to finish, you can open a browser and view [`http://localhost:8088`](http://localhost:8088)
After several minutes for superset initialization to finish, you can open a browser and view [`http://localhost:8088`](http://localhost:8088)
to start your journey.

## Developing
Expand Down
1 change: 0 additions & 1 deletion docs/import_export_datasources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,3 @@ by saving the following YAML to file and then running the ``import_datasources``
columns:
- column_name: ds
verbose_name: datetime

32 changes: 16 additions & 16 deletions docs/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,21 +159,21 @@ permissions that were attributed.
Restricting access to a subset of a particular table
""""""""""""""""""""""""""""""""""""""""""""""""""""

Using ``Row level security filters`` (under the ``Security`` menu) you can create
filters that are assigned to a particular table, as well as a set of roles.
Say people in your finance department should only have access to rows where
``department = "finance"``. You could create a ``Row level security filter``
with that clause, and assign it to your ``Finance`` role, as well as the
Using ``Row level security filters`` (under the ``Security`` menu) you can create
filters that are assigned to a particular table, as well as a set of roles.
Say people in your finance department should only have access to rows where
``department = "finance"``. You could create a ``Row level security filter``
with that clause, and assign it to your ``Finance`` role, as well as the
applicable table.

The ``clause`` field can contain arbitrary text which is then added to the generated
SQL statement's ``WHERE`` clause. So you could even do something like create a
filter for the last 30 days and apply it to a specific role, with a clause like
``date_field > DATE_SUB(NOW(), INTERVAL 30 DAY)``. It can also support multiple
conditions: ``client_id = 6 AND advertiser="foo"``, etc.

All relevant ``Row level security filters`` will be ANDed together, so it's
possible to create a situation where two roles conflict in such a way as to
limit a table subset to empty. For example, the filters ``client_id=4`` and
and ``client_id=5``, applied to a role, will result in users of that role having
``client_id=4 AND client_id=5`` added to their query, which can never be true.
The ``clause`` field can contain arbitrary text which is then added to the generated
SQL statement's ``WHERE`` clause. So you could even do something like create a
filter for the last 30 days and apply it to a specific role, with a clause like
``date_field > DATE_SUB(NOW(), INTERVAL 30 DAY)``. It can also support multiple
conditions: ``client_id = 6 AND advertiser="foo"``, etc.

All relevant ``Row level security filters`` will be ANDed together, so it's
possible to create a situation where two roles conflict in such a way as to
limit a table subset to empty. For example, the filters ``client_id=4`` and
and ``client_id=5``, applied to a role, will result in users of that role having
``client_id=4 AND client_id=5`` added to their query, which can never be true.
2 changes: 1 addition & 1 deletion helm/superset/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ dependencies:
- name: redis
version: 10.3.4
repository: https://kubernetes-charts.storage.googleapis.com/
condition: redis.enabled
condition: redis.enabled
2 changes: 1 addition & 1 deletion helm/superset/templates/secret-superset-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ metadata:
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
type: Opaque
data:
data:
superset_config.py: {{ include "superset-config" . | b64enc }}
superset_init.sh: {{ tpl .Values.init.initscript . | b64enc }}
superset_bootstrap.sh: {{ include "superset-bootstrap" . | b64enc }}
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ tox==3.11.1
pillow==7.0.0
openpyxl==3.0.3 # Pandas use openpyxl to write excel format(using in unittes)
xlrd==1.2.0

6 changes: 3 additions & 3 deletions scripts/permissions_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
def cleanup_permissions():
# 1. Clean up duplicates.
pvms = sm.get_session.query(sm.permissionview_model).all()
print('# of permission view menues is: {}'.format(len(pvms)))
print("# of permission view menues is: {}".format(len(pvms)))
pvms_dict = defaultdict(list)
for pvm in pvms:
pvms_dict[(pvm.permission, pvm.view_menu)].append(pvm)
Expand All @@ -39,7 +39,7 @@ def cleanup_permissions():
sm.get_session.commit()

pvms = sm.get_session.query(sm.permissionview_model).all()
print('STage 1: # of permission view menues is: {}'.format(len(pvms)))
print("STage 1: # of permission view menues is: {}".format(len(pvms)))

# 2. Clean up None permissions or view menues
pvms = sm.get_session.query(sm.permissionview_model).all()
Expand All @@ -49,7 +49,7 @@ def cleanup_permissions():
sm.get_session.commit()

pvms = sm.get_session.query(sm.permissionview_model).all()
print('Stage 2: # of permission view menues is: {}'.format(len(pvms)))
print("Stage 2: # of permission view menues is: {}".format(len(pvms)))

# 3. Delete empty permission view menues from roles
roles = sm.get_session.query(sm.role_model).all()
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ module.exports = {
},
plugins: [...config.plugins, ...customConfig.plugins],
}),
};
};
2 changes: 1 addition & 1 deletion superset-frontend/.storybook/preview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ const themeDecorator = storyFn => (
);

addDecorator(jsxDecorator);
addDecorator(themeDecorator);
addDecorator(themeDecorator);
2 changes: 1 addition & 1 deletion superset-frontend/fonts/FiraCode/specimen.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/

@font-face {
font-family: 'Fira Code';
src: url('woff2/FiraCode-Light.woff2') format('woff2'),
Expand Down
6 changes: 3 additions & 3 deletions superset-frontend/images/icons/cancel-x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions superset-frontend/images/icons/checkbox-half.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions superset-frontend/images/icons/checkbox-off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions superset-frontend/images/icons/checkbox-on.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions superset-frontend/images/icons/compass.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions superset-frontend/images/icons/dataset_physical.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions superset-frontend/images/icons/dataset_virtual.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions superset-frontend/images/icons/error.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 821916a

Please sign in to comment.