Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(libs): rename python classes #273

Merged
merged 3 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/close-stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ jobs:
Hi,


This PR has not seen activity in 20 days. Therefore, we are marking the PR as stale for now. It will be closed after 7 days.
This PR has not seen activity in 20 days. Therefore, we are marking
the PR as stale for now. It will be closed after 7 days.

If you need help with the PR, do not hesitate to reach out in the winglang community slack at [winglang.slack.com](https://winglang.slack.com).
If you need help with the PR, do not hesitate to reach out in the
winglang community slack at
[winglang.slack.com](https://winglang.slack.com).

Feel free to re-open this PR when it is still relevant and ready to be worked on again.
Feel free to re-open this PR when it is still relevant and ready to
be worked on again.

Thanks!
4 changes: 2 additions & 2 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ npm i @winglibs/python
```js
bring python;

let func = new cloud.Function(new python.InflightFunction(
let func = new cloud.Function(new python.InflightFunctionHandler(
path: "./test-assets",
handler: "main.handler"
).lift("bucket", bucket, allow: ["get", "put"]));
Expand All @@ -32,7 +32,7 @@ It is also possible to interact with Wing resources through the python code
```js
// main.w
let bucket = new cloud.Bucket();
let func = new cloud.Function(new python.InflightFunction(
let func = new cloud.Function(new python.InflightFunctionHandler(
path: "./test-assets",
handler: "main.handler"
).lift("bucket", bucket, allow: ["get", "put"]));
Expand Down
2 changes: 1 addition & 1 deletion python/bucket.test.w
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ bring fs;
bring "./lib.w" as python;

let bucket = new cloud.Bucket();
bucket.onCreate(new python.InflightBucketEvent(
bucket.onCreate(new python.InflightBucketEventHandler(
path: fs.join(@dirname, "./test-assets"),
handler: "main.bucket_oncreate_handler",
).lift(bucket, id: "bucket", allow: ["put"]));
Expand Down
2 changes: 1 addition & 1 deletion python/function.test.w
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ let mobileClient = new sns.MobileNotifications();
let bucket = new cloud.Bucket();
bucket.addObject("test.txt", "Hello, world!");

let func = new cloud.Function(new python.InflightFunction(
let func = new cloud.Function(new python.InflightFunctionHandler(
path: fs.join(@dirname, "./test-assets"),
handler: "main.handler",
lift: {
Expand Down
8 changes: 4 additions & 4 deletions python/lib.w
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub interface ILiftable {
liftData(): Json;
}

pub class InflightFunction impl cloud.IFunctionHandler {
pub class InflightFunctionHandler impl cloud.IFunctionHandler {
_inflightType: str;
inner: types.IInflight;

Expand Down Expand Up @@ -43,7 +43,7 @@ pub class InflightFunction impl cloud.IFunctionHandler {
}
}

pub class InflightQueueConsumer impl cloud.IQueueSetConsumerHandler {
pub class InflightQueueConsumerHandler impl cloud.IQueueSetConsumerHandler {
_inflightType: str;
inner: types.IInflight;

Expand Down Expand Up @@ -75,7 +75,7 @@ pub class InflightQueueConsumer impl cloud.IQueueSetConsumerHandler {
}
}

pub class InflightTopicOnMessage impl cloud.ITopicOnMessageHandler {
pub class InflightTopicOnMessageHandler impl cloud.ITopicOnMessageHandler {
_inflightType: str;
inner: types.IInflight;

Expand Down Expand Up @@ -107,7 +107,7 @@ pub class InflightTopicOnMessage impl cloud.ITopicOnMessageHandler {
}
}

pub class InflightBucketEvent impl cloud.IBucketEventHandler {
pub class InflightBucketEventHandler impl cloud.IBucketEventHandler {
_inflightType: str;
inner: types.IBucketEventInflight;

Expand Down
2 changes: 1 addition & 1 deletion python/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@winglibs/python",
"description": "python library for Wing",
"version": "0.0.12",
"version": "0.1.0",
"repository": {
"type": "git",
"url": "https://github.com/winglang/winglibs.git",
Expand Down
2 changes: 1 addition & 1 deletion python/queue.test.w
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ bring "./lib.w" as python;
let bucket = new cloud.Bucket();

let queue = new cloud.Queue();
queue.setConsumer(new python.InflightQueueConsumer(
queue.setConsumer(new python.InflightQueueConsumerHandler(
path: fs.join(@dirname, "./test-assets"),
handler: "main.queue_consumer_handler",
).lift(bucket, id: "bucket", allow: ["put"]));
Expand Down
2 changes: 1 addition & 1 deletion python/topic.test.w
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ bring "./lib.w" as python;
let bucket = new cloud.Bucket();

let topic = new cloud.Topic();
topic.onMessage(new python.InflightTopicOnMessage(
topic.onMessage(new python.InflightTopicOnMessageHandler(
path: fs.join(@dirname, "./test-assets"),
handler: "main.topic_onmessage_handler",
).lift(bucket, id: "bucket", allow: ["put"]));
Expand Down
Loading