-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from quiqueporta/migrate-to-github-actions
Migrate to GitHub actions
- Loading branch information
Showing
14 changed files
with
120 additions
and
114 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM python:3.10-alpine | ||
|
||
WORKDIR /app | ||
|
||
ENV PYTHONPATH="/app" | ||
|
||
COPY ./requirements-test.txt / | ||
|
||
RUN pip install --upgrade pip | ||
RUN pip install -r /requirements-test.txt | ||
|
||
COPY . /app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
docker build -t simple-value-object:latest . | ||
docker run --rm -it simple-value-object:latest mamba --f documentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
expects==0.9.0 | ||
mamba==0.11.0 | ||
mamba==0.11.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
def invariant(func): | ||
def invariant_func_wrapper(cls, instance): | ||
return func(cls, instance) | ||
def invariant_func_wrapper(instance): | ||
return func(instance) | ||
|
||
invariant_func_wrapper.name = func.__name__ | ||
return invariant_func_wrapper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
class NotDeclaredArgsException(Exception): | ||
def __init__(self, *args, **kwargs): | ||
super(NotDeclaredArgsException, self).__init__( | ||
'No arguments declared in __init__' | ||
) | ||
class SimpleValueObjectException(Exception): | ||
pass | ||
|
||
|
||
class ConstructorWithoutArguments(SimpleValueObjectException): | ||
def __init__(self): | ||
super().__init__('No arguments declared in __init__') | ||
|
||
class CannotBeChangeException(Exception): | ||
def __init__(self, *args, **kwargs): | ||
super(CannotBeChangeException, self).__init__( | ||
|
||
class CannotBeChanged(SimpleValueObjectException): | ||
def __init__(self): | ||
super().__init__( | ||
'You cannot change values from a Value Object, create a new one' | ||
) | ||
|
||
|
||
class ViolatedInvariantException(Exception): | ||
class InvariantViolation(SimpleValueObjectException): | ||
pass | ||
|
||
|
||
class InvariantReturnValueException(Exception): | ||
def __init__(self, *args, **kwargs): | ||
super(InvariantReturnValueException, self).__init__( | ||
'Invariants must return a boolean value' | ||
) | ||
class InvariantMustReturnBool(SimpleValueObjectException): | ||
def __init__(self): | ||
super().__init__('Invariants must return a boolean value') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.