Skip to content

Commit 455b5e8

Browse files
committed
release 3.3.12
0 parents  commit 455b5e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+6714
-0
lines changed

.coveragerc

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[run]
2+
omit =
3+
**/conftest.py
4+
**trial_numbers.py
5+
branch = True
6+
7+
[report]
8+
# Regexes for lines to exclude from consideration
9+
exclude_lines =
10+
# Have to re-enable the standard pragma
11+
pragma: no cover
12+
13+
# Don't complain about missing debug-only code:
14+
def __repr__
15+
if self\.debug
16+
17+
# Don't complain if tests don't hit defensive assertion code:
18+
raise AssertionError
19+
raise NotImplementedError
20+
21+
# Don't complain if non-runnable code isn't run:
22+
if 0:
23+
if __name__ == .__main__.:
24+
^ \.\.\.$
25+
26+
# Don't complain about print statements not run
27+
print\(.*\)
28+
29+
# Don't complain about platform versions
30+
.call_args.
31+
32+
skip_covered=false
33+
show_missing=true
34+
# fail_under=100

.github/ dependabot.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
updates:
3+
# Maintain Python dependencies.
4+
- package-ecosystem: "pip"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
9+
# Maintain Python production test dependencies.
10+
- package-ecosystem: "pip"
11+
directory: "production-test/"
12+
schedule:
13+
interval: "weekly"
14+
15+
# Maintain dependencies for GitHub Actions.
16+
- package-ecosystem: "github-actions"
17+
directory: "/"
18+
schedule:
19+
interval: "daily"

.github/workflows/actions.yaml

