Skip to content

Commit

Permalink
Release 0.6.12 (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
iadrich authored Jan 19, 2024
1 parent 0e4e691 commit 2d27aad
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 4 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Change Log

## [0.6.12] - 2024-01-19

### Changed

- Snowflake: temporary objects are created as `temp` where possible
(ie: stages, incremental tables,...)
- Added flag to run command (--with-tests) that combines the execution of
both tests and tasks
- Added new flag to run and test commands (--fail-fast) that terminates the
execution upon an error on any task or test

## [0.6.11] - 2023-08-30

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "sayn"
version = "0.6.11"
version = "0.6.12"
description = "Data-modelling and processing framework for automating Python and SQL tasks"
authors = ["Sotiris Gkoulimaris <[email protected]>", "Adrian Macias <[email protected]>"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion sayn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# except:
# pass

__version__ = "0.6.11"
__version__ = "0.6.12"


from .tasks.python import PythonTask, task
2 changes: 2 additions & 0 deletions sayn/tasks/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ def execute(self, execute, debug):
return Ok()

def compile(self):
if self.run_arguments["with_tests"] and self._has_tests:
self.write_compilation_output(self.test_query, "test")
return self.execute(False, self.run_arguments["debug"])

def run(self):
Expand Down
2 changes: 0 additions & 2 deletions sayn/tasks/task_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,6 @@ def execute_task(self, command):
result = self.runner.test()
elif command == "compile":
result = self.runner.compile()
if self.run_arguments["with_tests"] and self.has_tests():
result = self.runner.test()
else:
result = self.runner.test()

Expand Down
4 changes: 4 additions & 0 deletions sayn/tasks/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ def config_macro(self, **config):
# Returns an empty string to avoid productin incorrect sql
return ""

def compile(self):
with self.step("Write Test Query"):
self.write_compilation_output(self.test_query, "test")

def setup(self):
if self.needs_recompile:
self.test_query = self.compiler.compile(self.task_config.file_name)
Expand Down

0 comments on commit 2d27aad

Please sign in to comment.