-
Notifications
You must be signed in to change notification settings - Fork 12
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 #13 from jlsneto/dev
release-config: added new version validate
- Loading branch information
Showing
8 changed files
with
153 additions
and
18 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
|
||
T = Union[int, float, str] | ||
Number = Union[float, int, complex] | ||
PEP440 = Tuple[int, int, int, str, int] |
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
Empty file.
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,34 @@ | ||
from typing import TypeVar | ||
|
||
from cereja.common import flatten, get_shape | ||
|
||
T = TypeVar('T') | ||
|
||
|
||
class Vector(list): | ||
""" | ||
-- Development proposal -- | ||
Vector is a dynamic array, whose size can be increased and can store any type of objects | ||
""" | ||
|
||
def __init__(self, values): | ||
super().__init__(values) | ||
self._size = len(self.flatten()) | ||
self._shape = get_shape(self) | ||
|
||
@property | ||
def size(self): | ||
# Need to create smart way to check changes | ||
return self._size | ||
|
||
@property | ||
def shape(self): | ||
# need to create smart way to check changes | ||
return self._shape | ||
|
||
def first(self) -> T: | ||
return self[0] | ||
|
||
def flatten(self): | ||
return flatten(self) |
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 |
---|---|---|
|
@@ -5,12 +5,13 @@ | |
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
|
||
EXCLUDE_FROM_PACKAGES = ('cereja.tests' | ||
EXCLUDE_FROM_PACKAGES = ('cereja.tests', | ||
'cereja.lab', | ||
) | ||
|
||
setuptools.setup( | ||
name="cereja", | ||
version=cereja.VERSION, | ||
version=cereja.__version__, | ||
author="Joab Leite", | ||
author_email="[email protected]", | ||
description="Cereja is a bundle of useful functions that I don't want to rewrite.", | ||
|