+211
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
name: CI-CD
2+
3+
on:
4+
push:
5+
branches:
6+
- release/messaging-v3
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: ["3.10"]
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: set up python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: install poetry
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install poetry
24+
- uses: actions/[email protected]
25+
id: cache-poetry
26+
with:
27+
path: ~/.virtualenvs
28+
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('poetry.lock', 'poetry.toml') }}
29+
- name: Configure poetry for ci
30+
run: |
31+
poetry config virtualenvs.in-project false --local
32+
poetry config virtualenvs.path ~/.virtualenvs --local
33+
- name: Install dependencies
34+
if: steps.cache-poetry.outputs.cache-hit != 'true'
35+
run: |
36+
poetry update && poetry install --no-root
37+
- name: run tests
38+
env:
39+
VALID_TELSTRA_CLIENT_ID: ${{ secrets.VALID_TELSTRA_CLIENT_ID }}
40+
VALID_TELSTRA_CLIENT_SECRET: ${{ secrets.VALID_TELSTRA_CLIENT_SECRET }}
41+
run: |
42+
poetry run pytest || (poetry install --no-root && poetry run pytest)
43+
44+
pre-commit:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v2
48+
- name: Set up Python
49+
uses: actions/setup-python@v2
50+
with:
51+
python-version: "3.10"
52+
- uses: pre-commit/[email protected]
53+
54+
build:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v2
58+
- name: Set up Python
59+
uses: actions/setup-python@v2
60+
with:
61+
python-version: "3.10"
62+
- name: Install poetry
63+
run: pip install poetry
64+
- uses: actions/[email protected]
65+
id: cache-poetry
66+
with:
67+
path: ~/.virtualenvs
68+
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock', 'poetry.toml') }}
69+
- name: Configure poetry for ci
70+
run: |
71+
poetry config virtualenvs.in-project false --local
72+
poetry config virtualenvs.path ~/.virtualenvs --local
73+
- name: Update lock file
74+
run: |
75+
poetry lock
76+
- name: Install dependencies
77+
if: steps.cache-poetry.outputs.cache-hit != 'true'
78+
run: |
79+
poetry install
80+
- name: Build packages
81+
run: poetry build
82+
- name: Upload artifacts for release
83+
uses: actions/[email protected]
84+
with:
85+
name: wheel
86+
path: dist/
87+
88+
release-required:
89+
runs-on: ubuntu-latest
90+
outputs:
91+
result: ${{ steps.check.outputs.result }}
92+
project-version: ${{ steps.check.outputs.project-version }}
93+
steps:
94+
- uses: actions/checkout@v2
95+
- name: Set up Python
96+
uses: actions/setup-python@v2
97+
with:
98+
python-version: "3.10"
99+
- name: Install poetry and package
100+
run: |
101+
pip install --use-deprecated legacy-resolver poetry telstra.messaging
102+
- name: Check if release is required
103+
id: check
104+
run: |
105+
RELEASED_VERSION=$(python -c "from importlib.metadata import version;print(version('telstra.messaging'))")
106+
echo released version: $RELEASED_VERSION
107+
PROJECT_VERSION=$(poetry version -s)
108+
echo project version: $PROJECT_VERSION
109+
[[ "$RELEASED_VERSION" == "$PROJECT_VERSION" ]] && RESULT=false || RESULT=true
110+
echo release required: $RESULT
111+
echo "::set-output name=project-version::$PROJECT_VERSION"
112+
echo "::set-output name=result::$RESULT"
113+
114+
# release-test-pypi:
115+
# runs-on: ubuntu-latest
116+
# needs:
117+
# - test
118+
# - build
119+
# - pre-commit
120+
# - release-required
121+
# steps:
122+
# - name: Retrieve packages
123+
# if: needs.release-required.outputs.result == 'true'
124+
# uses: actions/[email protected]
125+
# with:
126+
# name: wheel
127+
# path: dist/
128+
# - name: Publish distribution 📦 to Test PyPI
129+
# if: needs.release-required.outputs.result == 'true'
130+
# uses: pypa/[email protected]
131+
# with:
132+
# password: ${{ secrets.SECRET_PUBLISH_AS_TELSTRA_TEST_PYPI_ORG }}
133+
# repository_url: https://test.pypi.org/legacy/
134+
135+
# test-production-test-pypi:
136+
# runs-on: ubuntu-latest
137+
# needs:
138+
# - release-test-pypi
139+
# - release-required
140+
# steps:
141+
# - uses: actions/checkout@v2
142+
# - name: Set up Python
143+
# uses: actions/setup-python@v2
144+
# with:
145+
# python-version: "3.10"
146+
# - name: install pipenv
147+
# run: |
148+
# python -m pip install --upgrade pip
149+
# pip install pipenv
150+
# - name: install dependencies
151+
# env:
152+
# PYPI_MIRROR: https://test.pypi.org/simple/
153+
# VERSION: ${{ needs.release-required.outputs.project-version }}
154+
# working-directory: production-test
155+
# run: |
156+
# pipenv install --dev || sleep 30 && pipenv install --dev || sleep 30 && pipenv install --dev || sleep 30 && pipenv install --dev
157+
# - name: run tests
158+
# working-directory: production-test
159+
# env:
160+
# TELSTRA_CLIENT_ID: ${{ secrets.PR_TEST_CLIENT_ID_MESSAGING }}
161+
# TELSTRA_CLIENT_SECRET: ${{ secrets.PR_TEST_CLIENT_SECRET_MESSAGING }}
162+
# run: |
163+
# pipenv run test
164+
165+
release-pypi:
166+
runs-on: ubuntu-latest
167+
needs:
168+
# - test-production-test-pypi
169+
- release-required
170+
steps:
171+
- name: Retrieve packages
172+
if: needs.release-required.outputs.result == 'true'
173+
uses: actions/[email protected]
174+
with:
175+
name: wheel
176+
path: dist/
177+
- name: Publish distribution 📦 to PyPI
178+
if: needs.release-required.outputs.result == 'true'
179+
uses: pypa/[email protected]
180+
with:
181+
password: ${{ secrets.SECRET_PUBLISH_AS_TELSTRA_PYPI_ORG }}
182+
183+
# test-production-pypi:
184+
# runs-on: ubuntu-latest
185+
# needs:
186+
# - release-pypi
187+
# - release-required
188+
# steps:
189+
# - uses: actions/checkout@v2
190+
# - name: Set up Python
191+
# uses: actions/setup-python@v2
192+
# with:
193+
# python-version: "3.10"
194+
# - name: install pipenv
195+
# run: |
196+
# python -m pip install --upgrade pip
197+
# pip install pipenv
198+
# - name: install dependencies
199+
# env:
200+
# PYPI_MIRROR: https://pypi.org/simple/
201+
# VERSION: ${{ needs.release-required.outputs.project-version }}
202+
# working-directory: production-test
203+
# run: |
204+
# pipenv install --dev || sleep 30 && pipenv install --dev || sleep 30 && pipenv install --dev || sleep 30 && pipenv install --dev
205+
# - name: run tests
206+
# working-directory: production-test
207+
# env:
208+
# TELSTRA_CLIENT_ID: ${{ secrets.PR_TEST_CLIENT_ID_MESSAGING }}
209+
# TELSTRA_CLIENT_SECRET: ${{ secrets.PR_TEST_CLIENT_SECRET_MESSAGING }}
210+
# run: |
211+
# pipenv run test

.gitignore

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
.venv
12+
env/
13+
build/
14+
develop-eggs/
15+
dist/
16+
downloads/
17+
eggs/
18+
.eggs/
19+
lib/
20+
lib64/
21+
parts/
22+
sdist/
23+
var/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*,cover
47+
.hypothesis/
48+
venv/
49+
.python-version
50+
51+
# Translations
52+
*.mo
53+
*.pot
54+
55+
# Django stuff:
56+
*.log
57+
58+
# Sphinx documentation
59+
docs/_build/
60+
61+
# PyBuilder
62+
target/
63+
64+
#Ipython Notebook
65+
.ipynb_checkpoints
66+
67+
.DS_Store
68+
69+
# Pytest
70+
.pytest_cache
71+
__pycache__
72+
73+
# VSCode
74+
.vscode

0 commit comments

Comments
 (0)