Skip to content

Commit

Permalink
Merge pull request #27 from brainelectronics/feature/replace-picoweb-…
Browse files Browse the repository at this point in the history
…with-microdot

Replace picoweb with microdot
  • Loading branch information
brainelectronics authored Feb 17, 2023
2 parents 1da4ca6 + d1ad2ea commit 337db9f
Show file tree
Hide file tree
Showing 12 changed files with 1,394 additions and 135 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ on:
- develop

permissions:
contents: read
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
Expand All @@ -41,3 +41,16 @@ jobs:
skip_existing: true
verbose: true
print_hash: true
- name: 'Create changelog based release'
uses: brainelectronics/changelog-based-release@v1
with:
# note you'll typically need to create a personal access token
# with permissions to create releases in the other repo
# or you set the "contents" permissions to "write" as in this example
changelog-path: changelog.md
tag-name-prefix: ''
tag-name-extension: ''
release-name-prefix: ''
release-name-extension: ''
draft-release: true
prerelease: false
17 changes: 15 additions & 2 deletions .github/workflows/test-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ name: Upload Python Package to test.pypi.org
on: [pull_request]

permissions:
contents: read
contents: write

jobs:
test-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
Expand Down Expand Up @@ -51,3 +51,16 @@ jobs:
skip_existing: true
verbose: true
print_hash: true
- name: 'Create changelog based prerelease'
uses: brainelectronics/changelog-based-release@v1
with:
# note you'll typically need to create a personal access token
# with permissions to create releases in the other repo
# or you set the "contents" permissions to "write" as in this example
changelog-path: changelog.md
tag-name-prefix: ''
tag-name-extension: '-rc${{ github.run_number }}.dev${{ github.event.number }}'
release-name-prefix: ''
release-name-extension: '-rc${{ github.run_number }}.dev${{ github.event.number }}'
draft-release: true
prerelease: true
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ upip.install('micropython-esp-wifi-manager')
# installed if they are not available from test.pypi.org, may install them
# manually
# upip.index_urls = ["https://micropython.org/pi", "https://pypi.org/pypi"]
# upip.install('picoweb')
# upip.install('micropython-ulogging')
# upip.install('utemplate')
```
Expand All @@ -120,6 +119,7 @@ device and increase the performance (webpages are loading faster)

```bash
mkdir /pyboard/lib/
mkdir /pyboard/lib/microdot/
mkdir /pyboard/lib/wifi_manager/
mkdir /pyboard/lib/wifi_manager/static/
mkdir /pyboard/lib/wifi_manager/static/css
Expand All @@ -135,7 +135,8 @@ mkdir /pyboard/lib/wifi_manager/templates/
cp templates/* /pyboard/lib/wifi_manager/templates/
# around 20kB

cp wifi_manager/wifi_manager.py /pyboard/lib/wifi_manager/
cp wifi_manager/* /pyboard/lib/wifi_manager/
cp microdot/* /pyboard/lib/microdot/
cp main.py /pyboard
cp boot.py /pyboard
# around 40kB
Expand All @@ -150,7 +151,6 @@ device, connect to a network and install them via `upip` as follows
```python
import upip

upip.install('picoweb')
upip.install('utemplate')
upip.install('micropython-ulogging')
upip.install('micropython-brainelectronics-helper')
Expand Down
12 changes: 11 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ r"^\#\# \[\d{1,}[.]\d{1,}[.]\d{1,}\] \- \d{4}\-\d{2}-\d{2}$"
<!-- ## [Unreleased] -->

## Released
## [1.9.0] - 2023-02-17
### Added
- `test-release` and `release` workflows create changelog based (pre-)releases
- Copy of [`microdot 1.2.1`](https://github.com/miguelgrinberg/microdot/releases/tag/v1.2.1) provided with this package
- brainelectronics favicon is shown on all pages

### Changed
- Replace `picoweb` with `microdot`

## [1.8.0] - 2022-11-06
### Added
- Deploy to [Test Python Package Index](https://test.pypi.org/) on every PR
Expand Down Expand Up @@ -231,8 +240,9 @@ r"^\#\# \[\d{1,}[.]\d{1,}[.]\d{1,}\] \- \d{4}\-\d{2}-\d{2}$"
- `sendfile` function implemented in same way as on Micropythons PicoWeb

<!-- Links -->
[Unreleased]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager/compare/1.8.0...develop
[Unreleased]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager/compare/1.9.0...develop

[1.9.0]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager//tree/1.9.0
[1.8.0]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager//tree/1.8.0
[1.7.1]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager//tree/1.7.1
[1.7.0]: https://github.com/brainelectronics/Micropython-ESP-WiFi-Manager//tree/1.7.0
Expand Down
21 changes: 21 additions & 0 deletions microdot/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Miguel Grinberg

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
5 changes: 5 additions & 0 deletions microdot/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-

from .microdot import *
from .microdot_utemplate import *
Loading

0 comments on commit 337db9f

Please sign in to comment.