Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit e896bb5

Browse files
authored
Merge pull request #31 from cloudstateio/release/prepare_0.1.0
release/prepare 0.1.0. thank you @sleipnir!
2 parents 2b018d3 + 81e7135 commit e896bb5

13 files changed

+56
-28
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ Python 3.7.3
1919

2020
### generate installer
2121
```
22-
./venv/bin/python3 setup.py bdist_wheel
22+
python setup.py bdist_wheel
2323
```
2424

2525
### local install
2626
```
27-
./venv/bin/python3 -m pip install dist/cloudstate-0.5.0-py3-none-any.whl
27+
python -m pip install dist/cloudstate-0.1.0-py3-none-any.whl
2828
```

cloudstate/cloudstate.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
5+
16
from dataclasses import (dataclass, field)
27
from typing import List
38
import os
@@ -25,7 +30,7 @@ def register_event_sourced_entity(self, entity: EventSourcedEntity):
2530
def start(self):
2631
server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
2732
add_EntityDiscoveryServicer_to_server(CloudStateEntityDiscoveryServicer(self.event_sourced_entities), server)
28-
add_EventSourcedServicer_to_server(CloudStateEventSourcedServicer(self.event_sourced_entities),server)
33+
add_EventSourcedServicer_to_server(CloudStateEventSourcedServicer(self.event_sourced_entities), server)
2934
port = os.environ.get('HOST', '127.0.0.1') + ':' + os.environ.get('PORT', '8080')
3035
server.add_insecure_port(port)
3136
pprint('Starting Cloudstate on ' + port)

cloudstate/contexts.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
5+
16
from dataclasses import dataclass, field
27
from typing import List
38

cloudstate/discovery_servicer.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
# Copyright 2019 Lightbend Inc.
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
145

156
import platform
167
from dataclasses import dataclass

cloudstate/evensourced_servicer.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
from dataclasses import dataclass
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
5+
6+
import logging
7+
from pprint import pprint
28
from typing import List
39

10+
from google.protobuf import symbol_database as _symbol_database
411
from google.protobuf.any_pb2 import Any
512

613
from cloudstate.entity_pb2 import Command
@@ -9,9 +16,6 @@
916
from cloudstate.event_sourced_pb2 import EventSourcedInit, EventSourcedSnapshot, EventSourcedEvent, EventSourcedReply, \
1017
EventSourcedStreamOut
1118
from cloudstate.event_sourced_pb2_grpc import EventSourcedServicer
12-
from pprint import pprint
13-
from google.protobuf import symbol_database as _symbol_database
14-
import logging
1519

1620
_sym_db = _symbol_database.Default()
1721

cloudstate/event_sourced_context.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
5+
16
from dataclasses import dataclass, field
27
from typing import List, Any
38

cloudstate/event_sourced_entity.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
5+
16
from dataclasses import dataclass, field
27
from typing import List, Callable, Any, Mapping, MutableMapping
38
import inspect

cloudstate/tests/test_cloudstate.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# content of test_sample.py
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
5+
6+
27
def inc(x):
38
return x + 1
49

510

611
def test_answer():
7-
assert inc(3) == 4
12+
assert inc(3) == 4

cloudstate/version.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
# -*- coding: utf-8 -*-
2-
31
"""
42
Copyright 2020 Lightbend Inc.
53
Licensed under the Apache License, Version 2.0.
64
"""
75

8-
__version__ = "0.5.0"
6+
__version__ = "0.1.0"

scripts/fetch-cloudstate-pb.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function fetch() {
1414

1515
tag=$1
1616

17-
# CloudState protocol
17+
# Cloudstate protocol
1818
fetch "protocol/cloudstate/entity.proto" $tag
1919
fetch "protocol/cloudstate/event_sourced.proto" $tag
2020
fetch "protocol/cloudstate/function.proto" $tag
@@ -24,7 +24,7 @@ fetch "protocol/cloudstate/crdt.proto" $tag
2424
fetch "example/shoppingcart/shoppingcart.proto" $tag
2525
fetch "example/shoppingcart/persistence/domain.proto" $tag
2626

27-
# CloudState frontend
27+
# Cloudstate frontend
2828
fetch "frontend/cloudstate/entity_key.proto" $tag
2929

3030
# dependencies

shoppingcart/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM python:3.8.0-slim
22

33
COPY ./dist /dist
4-
RUN pip install /dist/cloudstate-0.5.0-py3-none-any.whl
4+
RUN pip install /dist/cloudstate-0.1.0-py3-none-any.whl
55

66
WORKDIR /app
77
COPY ./shoppingcart ./shoppingcart

shoppingcart/shopping_cart.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
5+
16
from cloudstate.cloudstate import CloudState
27
from shoppingcart.shopping_cart_entity import entity as shopping_cart_entity
38
import logging

shoppingcart/shopping_cart_entity.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
Copyright 2020 Lightbend Inc.
3+
Licensed under the Apache License, Version 2.0.
4+
"""
5+
16
from dataclasses import dataclass, field
27
from typing import MutableMapping
38

0 commit comments

Comments
 (0)