Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
.DS_Store
.eggs
.idea
.mypy_cache
.python-version
.tox
.vscode
Expand Down
16 changes: 8 additions & 8 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ graft licenses/
include README.md
recursive-include superset/examples *
recursive-include superset/migrations *
recursive-include superset/static *
recursive-exclude superset/static/assets/docs *
recursive-exclude superset/static/assets/images/viz_thumbnails_large *
recursive-exclude superset/static/docs *
recursive-exclude superset/static/spec *
recursive-exclude superset/static/assets/src *
recursive-include superset/static/assets/src/visualizations/CountryMap/ *

# Whitelist anything that needs to be added to the static bundle
recursive-exclude superset/static *
recursive-include superset/static/assets/branding *
recursive-include superset/static/assets/dist *
recursive-include superset/static/assets/images *
recursive-exclude superset/static/images/viz_thumbnails_large *
recursive-exclude superset/static/assets/node_modules *
recursive-include superset/static/assets/stylesheets *

recursive-include superset/templates *
recursive-include superset/translations *
recursive-exclude tests *
19 changes: 16 additions & 3 deletions superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,22 @@
# Superset specific config
# ---------------------------------------------------------
PACKAGE_DIR = os.path.join(BASE_DIR, "static", "assets")
PACKAGE_FILE = os.path.join(PACKAGE_DIR, "package.json")
with open(PACKAGE_FILE) as package_file:
VERSION_STRING = json.load(package_file)["version"]
VERSION_INFO_FILE = os.path.join(PACKAGE_DIR, "version_info.json")
PACKAGE_JSON_FILE = os.path.join(PACKAGE_DIR, "package.json")

#
# Depending on the context in which this config is loaded, the version_info.json file
# may or may not be available, as it is generated on install via setup.py. In the event
# that we're actually running Superset, we will have already installed, therefore it WILL
# exist. When unit tests are running, however, it WILL NOT exist, so we fall
# back to reading package.json
#
try:
with open(VERSION_INFO_FILE) as version_file:
VERSION_STRING = json.load(version_file)["version"]
except Exception:
with open(PACKAGE_JSON_FILE) as version_file:
VERSION_STRING = json.load(version_file)["version"]

ROW_LIMIT = 50000
VIZ_ROW_LIMIT = 10000
Expand Down