Skip to content

Commit

Permalink
Merge pull request #360 from SamR1/add-social-features
Browse files Browse the repository at this point in the history
Add social features [1st part]
  • Loading branch information
SamR1 authored Dec 14, 2024
2 parents 1707aa7 + a2d0d1e commit 3065f10
Show file tree
Hide file tree
Showing 749 changed files with 92,263 additions and 13,224 deletions.
1 change: 1 addition & 0 deletions .github/workflows/.tests-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
EMAIL_URL: "smtp://none:[email protected]:1025"
FLASK_APP: fittrackee/__main__.py
SENDER_EMAIL: [email protected]
UI_URL: https://0.0.0.0:5000

jobs:
python:
Expand Down
17 changes: 13 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,12 @@ docker-serve-client:
docker compose -f docker-compose-dev.yml exec fittrackee_client $(NPM) dev

docker-set-admin:
# deprecated command
docker compose -f docker-compose-dev.yml exec fittrackee ftcli users update $(USERNAME) --set-admin true

docker-set-role:
docker compose -f docker-compose-dev.yml exec fittrackee ftcli users update $(USERNAME) --set-role $(ROLE)

docker-shell:
docker compose -f docker-compose-dev.yml exec fittrackee docker/shell.sh

Expand Down Expand Up @@ -239,10 +243,6 @@ serve-python-dev:
echo 'Running on https://$(HOST):$(PORT)'
$(FLASK) run --with-threads -h $(HOST) -p $(PORT) --cert=adhoc

set-admin:
echo "Deprecated command, will be removed in a next version. Use 'user-set-admin' instead."
$(FTCLI) users update $(USERNAME) --set-admin true

test-all: test-client test-python

test-e2e:
Expand All @@ -252,6 +252,11 @@ test-e2e-client:
E2E_ARGS=client $(PYTEST) e2e --driver firefox $(PYTEST_ARGS)

test-python:
# for tests parallelization: 4 workers max.
# make test-python PYTEST_ARGS="-p no:warnings -n auto --maxprocesses=4"
$(PYTEST) fittrackee $(PYTEST_ARGS)

test-python-cov:
# for tests parallelization: 4 workers max.
# make test-python PYTEST_ARGS="-p no:warnings -n auto --maxprocesses=4"
$(PYTEST) fittrackee --cov-config .coveragerc --cov=fittrackee --cov-report term-missing $(PYTEST_ARGS)
Expand Down Expand Up @@ -282,7 +287,11 @@ user-reset-password:

ADMIN := true
user-set-admin:
# deprecated command
$(FTCLI) users update $(USERNAME) --set-admin $(ADMIN)

user-set-role:
$(FTCLI) users update $(USERNAME) --set-role $(ROLE)

