Skip to content

Commit

Permalink
Merge pull request #98 from minos-framework/0.2.x
Browse files Browse the repository at this point in the history
v0.2.1
  • Loading branch information
albamig authored Mar 16, 2022
2 parents beca6ff + 84707ac commit 6d88bf4
Show file tree
Hide file tree
Showing 10 changed files with 256 additions and 176 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: make coverage

- name: Publish coverage
uses: codecov/codecov-action@v1.3.1
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
Expand Down
8 changes: 8 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,11 @@
* `version` commands added.
* Minos CLI no longer generates `__pycache__` archives.
* `init` command is no longer supported.

## 0.2.1 (2022-03-16)

* Updated microservices' query repository.
* Enhanced defaults Redis Docker container.
* Automatic databases creation in script SQL file.
* Fixed bugs
* Improved versions compatibility.
2 changes: 1 addition & 1 deletion minos/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__author__ = "Minos Framework Devs"
__email__ = "hey@minos.run"
__version__ = "0.2.0"
__version__ = "0.2.1"

import sys

Expand Down
2 changes: 2 additions & 0 deletions minos/cli/api/new.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def new_microservice(name: str) -> None:
processor = TemplateProcessor.from_fetcher(fetcher, microservice_path, defaults={"name": name})
processor.render()

(microservice_path / ".build_docker_compose.txt").unlink()


@app.callback()
def callback():
Expand Down
2 changes: 1 addition & 1 deletion minos/cli/templating/fetchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
)

TEMPLATE_URL: Final[str] = "https://github.com/minos-framework/minos-templates/releases/download"
TEMPLATE_VERSION: Final[str] = "v0.1.1"
TEMPLATE_VERSION: Final[str] = "v0.1.2"


class TemplateFetcher:
Expand Down
10 changes: 9 additions & 1 deletion minos/cli/templating/processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def answers(self) -> dict[str, Any]:
:return: A mapping from question name to the answer value.
"""
answers = self.context
answers |= self._previous_answers
answers |= self._previous_answers_without_template_registry

answers = self.form.ask(context=answers, env=self.env)
self._store_new_answers(answers)
Expand All @@ -154,6 +154,14 @@ def _previous_answers(self) -> dict[str, str]:

return answers

@cached_property
def _previous_answers_without_template_registry(self):
previous_answers_without_registry = self._previous_answers.copy()
previous_answers_without_registry.pop("template_registry", None)
previous_answers_without_registry.pop("template_version", None)

return previous_answers_without_registry

def _store_new_answers(self, answers) -> None:
with self._answers_file_path.open("w") as file:
yaml.dump(answers, file)
Expand Down
Loading

0 comments on commit 6d88bf4

Please sign in to comment.