Skip to content

Commit eb49db0

Browse files
committed
Merge branch 'release-v1.0.0'
2 parents bc6f3cb + f8b3c65 commit eb49db0

File tree

461 files changed

+34958
-18251
lines changed

Some content is hidden

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

461 files changed

+34958
-18251
lines changed

.env.docker.dev

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ export [email protected]
4343
# export MAP_ATTRIBUTION=
4444
# export DEFAULT_STATICMAP=False
4545

46+
# Geospatial features
47+
# export NOMINATIM_URL=
48+
# Temporary flag, to enable after recalculate all workouts with file, created
49+
# before v1.0.x. It only affects the user interface.
50+
# export ENABLE_GEOSPATIAL_FEATURES=False
51+
4652
# Weather
4753
# available weather API providers: visualcrossing
4854
# export WEATHER_API_PROVIDER=

.env.docker.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ export SENDER_EMAIL=
4545
# export MAP_ATTRIBUTION=
4646
# export DEFAULT_STATICMAP=False
4747

48+
# Geospatial features
49+
# export NOMINATIM_URL=
50+
# Temporary flag, to enable after recalculate all workouts with file, created
51+
# before v1.0.x. It only affects the user interface.
52+
# export ENABLE_GEOSPATIAL_FEATURES=False
53+
4854
# Weather
4955
# available weather API providers: visualcrossing
5056
# export WEATHER_API_PROVIDER=

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ export SENDER_EMAIL=
3939
# export MAP_ATTRIBUTION=
4040
# export DEFAULT_STATICMAP=False
4141

42+
# Geospatial features
43+
# export NOMINATIM_URL=
44+
# Temporary flag, to enable after recalculate all workouts with file, created
45+
# before v1.0.x. It only affects the user interface.
46+
# export ENABLE_GEOSPATIAL_FEATURES=False
47+
4248
# Weather
4349
# available weather API providers: visualcrossing
4450
# export WEATHER_API_PROVIDER=

.github/workflows/.e2e-tests.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
postgres-version:
88
type: string
99
default: 17
10+
postgis-version:
11+
type: string
12+
default: 3.5
1013
previous-version:
1114
type: boolean
1215
default: false
@@ -17,7 +20,7 @@ jobs:
1720
container: python:${{ inputs.python-version }}
1821
services:
1922
postgres:
20-
image: postgres:${{ inputs.postgres-version }}
23+
image: postgis/postgis:${{ inputs.postgres-version }}-${{ inputs.postgis-version }}-alpine
2124
env:
2225
POSTGRES_DB: fittrackee_test
2326
POSTGRES_USER: fittrackee
@@ -49,6 +52,16 @@ jobs:
4952
with:
5053
persist-credentials: false
5154

55+
- name: Create and source virtual environment
56+
run: |
57+
python3 -m venv .venv
58+
. .venv/bin/activate
59+
60+
- name: Create Postgis extension
61+
run: |
62+
python3 -m pip install psycopg2
63+
python db/install_postgis_for_ci_e2e_package_tests.py
64+
5265
- name: Install previous version of FitTrackee from PyPI
5366
if: inputs.python-version.previous-version
5467
run: python3 -m pip install fittrackee
@@ -63,11 +76,6 @@ jobs:
6376
name: python-package-distributions
6477
path: dist/
6578

66-
- name: Create and source virtual environment
67-
run: |
68-
python3 -m venv .venv
69-
. .venv/bin/activate
70-
7179
- name: Install fittrackee package
7280
run: python3 -m pip install dist/fittrackee-$(cat VERSION).tar.gz
7381

.github/workflows/.tests-and-publish-python.yml

Lines changed: 61 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,21 @@ on:
77
'e2e/**',
88
'pyproject.toml',
99
'poetry.lock',
10+
'VERSION',
1011
'.github/workflows/.tests-and-publish-python.yml',
11-
'.github/workflows/.e2e-tests.yml'
12+
'.github/workflows/.e2e-tests.yml',
13+
'!fittrackee/dist/**'
1214
]
1315
pull_request:
1416
paths: [
1517
'fittrackee/**',
1618
'e2e/**',
1719
'pyproject.toml',
1820
'poetry.lock',
21+
'VERSION',
1922
'.github/workflows/.tests-and-publish-python.yml',
20-
'.github/workflows/.e2e-tests.yml'
23+
'.github/workflows/.e2e-tests.yml',
24+
'!fittrackee/dist/**'
2125
]
2226
types: [opened, synchronize, reopened]
2327

