Skip to content

Commit 5e8bc16

Browse files
committed
add tests; detect bag with parsing
1 parent f9ecca3 commit 5e8bc16

File tree

16 files changed

+349
-46
lines changed

16 files changed

+349
-46
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
## Bug description
11+
12+
<!-- A clear and concise description of what the bug is. -->
13+
14+
- Would you like to work on a fix? [y/n]
15+
16+
## To Reproduce
17+
18+
Steps to reproduce the behavior:
19+
20+
1. ...
21+
2. ...
22+
3. ...
23+
4. ...
24+
25+
<!-- Make sure you are able to reproduce the bug in the main branch, too. -->
26+
27+
## Expected behavior
28+
29+
<!-- A clear and concise description of what you expected to happen. -->
30+
31+
## Screenshots
32+
33+
<!-- If applicable, add screenshots to help explain your problem. -->
34+
35+
## Environment
36+
37+
<!-- Please fill the following information. -->
38+
39+
- OS: [e.g. Ubuntu 20.04]
40+
- {{project-name}} version: [e.g. 0.1.0]
41+
42+
## Additional context
43+
44+
<!-- Add any other context about the problem here. -->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
## Motivations
11+
12+
<!--
13+
If your feature request is related to a problem, please describe it.
14+
-->
15+
16+
- Would you like to implement this feature? [y/n]
17+
18+
## Solution
19+
20+
<!-- Describe the solution you'd like. -->
21+
22+
## Alternatives
23+
24+
<!-- Describe any alternative solutions or features you've considered. -->
25+
26+
## Additional context
27+
28+
<!-- Add any other context or screenshots about the feature request here. -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!-- Please explain the changes you made -->
2+
3+
<!--
4+
Please, make sure:
5+
- you have read the contributing guidelines:
6+
https://github.com/{{gh-username}}/{{project-name}}/blob/main/docs/CONTRIBUTING.md
7+
- you have formatted the code using rustfmt:
8+
https://github.com/rust-lang/rustfmt
9+
- you have checked that all tests pass, by running `cargo test --workspace`
10+
- you have updated the changelog (if needed):
11+
https://github.com/{{gh-username}}/{{project-name}}/blob/main/CHANGELOG.md
12+
-->

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
# Look for `Cargo.toml` and `Cargo.lock` in the root directory
5+
directory: "/"
6+
# Check for updates every Monday
7+
schedule:
8+
interval: "weekly"
9+
open-pull-requests-limit: 10
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
# Check for updates every Monday
13+
schedule:
14+
interval: "weekly"
15+
open-pull-requests-limit: 10
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Python package
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: [3.10", "3.11", "3.12", "3.13"]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v3
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install flake8 pytest
31+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
32+
- name: Lint with flake8
33+
run: |
34+
# stop the build if there are Python syntax errors or undefined names
35+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
38+
- name: Test with pytest
39+
run: |
40+
pytest tests

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
commit f9ecca35b7d71e353189b7dce8f6f5eb02b85ad3
2+
Author: Alexeev Bronislav <[email protected]>
3+
Date: Wed Jul 2 02:46:35 2025 +0700
4+
5+
fix codestyle
6+
17
commit 82170e19ded965029a5bd645daa07744b202f26e
28
Author: Alexeev Bronislav <[email protected]>
39
Date: Sat Jun 28 06:56:01 2025 +0700

examples/random_examples/simple_api.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ def post(self, request, response, **kwargs):
3131
)
3232

3333

34+
@echonext.route_page('/{name}/')
35+
def index(request, response, name):
36+
return name
37+
38+
3439
@echonext.route_page("/book")
3540
class BooksResource(PageController):
3641
def get(self, request, response, **kwargs):

examples/random_examples/simple_app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ def __repr__(self):
2727
return f"<User {self.pk}>"
2828

2929

30-
@echonext.route_page("/")
31-
def home(request, response):
32-
user = User(name="John", cash=100.0)
30+
@echonext.route_page("/{name}")
31+
def home(request, response, name):
32+
user = User(name=name, cash=100.0)
3333
session.add(user)
3434
session.commit()
3535
return "Hello from the HOME page"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license = "LGPL-2.1"
77
readme = "README.md"
88

99
[tool.poetry.dependencies]
10-
python = ">=3.11,<4.0"
10+
python = ">=3.10,<4.0"
1111
rich = "^14.0.0"
1212
gunicorn = "^23.0"
1313
pysocks = "^1.7"

0 commit comments

Comments
 (0)