Skip to content

Initial Code #1

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

Merged
merged 100 commits into from
Apr 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
91d56d4
cookiecut
Mar 13, 2020
00259d5
add first rev. of init code and user-code
Mar 13, 2020
de8e420
two more checks
Mar 13, 2020
e3f0fd3
code finds and rets fona version, added version decorator
Mar 18, 2020
d50d4c5
IEMI
Mar 18, 2020
0172711
reduce size of iemi method, ret bytes as string
Mar 18, 2020
3ce58b6
move https_redir to init, gprs setter/getter
Mar 18, 2020
416f2bf
add RSSI getter
Mar 18, 2020
99ce08e
cleaned rssi, add send_parse_reply, fix parse_reply
Mar 19, 2020
903fef9
network status, update parsing
Mar 19, 2020
df4487c
add network gps toggle for fona3g/808
Mar 19, 2020
2d96069
make gps status query the module for a fix, instead of checking a pro…
Mar 19, 2020
f85ad85
add further checks to simpletest
Mar 19, 2020
1792768
add a gprs_on toggle to gprs setter, configuration is an optional kwarg
Mar 19, 2020
cfad5cc
set config to none
Mar 19, 2020
dcf3ab0
split config/set gprs
Mar 20, 2020
279db91
redo bearer profile
Mar 20, 2020
bc7f23d
GPRS
Mar 20, 2020
0315728
working GPRS impl, tofix: send_check_reply_quoted implementation, nea…
Mar 20, 2020
3c0b5eb
rewrite send_check_reply
Mar 31, 2020
9f5a4c6
remove re_init routine
Mar 31, 2020
774910a
set_gps, fixup GRPS property to actually send/parse the CGATT:
Mar 31, 2020
08513c9
rewrite gps status parsing
Mar 31, 2020
e6c3f00
not rx'ing the correct value...
Mar 31, 2020
67c0936
decode state, define state, get GPS response
Mar 31, 2020
75f1aec
check for 3d fix
Apr 1, 2020
70a946f
dont store entire buff, store status instead
Apr 1, 2020
8e7344b
remove private gps status method, move everything into gps property i…
Apr 1, 2020
4c290b9
rewrite send_check_reply_quoted
Apr 1, 2020
c83d584
return string instead of printing from library
Apr 2, 2020
215a419
return network status #
Apr 2, 2020
a35b7d9
make username/password optional, switch to quoted
Apr 2, 2020
7783032
add helper cmds
Apr 2, 2020
ab5245b
add prefix/suffix to send_check_reply signature, update all
Apr 2, 2020
037fea7
add prefix/suffix to get_reply
Apr 2, 2020
115484f
parses CID
Apr 3, 2020
1979e5c
encode UA, encode httpaction param
Apr 3, 2020
7289740
fixing first action parse, second action needs modification of parse_…
Apr 3, 2020
490266f
parse out status and data len
Apr 3, 2020
496e7c7
make data len and status properties, shared
Apr 3, 2020
174625c
add http read
Apr 3, 2020
51682ee
gets adafruit wifi :)
Apr 7, 2020
b9627cc
share a buffer between http_get and the user code, opening this for l…
Apr 7, 2020
31e7226
Add HTTP POST implementation
Apr 8, 2020
3232f86
make UART helper methods private
Apr 8, 2020
ec3974d
sanitize data for http POST, encode string
Apr 8, 2020
0e13d63
add http simpletest
Apr 8, 2020
0fb9ccb
verify tcp connections work to google
Apr 8, 2020
959d0af
ip, disconnect
Apr 8, 2020
fedfe10
add tcp_status property
Apr 9, 2020
790c3e4
add tcp write, tested against local server
Apr 9, 2020
c6676c9
encode data prior to sending
Apr 9, 2020
575167f
query network data limit, in bytes, prior to sending
Apr 9, 2020
7386214
fix encoding, todo, add back len check
Apr 9, 2020
7f3614e
tcp send int, bytes, float, str
Apr 9, 2020
dcfa1b2
cifsr/gsn fix, dns, not working
Apr 9, 2020
e949df0
fix parse_reply, get_host_by_name
Apr 9, 2020
141c625
remove buffer reset
Apr 9, 2020
6902c1c
add example for tcpip
Apr 9, 2020
b0809e1
add start of tcp read
Apr 9, 2020
7874e5a
add tcp_read, tested
Apr 10, 2020
dc86d0b
add avaliable property for polling, fix read, return buf/bytes from read
Apr 10, 2020
9e1894f
add UDP mode, configurable connect()
Apr 10, 2020
e9a1f09
renaming to socket_
Apr 10, 2020
f85b5d8
write->socket_write
Apr 10, 2020
844c089
socket_read
Apr 10, 2020
ad03c10
add tcp/udp example for socket commands instead
Apr 10, 2020
d73ff02
switch to multi socket mode!
Apr 15, 2020
e82ede0
add switch for UDP/TCP, debug info, update socket_status for num
Apr 15, 2020
0878cbf
add socket num to available, close
Apr 15, 2020
3d01573
update avail, read, write
Apr 16, 2020
07984fd
pylintin
Apr 16, 2020
12a3037
lintin more
Apr 16, 2020
cef4fce
linty!
Apr 16, 2020
969526c
move it into a folder, add init and _socket
Apr 16, 2020
2cb9143
add boilerplate for socket
Apr 16, 2020
9b255b7
remove module specific tests, start to abstract for socket
Apr 16, 2020
29827e5
return gps fix as an int, wait for gps fix instead of pausing randomly
Apr 16, 2020
9dc91e2
add a get_socket method to fona module to allocate an unused socket
Apr 16, 2020
9bf04e9
add remote_ip, getpeername in socket connection
Apr 16, 2020
a7da6d0
update for sock send, tested against local server
Apr 16, 2020
5417c1f
update socket close to handle multisocket connections, connect socket…
Apr 17, 2020
e10cc4a
fix socket state, tricky method to parse through..TODO: improve parsi…
Apr 17, 2020
ccb1db4
add socket_read, rewrite socket read parsing
Apr 17, 2020
b8f1c7a
fixup gethostbyname parsing, add to socket module
Apr 17, 2020
db8064e
add a readline!
Apr 17, 2020
e98f489
update doxin
Apr 17, 2020
f2d997c
fona's uart should be created in user-code, library should not requir…
Apr 17, 2020
da91ac6
remove HTTP helpers, TODO: submodule this
Apr 17, 2020
ebcb0d0
make loop variable public
Apr 17, 2020
46bb401
remove trailing, sock var init'd
Apr 17, 2020
a562764
satisfy pylint
Apr 17, 2020
da62e99
Reformat with black
Apr 17, 2020
10ce0f9
Reformat conf...
Apr 17, 2020
4645de4
reformat for black
Apr 17, 2020
aff6623
sphinxified
Apr 17, 2020
b2bea4d
fix newline, etc, from CIRCUITPY vol import
Apr 17, 2020
9b4097c
update for black 3.5
Apr 17, 2020
3b06867
remove debug!
Apr 17, 2020
017bce0
decode bytestring
Apr 17, 2020
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
57 changes: 57 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build CI