@@ -34,12 +38,12 @@ env:
3438
jobs:
3539
python:
3640
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.fork }}
37-
name: python ${{ matrix.python-version }} (postgresql 17)
41+
name: python ${{ matrix.python-version }} (postgis 17-3.5)
3842
runs-on: ubuntu-latest
3943
container: python:${{ matrix.python-version }}
4044
services:
4145
postgres:
42-
image: postgres:17
46+
image: postgis/postgis:17-3.5-alpine
4347
env:
4448
POSTGRES_PASSWORD: postgres
4549
options: >-
@@ -49,7 +53,7 @@ jobs:
4953
--health-retries 5
5054
strategy:
5155
matrix:
52-
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
56+
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
5357
steps:
5458

5559
- uses: actions/checkout@v4
@@ -83,31 +87,67 @@ jobs:
8387
- name: Coveralls
8488
if: ${{ matrix.python-version == '3.10' && github.repository == 'SamR1/FitTrackee' }}
8589
env:
86-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
90+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8791
run: |
8892
pip install coveralls
8993
git config --global --add safe.directory "$GITHUB_WORKSPACE"
90-
coveralls --service=github-actions
94+
coveralls
9195
9296
- name: Pytest
9397
if: matrix.python-version != '3.10'
9498
run: pytest fittrackee -n auto --maxprocesses=2 -p no:warnings --maxfail=1
9599

96-
python-next:
100+
# needs cffi 2+ for Python 3.14 support
101+
# python-next:
102+
# if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.fork }}
103+
# name: python 3.14-rc (postgis 17-3.5)
104+
# runs-on: ubuntu-latest
105+
# container: python:3.14-rc
106+
# services:
107+
# postgres:
108+
# image: postgis/postgis:17-3.5-alpine
109+
# env:
110+
# POSTGRES_PASSWORD: postgres
111+
# options: >-
112+
# --health-cmd pg_isready
113+
# --health-interval 10s
114+
# --health-timeout 5s
115+
# --health-retries 5
116+
# steps:
117+
#
118+
# - uses: actions/checkout@v4
119+
#
120+
# - name: Install Poetry and Dependencies
121+
# run: |
122+
# python -m pip install --upgrade pip
123+
# pip install --quiet poetry
124+
# poetry config virtualenvs.create false
125+
# poetry install --no-interaction --quiet
126+
#
127+
# - name: Create test databases
128+
# run: python db/create_ci_test_db.py
129+
#
130+
# - name: Pytest
131+
# run: pytest fittrackee -n auto --maxprocesses=2 -p no:warnings --maxfail=1
132+
133+
postgis:
97134
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.fork }}
98-
name: python 3.14-rc (postgresql 17)
135+
name: postgis ${{ matrix.psql-version }} (python 3.10)
99136
runs-on: ubuntu-latest
100-
container: python:3.14-rc
137+
container: python:3.10
101138
services:
102139
postgres:
103-
image: postgres:17
140+
image: postgis/postgis:${{ matrix.psql-version }}-alpine
104141
env:
105142
POSTGRES_PASSWORD: postgres
106143
options: >-
107144
--health-cmd pg_isready
108145
--health-interval 10s
109146
--health-timeout 5s
110147
--health-retries 5
148+
strategy:
149+
matrix:
150+
psql-version: [ "13-3.5", "14-3.5", "15-3.5", "16-3.5", "17-3.4", "17-3.6", "18-3.6" ]
111151
steps:
112152

113153
- uses: actions/checkout@v4
@@ -123,26 +163,24 @@ jobs:
123163
run: python db/create_ci_test_db.py
124164

125165
- name: Pytest
126-
run: pytest fittrackee -n auto --maxprocesses=2 -p no:warnings --maxfail=1
166+
run: pytest fittrackee -n auto --maxprocesses=2 -p no:warnings --maxfail=1
167+
127168

128-
postgresql:
169+
arm:
129170
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.fork }}
130-
name: postgresql ${{ matrix.psql-version }} (python 3.10)
131-
runs-on: ubuntu-latest
132-
container: python:3.10
171+
name: postgis 17-3.5 on arm platform (python 3.13)
172+
runs-on: ubuntu-24.04-arm
173+
container: python:3.13
133174
services:
134175
postgres:
135-
image: postgres:${{ matrix.psql-version }}
176+
image: imresamu/postgis:17-3.5-alpine
136177
env:
137178
POSTGRES_PASSWORD: postgres
138179
options: >-
139180
--health-cmd pg_isready
140181
--health-interval 10s
141182
--health-timeout 5s
142183
--health-retries 5
143-
strategy:
144-
matrix:
145-
psql-version: [ "12", "13", "14", "15", "16" ]
146184
steps:
147185

