Skip to content

Commit

Permalink
0.0.6 release
Browse files Browse the repository at this point in the history
  • Loading branch information
s-m-e committed Jul 24, 2020
2 parents df2cea5 + 9e55352 commit bbb294a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changes

## 0.0.6 (2020-07-24)

- FIX: Development installs with `make install` do no longer fail, see #17.
- FIX: Python up to 3.7.1 does not handle type checks for `OrderedDict` properly and either causes exceptions or crashes. Fixed with workaround, see #16.

## 0.0.5 (2020-07-24)

- FEATURE: Version shown in GUI
Expand Down
17 changes: 15 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@
find_packages,
setup,
)
import ast
import os

from abgleich import __version__

# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# SETUP
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Expand All @@ -56,6 +55,20 @@
# Define source directory (path)
SRC_DIR = "src"

# Version
def get_version(code):
tree = ast.parse(code)
for item in tree.body:
if not isinstance(item, ast.Assign):
continue
if len(item.targets) != 1:
continue
if item.targets[0].id != '__version__':
continue
return item.value.s
with open(os.path.join(SRC_DIR, 'abgleich', '__init__.py'), 'r', encoding = 'utf-8') as f:
__version__ = get_version(f.read())

# Requirements
extras_require = {
"dev": ["black", "python-language-server[all]", "setuptools", "twine", "wheel",],
Expand Down
2 changes: 1 addition & 1 deletion src/abgleich/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
# META
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

__version__ = "0.0.5"
__version__ = "0.0.6"
8 changes: 7 additions & 1 deletion src/abgleich/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
import datetime
import typing

# Python <= 3.7.1 "fix"
try:
from typing import OrderedDict as DictType
except ImportError:
from typing import Dict as DictType

import typeguard

from .abc import ConfigABC, DatasetABC, PropertyABC, TransactionABC, SnapshotABC
Expand Down Expand Up @@ -205,7 +211,7 @@ def _new_snapshot_name(self) -> str:
def from_entities(
cls,
name: str,
entities: typing.OrderedDict[str, typing.List[typing.List[str]]],
entities: DictType[str, typing.List[typing.List[str]]],
side: str,
config: ConfigABC,
) -> DatasetABC:
Expand Down

0 comments on commit bbb294a

Please sign in to comment.