on: [pull_request, push]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Translate Repo Name For Build Tools filename_prefix
id: repo-name
run: |
echo ::set-output name=repo-name::$(
echo ${{ github.repository }} |
awk -F '\/' '{ print tolower($2) }' |
tr '_' '-'
)
- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Versions
run: |
python3 --version
- name: Checkout Current Repo
uses: actions/checkout@v1
with:
submodules: true
- name: Checkout tools repo
uses: actions/checkout@v2
with:
repository: adafruit/actions-ci-circuitpython-libs
path: actions-ci
- name: Install dependencies
# (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.)
run: |
source actions-ci/install.sh
- name: Pip install pylint, black, & Sphinx
run: |
pip install --force-reinstall pylint==1.9.2 black==19.10b0 Sphinx sphinx-rtd-theme
- name: Library version
run: git describe --dirty --always --tags
- name: PyLint
run: |
pylint $( find . -path './adafruit*.py' )
([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace $( find . -path "./examples/*.py" ))
- name: Check formatting
run: |
black --check --target-version=py35 .
- name: Build assets
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
- name: Build docs
working-directory: docs
run: sphinx-build -E -W -b html . _build/html
81 changes: 81 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Release Actions

on:
release:
types: [published]

jobs:
upload-release-assets:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Translate Repo Name For Build Tools filename_prefix
id: repo-name
run: |
echo ::set-output name=repo-name::$(
echo ${{ github.repository }} |
awk -F '\/' '{ print tolower($2) }' |
tr '_' '-'
)
- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Versions
run: |
python3 --version
- name: Checkout Current Repo
uses: actions/checkout@v1
with:
submodules: true
- name: Checkout tools repo
uses: actions/checkout@v2
with:
repository: adafruit/actions-ci-circuitpython-libs
path: actions-ci
- name: Install deps
run: |
source actions-ci/install.sh
- name: Build assets
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
- name: Upload Release Assets
# the 'official' actions version does not yet support dynamically
# supplying asset names to upload. @csexton's version chosen based on
# discussion in the issue below, as its the simplest to implement and
# allows for selecting files with a pattern.
# https://github.com/actions/upload-release-asset/issues/4
#uses: actions/[email protected]
uses: csexton/release-asset-action@master
with:
pattern: "bundles/*"
github-token: ${{ secrets.GITHUB_TOKEN }}

upload-pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Check For setup.py
id: need-pypi
run: |
echo ::set-output name=setup-py::$( find . -wholename './setup.py' )
- name: Set up Python
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
env:
TWINE_USERNAME: ${{ secrets.pypi_username }}
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
python setup.py sdist
twine upload dist/*
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.mpy
.idea
__pycache__
_build
*.pyc
.env
.python-version
build*/
bundles
*.DS_Store
.eggs
dist
**/*.egg-info
.vscode
Loading