Skip to content

Commit 7b3199b

Browse files
Merge pull request #79 from HDE/master
Release v0.1.13
2 parents 9e87bfb + 602e127 commit 7b3199b

21 files changed

+131
-130
lines changed

.github/workflows/execute_tests.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Execute tests
2+
3+
on: push
4+
5+
jobs:
6+
execute_tests:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ['3.7', '3.8', '3.9']
11+
name: Python ${{ matrix.python-version }} tests
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Setup python
16+
uses: actions/setup-python@v3
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
20+
- name: Print information
21+
run: |
22+
echo "python version $(python --version) running"
23+
echo "pip version $(pip --version) running"
24+
25+
- name: Build
26+
run: |
27+
pip install wheel
28+
python setup.py sdist bdist_wheel
29+
30+
- name: Test
31+
run: |
32+
python setup.py test

.github/workflows/push_to_pypi.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Push package to pypi
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
branches:
8+
- release
9+
10+
env:
11+
PYTHON_VERSION: "3.9"
12+
13+
jobs:
14+
push_to_pypi:
15+
if: github.event.pull_request.merged
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Setup python
21+
uses: actions/setup-python@v3
22+
with:
23+
python-version: ${{ env.PYTHON_VERSION }}
24+
25+
- name: Print information
26+
run: |
27+
echo "python version $(python --version) running"
28+
echo "pip version $(pip --version) running"
29+
30+
- name: Build
31+
run: |
32+
pip install wheel
33+
python setup.py sdist bdist_wheel
34+
35+
- name: Deploy
36+
env:
37+
PYPI_USERNAME: "${{ secrets.PYPI_USERNAME }}"
38+
PYPI_PASSWORD: "${{ secrets.PYPI_PASSWORD }}"
39+
run: |
40+
sh deploy.sh

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@ target/
6161

6262
# Vitual Environments
6363
venv/
64+
.env/
65+
66+
# direnv
67+
.envrc

CHANGELOG.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,21 @@ Version 0.1.10
5252
--------------
5353

5454
- Fix traceback output when exception happens.
55+
56+
Version 0.1.11
57+
--------------
58+
59+
- Test on python 3.8.
60+
61+
Version 0.1.12
62+
--------------
63+
64+
- Fix error when running on Windows with Python 3.
65+
66+
Version 0.1.13
67+
--------------
68+
69+
- Drop support of Python 2.7.
70+
- Various update and cleanup, add Python 3.9 support.
71+
- Add __main__ file for using the package as a module.
72+
- Implement tests via Github Actions.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.)
3+
Copyright (c) 2015-2022 HENNGE K.K. (formerly known as HDE, Inc.)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# python-lambda-local
22

33
[![Join the chat at https://gitter.im/HDE/python-lambda-local](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/HDE/python-lambda-local?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4-
[![wercker status](https://app.wercker.com/status/04f5bc5b7de3d5c6f13eb5b871035226/s "wercker status")](https://app.wercker.com/project/bykey/04f5bc5b7de3d5c6f13eb5b871035226)
4+
[![Github Actions status](https://github.com/HDE/python-lambda-local/actions/workflows/execute_tests.yml/badge.svg)](https://github.com/HDE/python-lambda-local/actions/)
55
[![PyPI version](https://badge.fury.io/py/python-lambda-local.svg)](https://badge.fury.io/py/python-lambda-local)
66

77
Run lambda function on local machine
88

99
## Prepare development environment
1010

11-
Please use a newly created virtualenv of Python 2.7 or Python 3.7.
11+
Please use a newly created virtualenv of Python 3.7+.
1212

1313
## Installation
1414

@@ -68,7 +68,7 @@ Suppose your project directory is like this:
6868
│   │   ├── ... (package content of rx)
6969
...
7070
│   │   └── testscheduler.py
71-
│   └── Rx-1.2.3.dist-info
71+
│   └── Rx-1.6.1.dist-info
7272
│   ├── DESCRIPTION.rst
7373
│   ├── METADATA
7474
│   ├── metadata.json
@@ -147,7 +147,7 @@ Call a handler function `func` with given `event`, `context` and custom `environ
147147
1. Make sure the 3rd party libraries used in the AWS Lambda function can be imported.
148148

149149
``` bash
150-
pip install rx
150+
pip install rx==1.6.1
151151
```
152152

153153
2. To call the lambda function above with your python code:

README.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
python-lambda-local
22
===================
33

4-
|Join the chat at https://gitter.im/HDE/python-lambda-local| |wercker
5-
status| |PyPI version|
4+
|Join the chat at https://gitter.im/HDE/python-lambda-local| |Github Actions status| |PyPI version|
65

76
Run lambda function on local machine
87

98
Prepare development environment
109
-------------------------------
1110

12-
Please use a newly created virtualenv of Python 2.7 or Python 3.7.
11+
Please use a newly created virtualenv of Python 3.7+.
1312

1413
Installation
1514
------------
@@ -75,7 +74,7 @@ Suppose your project directory is like this:
7574
│   │   ├── ... (package content of rx)
7675
...
7776
│   │   └── testscheduler.py
78-
│   └── Rx-1.2.3.dist-info
77+
│   └── Rx-1.6.1.dist-info
7978
│   ├── DESCRIPTION.rst
8079
│   ├── METADATA
8180
│   ├── metadata.json
@@ -164,7 +163,7 @@ Sample
164163

165164
.. code:: bash
166165
167-
pip install rx
166+
pip install rx==1.6.1
168167
169168
2. To call the lambda function above with your python code:
170169

@@ -184,7 +183,7 @@ Sample
184183
185184
.. |Join the chat at https://gitter.im/HDE/python-lambda-local| image:: https://badges.gitter.im/Join%20Chat.svg
186185
:target: https://gitter.im/HDE/python-lambda-local?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
187-
.. |wercker status| image:: https://app.wercker.com/status/04f5bc5b7de3d5c6f13eb5b871035226/s
188-
:target: https://app.wercker.com/project/bykey/04f5bc5b7de3d5c6f13eb5b871035226
186+
.. |Github Actions status| image:: https://github.com/HDE/python-lambda-local/actions/workflows/execute_tests.yml/badge.svg
187+
:target: https://github.com/HDE/python-lambda-local/actions/
189188
.. |PyPI version| image:: https://badge.fury.io/py/python-lambda-local.svg
190189
:target: https://badge.fury.io/py/python-lambda-local

deploy.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,4 @@ password: ${PYPI_PASSWORD}
1212
EOF
1313

1414
pip install twine
15-
16-
mkdir dist
17-
cp build-py2/dist/* dist/
18-
cp build-py37/dist/* dist/
19-
cp build-py38/dist/* dist/
20-
2115
twine upload -r pypi dist/*

lambda_local/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'''
22
python-lambda-local: Main module
33
4-
Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.)
4+
Copyright 2015-2022 HENNGE K.K. (formerly known as HDE, Inc.)
55
Licensed under MIT.
66
'''
77

lambda_local/__main__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from . import main
2+
3+
if __name__ == "__main__":
4+
main()

0 commit comments

Comments
 (0)