Skip to content

Commit

Permalink
chore: deprecate tox in favor of act
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Jun 28, 2024
1 parent 5c9352f commit c0501e3
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 197 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
docker/**/*.sh text eol=lf
*.ipynb binary
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
build_preset: ${{fromJson(needs.setup_matrix.outputs.matrix_config)}}
build_preset: ${{ fromJson(github.event_name == 'pull_request' && '["dev"]' || '["dev", "lean", "py310", "websocket", "dockerize"]') }}
fail-fast: false
env:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
Expand Down
164 changes: 0 additions & 164 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ development = [
"ruff",
"sqloxide",
"statsd",
"tox",
]

[project.urls]
Expand Down Expand Up @@ -230,169 +229,6 @@ check_untyped_defs = false
disallow_untyped_calls = false
disallow_untyped_defs = false

[tool.tox]
legacy_tox_ini = """
# Remember to start celery workers to run celery tests, e.g.
# celery --app=superset.tasks.celery_app:app worker -Ofair -c 2
[testenv]
basepython = python3.10
ignore_basepython_conflict = true
commands =
superset db upgrade
superset init
superset load-test-users
# use -s to be able to use break pointers.
# no args or tests/* can be passed as an argument to run all tests
pytest -s {posargs}
deps =
-rrequirements/development.txt
setenv =
PYTHONPATH = {toxinidir}
SUPERSET_TESTENV = true
SUPERSET_CONFIG = tests.integration_tests.superset_test_config
SUPERSET_HOME = {envtmpdir}
mysql: SUPERSET__SQLALCHEMY_DATABASE_URI = mysql://mysqluser:mysqluserpassword@localhost/superset?charset=utf8
postgres: SUPERSET__SQLALCHEMY_DATABASE_URI = postgresql+psycopg2://superset:superset@localhost/test
sqlite: SUPERSET__SQLALCHEMY_DATABASE_URI = sqlite:////{envtmpdir}/superset.db
sqlite: SUPERSET__SQLALCHEMY_EXAMPLES_URI = sqlite:////{envtmpdir}/examples.db
mysql-presto: SUPERSET__SQLALCHEMY_DATABASE_URI = mysql://mysqluser:mysqluserpassword@localhost/superset?charset=utf8
# docker run -p 8080:8080 --name presto starburstdata/presto
mysql-presto: SUPERSET__SQLALCHEMY_EXAMPLES_URI = presto://localhost:8080/memory/default
# based on https://github.com/big-data-europe/docker-hadoop
# clone the repo & run docker compose up -d to test locally
mysql-hive: SUPERSET__SQLALCHEMY_DATABASE_URI = mysql://mysqluser:mysqluserpassword@localhost/superset?charset=utf8
mysql-hive: SUPERSET__SQLALCHEMY_EXAMPLES_URI = hive://localhost:10000/default
# make sure that directory is accessible by docker
hive: UPLOAD_FOLDER = /tmp/.superset/app/static/uploads/
usedevelop = true
allowlist_externals =
npm
pkill
[testenv:cypress]
setenv =
PYTHONPATH = {toxinidir}
SUPERSET_TESTENV = true
SUPERSET_CONFIG = tests.integration_tests.superset_test_config
SUPERSET_HOME = {envtmpdir}
commands =
npm install -g npm@'>=6.5.0'
pip install -e {toxinidir}/
{toxinidir}/superset-frontend/cypress_build.sh
commands_post =
pkill -if "python {envbindir}/flask"
[testenv:cypress-dashboard]
setenv =
PYTHONPATH = {toxinidir}
SUPERSET_TESTENV = true
SUPERSET_CONFIG = tests.integration_tests.superset_test_config
SUPERSET_HOME = {envtmpdir}
commands =
npm install -g npm@'>=6.5.0'
pip install -e {toxinidir}/
{toxinidir}/superset-frontend/cypress_build.sh dashboard
commands_post =
pkill -if "python {envbindir}/flask"
[testenv:cypress-explore]
setenv =
PYTHONPATH = {toxinidir}
SUPERSET_TESTENV = true
SUPERSET_CONFIG = tests.integration_tests.superset_test_config
SUPERSET_HOME = {envtmpdir}
commands =
npm install -g npm@'>=6.5.0'
pip install -e {toxinidir}/
{toxinidir}/superset-frontend/cypress_build.sh explore
commands_post =
pkill -if "python {envbindir}/flask"
[testenv:cypress-sqllab]
setenv =
PYTHONPATH = {toxinidir}
SUPERSET_TESTENV = true
SUPERSET_CONFIG = tests.integration_tests.superset_test_config
SUPERSET_HOME = {envtmpdir}
commands =
npm install -g npm@'>=6.5.0'
pip install -e {toxinidir}/
{toxinidir}/superset-frontend/cypress_build.sh sqllab
commands_post =
pkill -if "python {envbindir}/flask"
[testenv:cypress-sqllab-backend-persist]
setenv =
PYTHONPATH = {toxinidir}
SUPERSET_TESTENV = true
SUPERSET_CONFIG = tests.integration_tests.superset_test_config
SUPERSET_HOME = {envtmpdir}
commands =
npm install -g npm@'>=6.5.0'
pip install -e {toxinidir}/
{toxinidir}/superset-frontend/cypress_build.sh sqllab
commands_post =
pkill -if "python {envbindir}/flask"
[testenv:eslint]
changedir = {toxinidir}/superset-frontend
commands =
npm run lint
deps =
[testenv:fossa]
commands =
{toxinidir}/scripts/fossa.sh
deps =
passenv = *
[testenv:javascript]
commands =
npm install -g npm@'>=6.5.0'
{toxinidir}/superset-frontend/js_build.sh
deps =
[testenv:license-check]
commands =
{toxinidir}/scripts/check_license.sh
passenv = *
whitelist_externals =
{toxinidir}/scripts/check_license.sh
deps =
[testenv:pre-commit]
commands =
pre-commit run --all-files
deps =
-rrequirements/development.txt
skip_install = true
[testenv:pylint]
commands =
pylint superset
deps =
-rrequirements/development.txt
[testenv:thumbnails]
setenv =
SUPERSET_CONFIG = tests.integration_tests.superset_test_config_thumbnails
deps =
-rrequirements/development.txt
[tox]
envlist =
cypress-dashboard
cypress-explore
cypress-sqllab
cypress-sqllab-backend-persist
eslint
fossa
javascript
license-check
pre-commit
pylint
skipsdist = true
"""
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
Expand Down
9 changes: 6 additions & 3 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ apispec[yaml]==6.3.0
# via flask-appbuilder
apsw==3.46.0.0
# via shillelagh
async-timeout==4.0.3
# via redis
attrs==23.2.0
# via
# cattrs
Expand Down Expand Up @@ -91,6 +93,8 @@ dnspython==2.6.1
# via email-validator
email-validator==2.1.1
# via flask-appbuilder
exceptiongroup==1.2.1
# via cattrs
flask==2.3.3
# via
# apache-superset
Expand Down Expand Up @@ -144,9 +148,7 @@ geopy==2.4.1
google-auth==2.29.0
# via shillelagh
greenlet==3.0.3
# via
# shillelagh
# sqlalchemy
# via shillelagh
gunicorn==22.0.0
# via apache-superset
hashids==1.3.1
Expand Down Expand Up @@ -356,6 +358,7 @@ typing-extensions==4.12.0
# via
# alembic
# apache-superset
# cattrs
# flask-limiter
# limits
# shillelagh
Expand Down
37 changes: 12 additions & 25 deletions requirements/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
# pip-compile-multi
#
-r base.txt
-e file:.
-e file:///Users/max/code/superset
# via
# -r requirements/base.in
# -r requirements/development.in
appnope==0.1.4
# via ipython
astroid==3.1.0
# via pylint
boto3==1.34.112
# via dataflows-tabulator
# via
# apache-superset
# dataflows-tabulator
botocore==1.34.112
# via
# boto3
Expand All @@ -27,9 +27,7 @@ cached-property==1.5.2
cfgv==3.3.1
# via pre-commit
chardet==5.1.0
# via
# dataflows-tabulator
# tox
# via dataflows-tabulator
cmdstanpy==1.1.0
# via prophet
contourpy==1.0.7
Expand All @@ -51,9 +49,7 @@ docker==7.0.0
et-xmlfile==1.1.0
# via openpyxl
filelock==3.12.2
# via
# tox
# virtualenv
# via virtualenv
flask-cors==4.0.0
# via apache-superset
flask-testing==0.8.1
Expand Down Expand Up @@ -156,9 +152,7 @@ pip-tools==7.4.1
playwright==1.42.0
# via apache-superset
pluggy==1.4.0
# via
# pytest
# tox
# via pytest
pre-commit==3.7.1
# via apache-superset
progress==1.6
Expand Down Expand Up @@ -194,8 +188,6 @@ pyinstrument==4.4.0
# via apache-superset
pylint==3.1.0
# via apache-superset
pyproject-api==1.6.1
# via tox
pyproject-hooks==1.0.0
# via
# build
Expand Down Expand Up @@ -235,28 +227,25 @@ thrift==0.16.0
# pyhive
# thrift-sasl
thrift-sasl==0.4.3
# via
# apache-superset
# pyhive
tomli==2.0.1
# via
# build
# coverage
# pip-tools
# pylint
# pyproject-api
# pyproject-hooks
# pytest
# tox
tomlkit==0.12.5
# via pylint
toposort==1.10
# via pip-compile-multi
tox==4.6.4
# via apache-superset
tqdm==4.66.4
# via
# cmdstanpy
# prophet
traitlets==5.14.3
# via
# matplotlib-inline
trino==0.328.0
# via apache-superset
tzlocal==5.2
Expand All @@ -266,9 +255,7 @@ unicodecsv==0.14.1
# dataflows-tabulator
# tableschema
virtualenv==20.23.1
# via
# pre-commit
# tox
# via pre-commit
wheel==0.43.0
# via pip-tools
xlrd==2.0.1
Expand Down
4 changes: 0 additions & 4 deletions tests/unit_tests/advanced_data_type/types_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
from superset.advanced_data_type.plugins.internet_port import internet_port as port


# To run the unit tests below, use the following command in the root Superset folder:
# tox -e py38 -- tests/unit_tests/advanced_data_type/types_tests.py


def test_ip_func_valid_ip():
"""Test to see if the cidr_func behaves as expected when a valid IP is passed in"""
cidr_request: AdvancedDataTypeRequest = {
Expand Down

0 comments on commit c0501e3

Please sign in to comment.