user-update-email:
$(FTCLI) users update $(USERNAME) --update-email $(EMAIL)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Map data from [OpenStreetMap](https://www.openstreetmap.org).
**Under heavy development (some features may be unstable).**
(see [issues](https://github.com/SamR1/FitTrackee/issues) and [documentation](https://samr1.github.io/FitTrackee) for more info.)

![FitTrackee Dashboard Screenshot](https://samr1.github.io/FitTrackee/en/_images/fittrackee_screenshot-01.png)
![FitTrackee Dashboard Screenshot](https://samr1.github.io/FitTrackee/en/_images/dashboard.png)

## Translations

Expand Down
Binary file added docs/en/_images/administration-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en/_images/dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en/_images/equipment-detail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en/_images/equipments-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/en/_images/fittrackee_screenshot-01.png
Binary file not shown.
Binary file removed docs/en/_images/fittrackee_screenshot-02.png
Binary file not shown.
Binary file removed docs/en/_images/fittrackee_screenshot-03.png
Binary file not shown.
Binary file removed docs/en/_images/fittrackee_screenshot-04.png
Binary file not shown.
Binary file removed docs/en/_images/fittrackee_screenshot-05.png
Binary file not shown.
Binary file removed docs/en/_images/fittrackee_screenshot-06.png
Binary file not shown.
Binary file removed docs/en/_images/fittrackee_screenshot-07.png
Binary file not shown.
Binary file removed docs/en/_images/fittrackee_screenshot-08.png
Binary file not shown.
Binary file removed docs/en/_images/fittrackee_screenshot-09.png
Binary file not shown.
Binary file removed docs/en/_images/fittrackee_screenshot-10.png
Binary file not shown.
Binary file removed docs/en/_images/fittrackee_screenshot-11.png
Binary file not shown.
Binary file added docs/en/_images/notifications.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en/_images/oauth2-app-authorization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en/_images/oauth2-client-creation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en/_images/sports-administration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en/_images/statistics-by-sport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en/_images/statistics-by-time-period.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en/_images/users-directory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en/_images/workout-detail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en/_images/workouts-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion docs/en/_sources/api/auth.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ Authentication and account
auth.accept_privacy_policy,
auth.get_user_data_export,
auth.request_user_data_export,
auth.download_data_export
auth.download_data_export,
auth.get_blocked_users,
auth.get_user_suspension,
auth.appeal_user_suspension,
auth.get_user_sanction,
auth.appeal_user_sanction
14 changes: 14 additions & 0 deletions docs/en/_sources/api/comments.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Comments
########

.. autoflask:: fittrackee:create_app()
:endpoints:
comments.get_workout_comments,
comments.get_workout_comment,
comments.post_workout_comment,
comments.update_workout_comment,
comments.like_comment,
comments.undo_comment_like,
comments.appeal_comment_suspension,
comments.delete_workout_comment

8 changes: 8 additions & 0 deletions docs/en/_sources/api/follow_requests.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Follow requests
###############

.. autoflask:: fittrackee:create_app()
:endpoints:
follow_requests.get_follow_requests,
follow_requests.accept_follow_request,
follow_requests.reject_follow_request
5 changes: 5 additions & 0 deletions docs/en/_sources/api/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ API documentation

auth
configuration
comments
equipments
equipment_types
follow_requests
oauth2
notifications
records
reports
sports
stats
timeline
users
workouts
10 changes: 10 additions & 0 deletions docs/en/_sources/api/notifications.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Notifications
#############

.. autoflask:: fittrackee:create_app()
:endpoints:
notifications.get_auth_user_notifications,
notifications.update_user_notifications,
notifications.get_status,
notifications.mark_all_as_read,
notifications.get_notification_types
14 changes: 14 additions & 0 deletions docs/en/_sources/api/reports.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Reports
########

.. autoflask:: fittrackee:create_app()
:endpoints:
reports.get_reports,
reports.get_report,
reports.get_unresolved_reports_status,
reports.create_report,
reports.update_report,
reports.create_action,
reports.process_appeal


6 changes: 6 additions & 0 deletions docs/en/_sources/api/timeline.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Timeline
########

.. autoflask:: fittrackee:create_app()
:endpoints:
timeline.get_user_timeline
9 changes: 8 additions & 1 deletion docs/en/_sources/api/users.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@ Users
users.get_single_user,
users.get_picture,
users.update_user,
users.delete_user
users.delete_user,
users.follow_user,
users.unfollow_user,
users.get_followers,
users.get_following,
users.block_user,
users.unblock_user,
users.get_user_sanctions
5 changes: 4 additions & 1 deletion docs/en/_sources/api/workouts.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ Workouts
workouts.post_workout,
workouts.post_workout_no_gpx,
workouts.update_workout,
workouts.delete_workout
workouts.delete_workout,
workouts.like_workout,
workouts.undo_workout_like,
workouts.appeal_workout_suspension
11 changes: 6 additions & 5 deletions docs/en/_sources/cli.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,14 @@ Remove blacklisted tokens expired for more than provided number of days.
``ftcli users create``
""""""""""""""""""""""
.. versionadded:: 0.7.15
.. versionchanged:: 0.8.4 User preference for interface language is added.

Create a user account.

.. note::
- the newly created account is already active.
- the CLI allows to create users when registration is disabled.

.. versionchanged:: 0.8.4

User preference for interface language is added.

.. cssclass:: table-bordered
.. list-table::
Expand Down Expand Up @@ -147,8 +145,9 @@ Can be used if redis is not set (no dramatiq workers running).
``ftcli users update``
""""""""""""""""""""""
.. versionadded:: 0.6.5
.. versionchanged:: 0.9.0 Add ``--set-role`` option. ``--set-admin`` is now deprecated.

Modify a user account (admin rights, active status, email and password).
Modify a user account (role, active status, email and password).

.. cssclass:: table-bordered
.. list-table::
Expand All @@ -160,7 +159,9 @@ Modify a user account (admin rights, active status, email and password).
* - ``USERNAME``
- Username.
* - ``--set-admin BOOLEAN``
- Add/remove admin rights (when adding admin rights, it also activates user account if not active).
- [DEPRECATED] Add/remove admin rights (when adding admin rights, it also activates user account if not active).
* - ``--set-role ROLE``
- Set user role (when setting 'moderator', 'admin' and 'owner' role, it also activates user account if not active).
* - ``--activate``
- Activate user account.
* - ``--reset-password``
Expand Down
Loading

0 comments on commit 3065f10

Please sign in to comment.