148186
- uses: actions/checkout@v4
@@ -168,7 +206,7 @@ jobs:
168206
container: python:3.13
169207
services:
170208
postgres:
171-
image: postgres:17
209+
image: postgis/postgis:17-3.5-alpine
172210
env:
173211
POSTGRES_DB: fittrackee_test
174212
POSTGRES_USER: fittrackee
@@ -273,7 +311,7 @@ jobs:
273311
publish-to-pypi:
274312
if: github.repository == 'SamR1/FitTrackee' && startsWith(github.ref, 'refs/tags/v')
275313
name: Publish Python distribution to PyPI
276-
needs: ["end2end", "end2end_package", "end2end_package_update"]
314+
needs: ["postgis", "arm", "end2end", "end2end_package", "end2end_package_update"]
277315
runs-on: ubuntu-latest
278316
environment:
279317
name: pypi
@@ -336,7 +374,7 @@ jobs:
336374
push_to_registries:
337375
if: github.repository == 'SamR1/FitTrackee' && startsWith(github.ref, 'refs/tags/v')
338376
name: Push Docker image to multiple registries
339-
needs: ["end2end", "end2end_package", "end2end_package_update"]
377+
needs: ["postgis", "arm", "end2end", "end2end_package", "end2end_package_update"]
340378
runs-on: ubuntu-latest
341379
permissions:
342380
contents: read

.github/workflows/.tests-javascript.yml

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,27 @@ name: Javascript CI
22

33
on:
44
push:
5-
paths: ['fittrackee_client/**', '.github/workflows/.tests-javascript.yml']
5+
paths: [
6+
'fittrackee_client/**',
7+
'fittrackee/dist/**',
8+
'.github/workflows/.tests-javascript.yml'
9+
]
610
pull_request:
7-
paths: ['fittrackee_client/**', '.github/workflows/.tests-javascript.yml']
11+
paths: [
12+
'fittrackee_client/**',
13+
'fittrackee/dist/**',
14+
'.github/workflows/.tests-javascript.yml'
15+
]
816
types: [opened, synchronize, reopened]
917

1018
env:
1119
working-directory: fittrackee_client
20+
APP_SETTINGS: fittrackee.config.TestingConfig
21+
DATABASE_TEST_URL: "postgresql://fittrackee:fittrackee@postgres:5432/fittrackee_test"
22+
EMAIL_URL: "smtp://none:[email protected]:1025"
23+
FLASK_APP: fittrackee/__main__.py
24+
SENDER_EMAIL: [email protected]
25+
UI_URL: https://0.0.0.0:5000
1226

1327
jobs:
1428
javascript:
@@ -40,3 +54,52 @@ jobs:
4054
- name: Build
4155
working-directory: ${{env.working-directory}}
4256
run: yarn build
57+
58+
end2end:
59+
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.fork }}
60+
name: e2e tests with sources
61+
runs-on: ubuntu-latest
62+
container: python:3.13
63+
services:
64+
postgres:
65+
image: postgis/postgis:17-3.5-alpine
66+
env:
67+
POSTGRES_DB: fittrackee_test
68+
POSTGRES_USER: fittrackee
69+
POSTGRES_PASSWORD: fittrackee
70+
options: >-
71+
--health-cmd pg_isready
72+
--health-interval 10s
73+
--health-timeout 5s
74+
--health-retries 5
75+
selenium:
76+
image: selenium/standalone-firefox
77+
mailhog:
78+
image: mailhog/mailhog:latest
79+
redis:
80+
image: redis:latest
81+
env:
82+
APP_SETTINGS: fittrackee.config.End2EndTestingConfig
83+
EMAIL_URL: "smtp://mailhog:1025"
84+
REDIS_URL: "redis://redis:6379"
85+
steps:
86+
87+
- uses: actions/checkout@v4
88+
89+
- name: Install Poetry and Dependencies
90+
run: |
91+
python -m pip install --upgrade pip
92+
pip install --quiet poetry
93+
poetry config virtualenvs.create false
94+
poetry install --no-interaction --quiet
95+
96+
- name: Run migrations
97+
run: flask db upgrade --directory fittrackee/migrations
98+
99+
- name: Start application and run tests with Selenium
100+
run: |
101+
setsid nohup flask run --with-threads -h 0.0.0.0 -p 5000 >> nohup.out 2>&1 &
102+
export TEST_APP_URL=http://$(hostname --ip-address):5000
103+
sleep 5
104+
nohup dramatiq fittrackee.tasks:broker --processes=1 >> nohup.out 2>&1 &
105+
pytest e2e --driver Remote --capability browserName firefox --selenium-host selenium --selenium-port 4444 --maxfail=1

0 commit comments

Comments
 (0)