Skip to content

Commit

Permalink
improved installing services, version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
douwevandermeij committed Apr 9, 2021
1 parent 7dc3f78 commit 6161eb7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
2 changes: 0 additions & 2 deletions fractal/core/process/actions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from dataclasses import asdict

from fractal.core.process.action import Action
from fractal.core.process.process_scope import ProcessScope
from fractal.core.specifications.generic.specification import Specification
Expand Down
16 changes: 0 additions & 16 deletions fractal/core/utils/application_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,3 @@ def install_service(self, service, *, name=""):
setattr(ApplicationContext, name, property(
lambda self: next(service.install(self))
))

def install_generator(self, generator_name, generator): # TODO deprecated
setattr(self, f"_{generator_name}", generator)

def get_service():
if not hasattr(self, f"__{generator_name}"):
setattr(
self,
f"__{generator_name}",
next(getattr(self, f"_{generator_name}")),
)
return getattr(self, f"__{generator_name}")

setattr(
ApplicationContext, generator_name, property(lambda self: get_service())
)
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from setuptools import find_packages, setup

REQUIREMENTS = ("python-dotenv",)
REQUIREMENTS = (
"python-dotenv",
)
TEST_REQUIREMENTS = (
"black",
"flake8",
Expand All @@ -10,7 +12,7 @@

setup(
name="fractal",
version="0.0.1",
version="0.0.2",
author="Douwe van der Meij",
author_email="douwe@karibu-online.nl",
description="""Fractal is a scaffolding toolkit for building SOLID logic for your Python applications.
Expand Down

0 comments on commit 6161eb7

Please sign in to comment.