Skip to content

Commit

Permalink
Revert "feat(contrib): add config/ folder to module build + change im…
Browse files Browse the repository at this point in the history
…port (#7…" (#7822)

This reverts commit 7e8b053.
  • Loading branch information
VIKTORVAV99 authored Feb 10, 2025
1 parent e4b49c4 commit c368d40
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
Empty file removed config/__init__.py
Empty file.
Empty file removed electricitymap/contrib/__init__.py
Empty file.
5 changes: 0 additions & 5 deletions electricitymap/contrib/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Global config variables with data read from the config directory."""

import os
from copy import deepcopy
from pathlib import Path

Expand All @@ -21,10 +20,6 @@

CONFIG_DIR = Path(__file__).parent.parent.parent.parent.joinpath("config").resolve()

# Note: Needed to deploy contrib as a packaged module to Ray. The config/ folder is built into the electricitymap package.
if os.environ.get("RUNNING_IN_RAY") == "true":
CONFIG_DIR = Path(__file__).parent.joinpath("config").resolve()

ZONES_CONFIG = read_zones_config(CONFIG_DIR)
RETIRED_ZONES_CONFIG = read_zones_config(CONFIG_DIR, retired=True)
EXCHANGES_CONFIG = read_exchanges_config(CONFIG_DIR)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version = "1.0.0"
description = ""
license = "AGPL-3.0-or-later"
authors = ["Electricity Maps <app@electricitymaps.com>"]
packages = [{ include = "electricitymap" }, { include = "config", to = "electricitymap/contrib/config" }]
include = ["config/*.json", "config/**/*.yaml"]
packages = [{ include = "electricitymap" }]
include = ["config/*.json", "config/*.yaml"]

[tool.poetry.dependencies]
python = '>= 3.10, < 3.11'
Expand Down

0 comments on commit c368d40

Please sign in to comment.