Skip to content

Commit

Permalink
Merge pull request #58 from causy-dev/backporting-310
Browse files Browse the repository at this point in the history
start backporting to 310
  • Loading branch information
LilithWittmann authored Aug 7, 2024
2 parents 06c1916 + 845e5eb commit 5d547f9
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
platform: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion causy/causal_discovery/constraint/orientation_rules/pc.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def generate_restores(unapplied_actions):
return results


class ColliderTestConflictResolutionStrategies(enum.StrEnum):
class ColliderTestConflictResolutionStrategies(str, enum.Enum):
"""
Enum for the conflict resolution strategies for the ColliderTest.
"""
Expand Down
2 changes: 1 addition & 1 deletion causy/contrib/graph_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class EdgeUIConfig(BaseModel):
label: Optional[str] = None


class ConditionalEdgeUIConfigComparison(enum.StrEnum):
class ConditionalEdgeUIConfigComparison(str, enum.Enum):
EQUAL = "EQUAL"
GREATER = "GREATER"
LESS = "LESS"
Expand Down
2 changes: 1 addition & 1 deletion causy/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from causy.graph_utils import hash_dictionary


class DataLoaderType(enum.StrEnum):
class DataLoaderType(str, enum.Enum):
DYNAMIC = "dynamic" # python function which yields data
JSON = "json"
JSONL = "jsonl"
Expand Down
2 changes: 1 addition & 1 deletion causy/edge_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
)


class EdgeTypeEnum(enum.StrEnum):
class EdgeTypeEnum(str, enum.Enum):
DIRECTED = "directed"
UNDIRECTED = "undirected"
BIDIRECTED = "bidirected"
Expand Down
4 changes: 2 additions & 2 deletions causy/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def name(self) -> str:
return serialize_module_name(self)


class TestResultAction(enum.StrEnum):
class TestResultAction(str, enum.Enum):
"""
Actions that can be taken on the graph. These actions are used to keep track of the history of the graph.
"""
Expand All @@ -59,7 +59,7 @@ class TestResult(TestResultInterface):
data: Optional[Dict] = None


class AlgorithmReferenceType(enum.StrEnum):
class AlgorithmReferenceType(str, enum.Enum):
FILE = "file"
NAME = "name"
PYTHON_MODULE = "python_module"
Expand Down
142 changes: 88 additions & 54 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT"
include = ["pyproject.toml", "README.md", "LICENSE", "causy", "causy/static/*", "causy/static/assets/*"]

[tool.poetry.dependencies]
python = "^3.11"
python = "^3.10"
scipy = "^1.14"
typer = {extras = ["all"], version = "^0.12.3"}
torch = "^2.4"
Expand Down

0 comments on commit 5d547f9

Please sign in to comment.