Skip to content

Commit

Permalink
- [#120] Updated a windows specific test to run on all OSes.
Browse files Browse the repository at this point in the history
- [#120] Updated code formatting.
- [#120] Updated `CHANGELOG.rst` with more recent changes.
  • Loading branch information
eoyilmaz committed Dec 4, 2024
1 parent 24a1575 commit cbc9348
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 11 deletions.
21 changes: 18 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,32 @@ Stalker Changes
=====

* `Version.take_name` has been renamed to `Version.variant_name` to follow the industry
standard.
* `Task.depends` renmaed to `Task.depends_on`.
standard (and then removed it completely as we now have `Variant` class for this).
* `Task.depends` renamed to `Task.depends_on`.
* `TaskDependency.task_depends_to` renamed to `TaskDependency.task_depends_on`.
* Modernised Stalker as a Python project. It is now fully PEP 517 compliant.
* Stalker now supports Python versions from 3.8 to 3.13.
* Stalker is now SQLAlchemy 2.x compliant.
* Stalker is now fully type hinted.
* Added GitHub actions for CI/CD practices.
* Updated validation messages to make them more consistently displaying the current
type and the value of the validated attribute.
* Added Makefile workflow to help creating a virtualenv, building, installing, releasing
etc. actions much more easier.
* Modernised Stalker as a Python project. It is now fully PEP 517 compliant.
* Added `tox` config to run the test with Python 3.8 to 3.13.
* Increased test coverage to 99.71%.
* Updated documentation theme to `furo`.
* Renamed OSX to macOS anywhere it is mentioned.
* `Scene` is now deriving from `Task`.
* `Shot.sequences` is now `Shot.sequences` and it is many-to-one.
* `Shot.scenes` is now `Shot.scene` and it is many-to-one.
* Added the `Variant` class to allow variants to be approved and managed individually.
* Added `Review.version` attribute to relate a `Version` instance to the review.
* Removed the `Version.variant_name` attribute. The migration alembic script will create
`Variant` instances for each `Version.variant_name` under the container `Task` to hold
the information.
* `Version._template_variables()` now finds the related `Asset`, `Shot` and `Sequence`
values and passes them in the returned dictionary.

0.2.27
======
Expand Down
4 changes: 1 addition & 3 deletions src/stalker/models/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Version(Link, DAGMixin):
Or, let's have a setup with environment variables:
$REPO{{project.repository.id}}/{{project.code}}/{%- for parent_task in parent_tasks -%}{{parent_task.nice_name}}/{%- endfor -%}
$REPO{{project.repository.code}}/{{project.code}}/{%- for parent_task in parent_tasks -%}{{parent_task.nice_name}}/{%- endfor -%}
Args:
inputs (List[Link]): A list o :class:`.Link` instances, holding the inputs of
Expand Down Expand Up @@ -98,7 +98,6 @@ class Version(Link, DAGMixin):
back_populates="versions",
)


version_number: Mapped[int] = mapped_column(
default=1,
nullable=False,
Expand Down Expand Up @@ -180,7 +179,6 @@ def __repr__(self) -> str:
)
)


@property
def latest_version(self) -> "Version":
"""Return the Version instance with the highest version number in this series.
Expand Down
14 changes: 12 additions & 2 deletions tests/models/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,9 +1117,19 @@ def test_find_repo_is_working_as_expected(setup_repository_db_tests):
assert Repository.find_repo(test_path) == new_repo1


@pytest.mark.skipif(sys.platform != "win32", reason="Test under Windows only!")
def test_find_repo_is_case_insensitive_under_windows(setup_repository_db_tests):
def test_find_repo_is_case_insensitive_under_windows(
setup_repository_db_tests, monkeypatch
):
"""find_repo() is case-insensitive under windows."""

def patched_platform_system():
"""Patch the platform.system to always return Windows."""
return "Windows"

monkeypatch.setattr(
"stalker.models.repository.platform.system", patched_platform_system
)

data = setup_repository_db_tests
DBSession.add(data["test_repo"])
DBSession.commit()
Expand Down
4 changes: 1 addition & 3 deletions tests/models/test_taskJuggler_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,7 @@ def test_schedule_will_not_work_if_the_studio_attribute_is_None(
)


pytest.mark.skipif(sys.platform == "win32", "Runs in Linux/macOS for now!")


@pytest.mark.skipif(sys.platform == "win32", reason="Runs in Linux/macOS for now!")
def test_schedule_will_raise_tj3_command_errors_as_a_runtime_error(
setup_tsk_juggler_scheduler_db_tests, monkeypatch_tj3
):
Expand Down

0 comments on commit cbc9348

Please sign in to comment.