[fix] Use HTTPS, not HTTP wherever practical (#7040)

* Download RAT binary via HTTPS, not HTTP

* Merge branch 'patch-1' of github.com:hajdbo/incubator-superset into patch-1
This commit is contained in:
Boris Hajduk 2019-03-18 14:21:32 +08:00 committed by Maxime Beauchemin
parent f5274a9c7f
commit 5137539a86
21 changed files with 33 additions and 35 deletions

View File

@ -432,9 +432,9 @@ npm run lint
### Python Testing ### Python Testing
All python tests are carried out in [tox](http://tox.readthedocs.io/en/latest/index.html) All python tests are carried out in [tox](https://tox.readthedocs.io/en/latest/index.html)
a standardized testing framework. a standardized testing framework.
All python tests can be run with any of the tox [environments](http://tox.readthedocs.io/en/latest/example/basic.html#a-simple-tox-ini-default-environments), via, All python tests can be run with any of the tox [environments](https://tox.readthedocs.io/en/latest/example/basic.html#a-simple-tox-ini-default-environments), via,
```bash ```bash
tox -e <environment> tox -e <environment>
@ -464,7 +464,7 @@ commands are invoked.
### JavaScript Testing ### JavaScript Testing
We use [Jest](https://jestjs.io/) and [Enzyme](http://airbnb.io/enzyme/) to test Javascript. Tests can be run with: We use [Jest](https://jestjs.io/) and [Enzyme](https://airbnb.io/enzyme/) to test Javascript. Tests can be run with:
```bash ```bash
cd superset/assets cd superset/assets

View File

@ -92,7 +92,7 @@ Database Support
Superset speaks many SQL dialects through SQLAlchemy, a Python Superset speaks many SQL dialects through SQLAlchemy, a Python
ORM that is compatible with ORM that is compatible with
[most common databases](http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html). [most common databases](https://docs.sqlalchemy.org/en/rel_1_2/core/engines.html).
Superset can be used to visualize data out of most databases: Superset can be used to visualize data out of most databases:
* MySQL * MySQL

View File

@ -83,7 +83,7 @@ git push apache 0.25 --tags
# superset package. Committers that want to ship releases # superset package. Committers that want to ship releases
# should have this access. # should have this access.
# You'll also need a `.pypirc` as specified here: # You'll also need a `.pypirc` as specified here:
# http://peterdowns.com/posts/first-time-with-pypi.html # https://gist.github.com/davydany/b08acef08f75fe297e13ae4d24ce9f4d
./pypi_push.sh ./pypi_push.sh
# publish an update to the CHANGELOG.md for the right version range # publish an update to the CHANGELOG.md for the right version range

View File

@ -25,7 +25,7 @@ BUILDDIR = _build
# User-friendly check for sphinx-build # User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://sphinx-doc.org/)
endif endif
# Internal variables. # Internal variables.

View File

@ -272,7 +272,7 @@ Superset in the :ref:`ref_database_deps` section of the docs. Database
engines not listed in this page may work too. We rely on the engines not listed in this page may work too. We rely on the
community to contribute to this knowledge base. community to contribute to this knowledge base.
.. _SQLAlchemy dialect: http://docs.sqlalchemy.org/en/latest/dialects/ .. _SQLAlchemy dialect: https://docs.sqlalchemy.org/en/latest/dialects/
.. _DBAPI driver: https://www.python.org/dev/peps/pep-0249/ .. _DBAPI driver: https://www.python.org/dev/peps/pep-0249/
For a database engine to be supported in Superset through the For a database engine to be supported in Superset through the

View File

@ -215,7 +215,7 @@ setup known to work well in production: ::
superset:app superset:app
Refer to the Refer to the
`Gunicorn documentation <http://docs.gunicorn.org/en/stable/design.html>`_ `Gunicorn documentation <https://docs.gunicorn.org/en/stable/design.html>`_
for more information. for more information.
Note that *gunicorn* does not Note that *gunicorn* does not
@ -319,7 +319,7 @@ as well as Flask extensions like ``flask-wtf``, ``flask-cache``,
``flask-migrate``, and ``flask-appbuilder``. Flask App Builder, the web ``flask-migrate``, and ``flask-appbuilder``. Flask App Builder, the web
framework used by Superset offers many configuration settings. Please consult framework used by Superset offers many configuration settings. Please consult
the `Flask App Builder Documentation the `Flask App Builder Documentation
<http://flask-appbuilder.readthedocs.org/en/latest/config.html>`_ <https://flask-appbuilder.readthedocs.org/en/latest/config.html>`_
for more information on how to configure it. for more information on how to configure it.
Make sure to change: Make sure to change:
@ -497,9 +497,9 @@ find an ``extra`` field as a ``JSON`` blob.
This JSON string contains extra configuration elements. The ``engine_params`` This JSON string contains extra configuration elements. The ``engine_params``
object gets unpacked into the object gets unpacked into the
`sqlalchemy.create_engine <http://docs.sqlalchemy.org/en/latest/core/engines.html#sqlalchemy.create_engine>`_ call, `sqlalchemy.create_engine <https://docs.sqlalchemy.org/en/latest/core/engines.html#sqlalchemy.create_engine>`_ call,
while the ``metadata_params`` get unpacked into the while the ``metadata_params`` get unpacked into the
`sqlalchemy.MetaData <http://docs.sqlalchemy.org/en/rel_1_0/core/metadata.html#sqlalchemy.schema.MetaData>`_ call. Refer to the SQLAlchemy docs for more information. `sqlalchemy.MetaData <https://docs.sqlalchemy.org/en/rel_1_2/core/metadata.html#sqlalchemy.schema.MetaData>`_ call. Refer to the SQLAlchemy docs for more information.
Schemas (Postgres & Redshift) Schemas (Postgres & Redshift)
@ -583,7 +583,7 @@ The following keys in `superset_config.py` can be specified to configure CORS:
* ``ENABLE_CORS``: Must be set to True in order to enable CORS * ``ENABLE_CORS``: Must be set to True in order to enable CORS
* ``CORS_OPTIONS``: options passed to Flask-CORS (`documentation <http://flask-cors.corydolphin.com/en/latest/api.html#extension>`) * ``CORS_OPTIONS``: options passed to Flask-CORS (`documentation <https://flask-cors.corydolphin.com/en/latest/api.html#extension>`)
DOMAIN SHARDING DOMAIN SHARDING

View File

@ -21,7 +21,7 @@ Security in Superset is handled by Flask AppBuilder (FAB). FAB is a
"Simple and rapid application development framework, built on top of Flask.". "Simple and rapid application development framework, built on top of Flask.".
FAB provides authentication, user management, permissions and roles. FAB provides authentication, user management, permissions and roles.
Please read its `Security documentation Please read its `Security documentation
<http://flask-appbuilder.readthedocs.io/en/latest/security.html>`_. <https://flask-appbuilder.readthedocs.io/en/latest/security.html>`_.
Provided Roles Provided Roles
-------------- --------------

View File

@ -1837,17 +1837,17 @@ Need to add a new Country?
To add a new country in country map tools, we need to follow the following steps : To add a new country in country map tools, we need to follow the following steps :
1. You need shapefiles which contain data of your map. 1. You need shapefiles which contain data of your map.
You can get this file on this site: http://www.diva-gis.org/gdata You can get this file on this site: https://www.diva-gis.org/gdata
2. You need to add ISO 3166-2 with column name ISO for all record in your file. 2. You need to add ISO 3166-2 with column name ISO for all record in your file.
It's important because it's a norm for mapping your data with geojson file It's important because it's a norm for mapping your data with geojson file
3. You need to convert shapefile to geojson file. 3. You need to convert shapefile to geojson file.
This action can make with ogr2ogr tools: http://www.gdal.org/ogr2ogr.html This action can make with ogr2ogr tools: https://www.gdal.org/ogr2ogr.html
4. Put your geojson file in next folder : superset/assets/src/visualizations/CountryMap/countries with the next name : nameofyourcountries.geojson 4. Put your geojson file in next folder : superset/assets/src/visualizations/CountryMap/countries with the next name : nameofyourcountries.geojson
5. You can to reduce size of geojson file on this site: http://mapshaper.org/ 5. You can to reduce size of geojson file on this site: https://mapshaper.org/
6. Go in file superset/assets/src/explore/controls.jsx 6. Go in file superset/assets/src/explore/controls.jsx

View File

@ -20,7 +20,7 @@
acquire_rat_jar () { acquire_rat_jar () {
URL="http://repo1.maven.org/maven2/org/apache/rat/apache-rat/${RAT_VERSION}/apache-rat-${RAT_VERSION}.jar" URL="https://repo1.maven.org/maven2/org/apache/rat/apache-rat/${RAT_VERSION}/apache-rat-${RAT_VERSION}.jar"
JAR="$rat_jar" JAR="$rat_jar"

View File

@ -120,7 +120,7 @@ setup(
}, },
author='Apache Software Foundation', author='Apache Software Foundation',
author_email='dev@superset.incubator.apache.org', author_email='dev@superset.incubator.apache.org',
url='http://superset.apache.org/', url='https://superset.apache.org/',
download_url=( download_url=(
'https://dist.apache.org/repos/dist/release/superset/' + version_string 'https://dist.apache.org/repos/dist/release/superset/' + version_string
), ),

View File

@ -45,7 +45,7 @@
"engines": { "engines": {
"node": ">= 6.11.5 <7.0.0 || >= 8.9.0" "node": ">= 6.11.5 <7.0.0 || >= 8.9.0"
}, },
"homepage": "http://superset.apache.org/", "homepage": "https://superset.apache.org/",
"dependencies": { "dependencies": {
"@data-ui/sparkline": "^0.0.54", "@data-ui/sparkline": "^0.0.54",
"@superset-ui/chart": "^0.10.2", "@superset-ui/chart": "^0.10.2",

View File

@ -24,7 +24,7 @@ import Link from '../../../src/SqlLab/components/Link';
describe('Link', () => { describe('Link', () => {
const mockedProps = { const mockedProps = {
tooltip: 'This is a tooltip', tooltip: 'This is a tooltip',
href: 'http://www.airbnb.com', href: 'https://www.airbnb.com',
}; };
it('renders', () => { it('renders', () => {
expect(React.isValidElement(<Link>TEST</Link>)).toBe(true); expect(React.isValidElement(<Link>TEST</Link>)).toBe(true);

View File

@ -85,7 +85,7 @@ export default class TemplateParamsEditor extends React.Component {
in your SQL (example: <code>SELECT * FROM {'{{ my_table }}'} </code>) in your SQL (example: <code>SELECT * FROM {'{{ my_table }}'} </code>)
by using&nbsp; by using&nbsp;
<a <a
href="http://superset.apache.org/sqllab.html#templating-with-jinja" href="https://superset.apache.org/sqllab.html#templating-with-jinja"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
> >

View File

@ -97,7 +97,7 @@ export default class AddSliceContainer extends React.PureComponent {
'If the datasource your are looking for is not ' + 'If the datasource your are looking for is not ' +
'available in the list, ' + 'available in the list, ' +
'follow the instructions on the how to add it on the ')} 'follow the instructions on the how to add it on the ')}
<a href="http://superset.apache.org/tutorial.html">{t('Superset tutorial')}</a> <a href="https://superset.apache.org/tutorial.html">{t('Superset tutorial')}</a>
</p> </p>
</div> </div>
<br /> <br />

View File

@ -49,7 +49,7 @@ export const EARTH_CIRCUMFERENCE_KM = 40075.16;
export const MILES_PER_KM = 1.60934; export const MILES_PER_KM = 1.60934;
export function kmToPixels(kilometers, latitude, zoomLevel) { export function kmToPixels(kilometers, latitude, zoomLevel) {
// Algorithm from: http://wiki.openstreetmap.org/wiki/Zoom_levels // Algorithm from: https://wiki.openstreetmap.org/wiki/Zoom_levels
const latitudeRad = latitude * (Math.PI / 180); const latitudeRad = latitude * (Math.PI / 180);
// Seems like the zoomLevel is off by one // Seems like the zoomLevel is off by one
const kmPerPixel = (EARTH_CIRCUMFERENCE_KM * Math.cos(latitudeRad)) / Math.pow(2, zoomLevel + 9); const kmPerPixel = (EARTH_CIRCUMFERENCE_KM * Math.cos(latitudeRad)) / Math.pow(2, zoomLevel + 9);

View File

@ -160,10 +160,8 @@ AUTH_TYPE = AUTH_DB
# Uncomment to setup OpenID providers example for OpenID authentication # Uncomment to setup OpenID providers example for OpenID authentication
# OPENID_PROVIDERS = [ # OPENID_PROVIDERS = [
# { 'name': 'Yahoo', 'url': 'https://me.yahoo.com' }, # { 'name': 'Yahoo', 'url': 'https://open.login.yahoo.com/' },
# { 'name': 'AOL', 'url': 'http://openid.aol.com/<username>' }, # { 'name': 'Flickr', 'url': 'https://www.flickr.com/<username>' },
# { 'name': 'Flickr', 'url': 'http://www.flickr.com/<username>' },
# { 'name': 'MyOpenID', 'url': 'https://www.myopenid.com' }]
# --------------------------------------------------- # ---------------------------------------------------
# Roles config # Roles config
@ -308,7 +306,7 @@ ADDITIONAL_MODULE_DS_MAP = {}
ADDITIONAL_MIDDLEWARE = [] ADDITIONAL_MIDDLEWARE = []
""" """
1) http://docs.python-guide.org/en/latest/writing/logging/ 1) https://docs.python-guide.org/writing/logging/
2) https://docs.python.org/2/library/logging.config.html 2) https://docs.python.org/2/library/logging.config.html
""" """

View File

@ -17,7 +17,7 @@ specific language governing permissions and limitations
under the License. under the License.
--> -->
This data was downloaded from the This data was downloaded from the
[World's Health Organization's website](http://data.worldbank.org/data-catalog/health-nutrition-and-population-statistics) [World's Health Organization's website](https://datacatalog.worldbank.org/dataset/health-nutrition-and-population-statistics)
Here's the script that was used to massage the data: Here's the script that was used to massage the data:

View File

@ -1659,7 +1659,7 @@ class BQEngineSpec(BaseEngineSpec):
BigQuery dialect requires us to not use backtick in the fieldname which are BigQuery dialect requires us to not use backtick in the fieldname which are
nested. nested.
Using literal_column handles that issue. Using literal_column handles that issue.
http://docs.sqlalchemy.org/en/latest/core/tutorial.html#using-more-specific-text-with-table-literal-column-and-column https://docs.sqlalchemy.org/en/latest/core/tutorial.html#using-more-specific-text-with-table-literal-column-and-column
Also explicility specifying column names so we don't encounter duplicate Also explicility specifying column names so we don't encounter duplicate
column names in the result. column names in the result.
""" """

View File

@ -26,7 +26,7 @@
# SELECT statements. # SELECT statements.
# #
# See: # See:
# http://groups.google.com/group/sqlparse/browse_thread/thread/b0bd9a022e9d4895 # https://groups.google.com/forum/#!topic/sqlparse/sL2aAi6dSJU
import sqlparse import sqlparse
from sqlparse.sql import Identifier, IdentifierList from sqlparse.sql import Identifier, IdentifierList
from sqlparse.tokens import DML, Keyword from sqlparse.tokens import DML, Keyword

View File

@ -75,7 +75,7 @@ def run_migrations_online():
# this callback is used to prevent an auto-migration from being generated # this callback is used to prevent an auto-migration from being generated
# when there are no changes to the schema # when there are no changes to the schema
# reference: http://alembic.readthedocs.org/en/latest/cookbook.html # reference: https://alembic.sqlalchemy.org/en/latest/cookbook.html
def process_revision_directives(context, revision, directives): def process_revision_directives(context, revision, directives):
if getattr(config.cmd_opts, 'autogenerate', False): if getattr(config.cmd_opts, 'autogenerate', False):
script = directives[0] script = directives[0]

View File

@ -219,7 +219,7 @@ class DatabaseView(SupersetModelView, DeleteMixin, YamlExportMixin): # noqa
'sqlalchemy_uri': utils.markdown( 'sqlalchemy_uri': utils.markdown(
'Refer to the ' 'Refer to the '
'[SqlAlchemy docs]' '[SqlAlchemy docs]'
'(http://docs.sqlalchemy.org/en/rel_1_2/core/engines.html#' '(https://docs.sqlalchemy.org/en/rel_1_2/core/engines.html#'
'database-urls) ' 'database-urls) '
'for more information on how to structure your URI.', True), 'for more information on how to structure your URI.', True),
'expose_in_sqllab': _('Expose this DB in SQL Lab'), 'expose_in_sqllab': _('Expose this DB in SQL Lab'),
@ -242,10 +242,10 @@ class DatabaseView(SupersetModelView, DeleteMixin, YamlExportMixin): # noqa
'JSON string containing extra configuration elements.<br/>' 'JSON string containing extra configuration elements.<br/>'
'1. The ``engine_params`` object gets unpacked into the ' '1. The ``engine_params`` object gets unpacked into the '
'[sqlalchemy.create_engine]' '[sqlalchemy.create_engine]'
'(http://docs.sqlalchemy.org/en/latest/core/engines.html#' '(https://docs.sqlalchemy.org/en/latest/core/engines.html#'
'sqlalchemy.create_engine) call, while the ``metadata_params`` ' 'sqlalchemy.create_engine) call, while the ``metadata_params`` '
'gets unpacked into the [sqlalchemy.MetaData]' 'gets unpacked into the [sqlalchemy.MetaData]'
'(http://docs.sqlalchemy.org/en/rel_1_0/core/metadata.html' '(https://docs.sqlalchemy.org/en/rel_1_0/core/metadata.html'
'#sqlalchemy.schema.MetaData) call.<br/>' '#sqlalchemy.schema.MetaData) call.<br/>'
'2. The ``metadata_cache_timeout`` is a cache timeout setting ' '2. The ``metadata_cache_timeout`` is a cache timeout setting '
'in seconds for metadata fetch of this database. Specify it as ' 'in seconds for metadata fetch of this database. Specify it as '