Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adress get_cmap Deprecation #87

Merged
merged 3 commits into from
Jun 27, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/build-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: [ macos-latest ] #, windows-latest, macos-latest]
python-version: ["3.7"] # TODO: decide how many versions to support
python-version: ["3.8"] # TODO: decide how many versions to support

runs-on: ${{ matrix.os }}

Expand Down
8 changes: 5 additions & 3 deletions fitsmap/cartographer.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,11 @@ def build_index_js(
leaflet_layer_control_declaration(image_layer_dicts, marker_layer_dicts),
"",
"// Search ======================================================================",
leaflet_search_control_declaration(marker_layer_dicts)
if len(marker_layer_dicts)
else "",
(
leaflet_search_control_declaration(marker_layer_dicts)
if len(marker_layer_dicts)
else ""
),
"",
"// Map event setup =============================================================",
loading_screen_js(image_layer_dicts),
Expand Down
8 changes: 4 additions & 4 deletions fitsmap/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def build_mpl_objects(
needed to create a tile
"""
mpl_norm = simple_norm(array, **norm_kwargs)
mpl_cmap = copy.copy(mpl.cm.get_cmap(MPL_CMAP))
mpl_cmap = copy.copy(mpl.colormaps[MPL_CMAP])
mpl_cmap.set_bad(color=(0, 0, 0, 0))
return mpl_norm, mpl_cmap

Expand Down Expand Up @@ -1098,9 +1098,9 @@ def files_to_map(
ray.init(
include_dashboard=debug, # during dev == True
configure_logging=~debug, # during dev == False
logging_level=logging.INFO
if debug
else logging.CRITICAL, # during dev == logging.INFO, test == logging.CRITICAL
logging_level=(
logging.INFO if debug else logging.CRITICAL
), # during dev == logging.INFO, test == logging.CRITICAL
log_to_driver=debug, # during dev = True
)

Expand Down
Loading