Skip to content
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

WIP: JavaScript Rewrite #2

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c282366
setup karma and rollup
lenadax Aug 16, 2021
ab6573c
es6 refactor wip
rnixx Oct 2, 2021
5728ed8
Basic ES6 refactoring
rnixx Oct 3, 2021
885e9cc
remove import of globals
rnixx Oct 3, 2021
f661750
Fix geosearch handling
rnixx Oct 3, 2021
e73cc50
Fallback bdajax registration
rnixx Nov 4, 2021
f7bd39d
Introduce ``extract_zoom`` widget property. Defines whether to includ…
rnixx Nov 9, 2021
6ae2ce8
Support direct Lat/Lon input.
rnixx Nov 13, 2021
96404b8
Basic JS input handles
rnixx Nov 13, 2021
fc95cc6
Test coverage sane again
rnixx Nov 13, 2021
3e5f131
Tile layers for map widget are configurable now.
rnixx Nov 18, 2021
8f7323f
Add po file headers
rnixx Nov 21, 2021
1c787d3
rollup and karma conf
lenadax Jan 21, 2022
5bb8906
housekeeping
lenadax Mar 15, 2022
c20f2e4
add coverage and test shell scripts
lenadax Mar 15, 2022
6e33e71
update autoWatch config
lenadax Mar 17, 2022
a177508
housekeeping
lenadax May 5, 2022
435f064
add github tests
lenadax May 6, 2022
297ba3d
fix typo
lenadax May 10, 2022
956ab18
update bundle
lenadax May 10, 2022
a5f9c68
test setup, fix leaflet missing in karma, add js action
lenadax May 10, 2022
80dc573
Merge pull request #3 from conestack/js_tests
rnixx May 11, 2022
d6c0ead
ensure correct location of node_modules
lenadax May 12, 2022
13cb194
"Simplify IIFE bundle outro"
rnixx May 20, 2022
71f6caf
"Karma coverage validation script formatting"
rnixx May 20, 2022
dc378c3
"Consistent naming when attaching yafowil widget instance to DOM elem"
rnixx May 20, 2022
e9ca2b7
"Register resources with webresource"
rnixx May 21, 2022
d6b0387
Update bundle
rnixx May 23, 2022
cb6dea1
"Update webresource registration"
rnixx May 25, 2022
ef6f21a
"Add path to webresource groups"
rnixx May 25, 2022
ce36aca
"Adopt webresource registrations"
rnixx May 28, 2022
bcb2643
"Test housekeeping"
rnixx May 29, 2022
e4e1e5e
"Install webresource from repo for tests"
rnixx May 29, 2022
b405fc6
"Add resource tests"
rnixx May 30, 2022
22bb134
"dedicated widget import in tests"
rnixx May 30, 2022
60426fd
Resource group name is widget name.
rnixx May 30, 2022
8d91d54
prevent initializing on array template
lenadax Dec 15, 2022
ee8a8fe
array hooks
lenadax Dec 15, 2022
41ccd70
improve yafowil_array subscribers
lenadax Dec 20, 2022
75b5575
fix missing semicolon. update changelog
lenadax Dec 20, 2022
35ac4a1
imporve arraytemplate check
lenadax Dec 22, 2022
5d6970e
Use yafowil_array.inside_template API to check whether widget gets in…
lenadax Mar 9, 2023
97c89ce
compiled js
lenadax Mar 9, 2023
aae85d8
Merge pull request #4 from conestack/array_hooks
rnixx Mar 9, 2023
3c002eb
Use default ``zoom`` if ``extract_zoom`` is ``True`` but no zoom give…
rnixx Mar 28, 2023
3219399
mxmake setup
lenadax Oct 31, 2024
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
20 changes: 20 additions & 0 deletions .github/workflows/test_js.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: JS tests

on: [push]

jobs:
test:
name: Test

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install
run: |
corepack enable
make nodejs

- name: Run tests
run: make wtr
50 changes: 50 additions & 0 deletions .github/workflows/test_py.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Python tests

on: [push]

jobs:
test:
name: Test ${{ matrix.python }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest

python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Install
run: |
pip install wheel
pip install coverage
pip install https://github.com/conestack/webresource/archive/master.zip
pip install https://github.com/conestack/yafowil/archive/master.zip
pip install -e .[test]

- name: Run tests
run: |
python --version
python -m pytest src/yafowil/widget/location/tests

- name: Run coverage
run: |
coverage run --source=src/yafowil/widget/location --omit=src/yafowil/widget/location/example.py -m pytest src/yafowil/widget/location/tests
coverage report --fail-under=99
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
*.egg-info
*.pyc
*.pyo
/src/yafowil.widget.location.egg-info/
/.coverage
/.mxmake/
/coverage/
/dist/
/htmlcov/
/js/karma/
/node_modules/
/package-lock.json
/pnpm-lock.yaml
/py2/
/py3/
/pypy3/
/requirements-mxdev.txt
/venv/
42 changes: 40 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,48 @@
Changes
=======

1.3 (unreleased)
2.0 (unreleased)
----------------

- No changes yet.
- Use default ``zoom`` if ``extract_zoom`` is ``True`` but no zoom given on
request.
[rnix]

- Prevent initialize if widget is part of array template.
[lenadax]

- Extend JS by ``location_on_array_add`` and ``register_array_subscribers``
functions to enable usage in ``yafowil.widget.array``.
[lenadax]

- Rewrite JavaScript using ES6.
[rnix]

- Introduce ``show_lat_lon`` widget property. If True, latitude and longtude
additionally can be entered manually in inpuf fields.
[rnix]

- Consider ``emptyvalue`` at extraction time.
[rnix]

- Introdude ``factory`` widget property. Defines a factory which is used to
instance ectraction value.
[rnix]

- Introduce ``extract_zoom`` widget property. Defines whether to include
zoom level on extracted value.
[rnix]

- Rewrite Javascript with ES6 classes.
[rnix]

- Update leaflet to 1.7.1 and leaflet-geosearch to 3.5.0.
[rnix]

**Breaking changes**

- Empty extration value is ``None`` instead of empty dictionary.
[rnix]


1.2 (2018-07-16)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ License
=======

Copyright (c) 2014-2021, BlueDynamics Alliance, Austria, Germany, Switzerland
Copyright (c) 2021, Yafowil Contributors
Copyright (c) 2021-2024, Yafowil Contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
Loading
Loading