Skip to content

Commit

Permalink
Merge branch 'rl-1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
amenezes committed Mar 16, 2022
2 parents 9cac9c6 + 5e60609 commit d45e576
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from .cfenv import CFenv
from .spring import ConfigClient, config_client, create_config_client

__version__ = "1.0.0"
__version__ = "1.0.1"
__all__ = [
"__version__",
"ConfigClient",
Expand Down
6 changes: 0 additions & 6 deletions config/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
import os
import random
import re
from pathlib import Path
from typing import Any, List

from cleo import Command
from dotenv import load_dotenv
from requests.auth import HTTPBasicAuth, HTTPDigestAuth
from rich.console import Console
from rich.json import JSON
Expand All @@ -19,11 +17,7 @@
from config.spring import ConfigClient

logging.disable(logging.ERROR)


console = Console()
env_path = Path(".") / ".env"
load_dotenv(dotenv_path=env_path)


class ConfigClientCommand(Command):
Expand Down
2 changes: 1 addition & 1 deletion config/spring.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def get_config(self, **kwargs) -> None:
self._merge_dict(self._config, server_config)

async def get_config_async(self, **kwargs) -> None:
loop = asyncio.get_event_loop()
loop = asyncio.get_running_loop()
await loop.run_in_executor(None, partial(self.get_config, **kwargs))

def _configure_oauth2(self, **kwargs) -> dict:
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ glom
requests
attrs
cleo
python-dotenv
rich
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ install_requires =
python_requires = >= 3.7

[options.extras_require]
cli = cleo>=0.7.6; python-dotenv>=0.10.3; rich
cli = cleo>=0.7.6; rich
docs = portray
all = cleo>=0.7.6; python-dotenv>=0.10.3; portray; rich
all = cleo>=0.7.6; portray; rich

[options.entry_points]
console_scripts =
Expand Down
3 changes: 0 additions & 3 deletions tests/unit/test_spring.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,8 @@ def test_keys(client):
],
)
def test_get(client, monkeypatch, expr, expected, mocker):
# logging.basicConfig(level=logging.INFO)
monkeypatch.setattr(http, "get", conftest.config_mock)
client.get_config()

# logging.info(f"INFO: {client.get('info')}")
assert client.get(expr) == expected


Expand Down

0 comments on commit d45e576

Please sign in to comment.