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

Back to School 2023 Release #965

Merged
merged 713 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
713 commits
Select commit Hold shift + click to select a range
47e5203
Surpress warnings from models
bdmendes Jul 21, 2023
44b5d76
Merge remote-tracking branch 'origin/develop' into ci/format-job
thePeras Jul 22, 2023
c5871bb
Update GitHub actions versions
thePeras Jul 22, 2023
6bc8c19
Implemented job to check if code is formated (#853) [no ci]
bdmendes Jul 22, 2023
0ff1f0d
Update README.md
bdmendes Jul 22, 2023
9f87b00
Add pre-commit hook
LuisDuarte1 Jul 22, 2023
1cc4b61
More models and fix startup providers
LuisDuarte1 Jul 22, 2023
5097e42
Merge branch 'develop' into feature/change-ni-logo-color
thePeras Jul 22, 2023
60cd7c1
bus_stop and text_field fixed
LuisDuarte1 Jul 22, 2023
eeb9f04
Fix most cards
LuisDuarte1 Jul 22, 2023
ca1bc6f
Merge branch 'develop' into refactor/remove-completers
bdmendes Jul 22, 2023
d130c6b
Increase default timeout to 10s and add parameterized timeout
Sirze01 Jul 22, 2023
fc49295
Remove generated dart files from the pre commit hook
LuisDuarte1 Jul 22, 2023
4c7bfb1
Merge branch 'develop' into fix/get-with-cookies-timeout
Sirze01 Jul 22, 2023
7f089b3
Fix readme badges (#865)
Sirze01 Jul 22, 2023
518e313
Merge branch 'develop' into feature/change-ni-logo-color
Sirze01 Jul 22, 2023
8a4a44a
Feature/change ni logo color (#840)
Sirze01 Jul 22, 2023
e41da1d
Bump app version [no ci]
Sirze01 Jul 22, 2023
493133d
most of the views done
LuisDuarte1 Jul 22, 2023
ffe29a9
all views without errors
LuisDuarte1 Jul 22, 2023
7bf4466
Merge branch 'develop' into refactor/remove-completers
bdmendes Jul 23, 2023
071ea0c
Merge branch 'develop' into fix/get-with-cookies-timeout
bdmendes Jul 23, 2023
a20ef9e
Refactor/remove completers (#849)
LuisDuarte1 Jul 23, 2023
9e4382e
Bump app version [no ci]
LuisDuarte1 Jul 23, 2023
0858b6a
Make use Duration(s) instead of creating them based on arguments
Sirze01 Jul 23, 2023
fd05908
Merge branch 'develop' into fix/get-with-cookies-timeout
bdmendes Jul 23, 2023
f65fd86
Add timeout to requests made by getWithCookies (#856)
thePeras Jul 23, 2023
9197660
Bump app version [no ci]
thePeras Jul 23, 2023
9870485
Update update time only if successfull
bdmendes Jul 21, 2023
ee7374c
Rewrite method to make it more clear
bdmendes Jul 22, 2023
19ad5f9
Update status via wrapper to ensure notification
bdmendes Jul 22, 2023
98f2169
Weekday and restart bug fix
DGoiana Jul 24, 2023
03b3d33
Conflicts solving
DGoiana Jul 24, 2023
59abeb9
Format fix
DGoiana Jul 24, 2023
149af1b
Update update time only if successful (#862)
Sirze01 Jul 24, 2023
9804c0d
Bump app version [no ci]
Sirze01 Jul 24, 2023
b1f2725
Merge branch 'develop' into fix/restaurant-card-visibility
Sirze01 Jul 24, 2023
56cd782
Merge branch 'develop' into feature/pre-commit-format
LuisDuarte1 Jul 26, 2023
bc94bbf
Update format_lint_test.yaml
LuisDuarte1 Jul 26, 2023
0990541
Make README.md formatting clear
LuisDuarte1 Jul 26, 2023
7ee23b3
Fix card adders popup
bdmendes Jul 23, 2023
b8e833c
Fix card adders popup (#869)
LuisDuarte1 Jul 27, 2023
2c0c1b9
Bump app version [no ci]
LuisDuarte1 Jul 27, 2023
2fe4784
fix executable permissions
LuisDuarte1 Jul 27, 2023
46f5259
fix install script on cases that the hook directory doesn't exist
LuisDuarte1 Jul 27, 2023
ceca3b0
Merge branch 'develop' into feature/pre-commit-format
thePeras Jul 27, 2023
f9b8164
Skip pre commit if there are no .dart files changed
LuisDuarte1 Jul 27, 2023
afd66c3
Merge branch 'develop' into fix/restaurant-card-visibility
Sirze01 Jul 27, 2023
9ff3d34
Add pre-commit hook (#867)
LuisDuarte1 Jul 27, 2023
a2a53aa
Bump app version [no ci]
LuisDuarte1 Jul 27, 2023
a47b5e7
fix all errors
LuisDuarte1 Jul 28, 2023
965cba5
Fix library parser
LuisDuarte1 Jul 28, 2023
e0b7d49
Make ALL linter suggestions
LuisDuarte1 Jul 28, 2023
1269215
Merge remote-tracking branch 'origin' into ci/aggressive-linter
LuisDuarte1 Jul 28, 2023
3e1fd50
fix main cards list
LuisDuarte1 Jul 28, 2023
b85bcc6
fix formatting
LuisDuarte1 Jul 28, 2023
ec653df
fix linter
LuisDuarte1 Jul 28, 2023
b344ab8
Remove manual print and balance refresh times
bdmendes Jul 28, 2023
6a1324c
Fix parsing of course units json
bdmendes Jul 28, 2023
c8bd612
Refactor helper functions in calendar
thePeras Jul 28, 2023
a38902a
fix api schedule parser
LuisDuarte1 Jul 29, 2023
1dfb8a9
fix relogin logic
LuisDuarte1 Jul 29, 2023
0c208a7
Fix relogin logic
LuisDuarte1 Jul 29, 2023
949d0e2
Fix relogin logic (#881)
thePeras Jul 29, 2023
82e9f33
Bump app version [no ci]
thePeras Jul 29, 2023
d873b75
Refactor helper functions in calendar
thePeras Jul 28, 2023
8615891
disable one_member_abstracts
LuisDuarte1 Jul 29, 2023
1d25e27
order pubspec
LuisDuarte1 Jul 29, 2023
e8afc2a
Merge branch 'develop' into ci/aggressive-linter
bdmendes Jul 30, 2023
883c583
Reset providers when logging out
bdmendes Jul 30, 2023
252b93e
Fix course units loading from database
bdmendes Jul 30, 2023
a0876c5
Fix current course units json parsing
bdmendes Jul 30, 2023
ff39ccf
Fix url query parser
bdmendes Jul 30, 2023
b6c206c
Fix empty classes on course unit detail
bdmendes Jul 30, 2023
3b9eef7
Fix empty course unit detail title
bdmendes Jul 30, 2023
755ab8c
Show all course units by default
bdmendes Jul 30, 2023
948b16c
Fix bus stops addition
bdmendes Jul 30, 2023
a15e3f1
Fix fees parser when no limit
bdmendes Jul 30, 2023
1bdf5d4
Fetch new trips after adding bus
bdmendes Jul 30, 2023
456320a
Fix fees parser index
bdmendes Jul 30, 2023
03afef8
Add style badge
bdmendes Jul 30, 2023
0bd7fb3
Fix repeated bug report widgets
bdmendes Jul 30, 2023
a5e9160
fix notification worker
LuisDuarte1 Jul 30, 2023
9bb7333
Ci/aggressive linter (#863)
bdmendes Aug 1, 2023
decfdcc
Bump app version [no ci]
bdmendes Aug 1, 2023
dc33944
Make build run on dev and master pushes
bdmendes Aug 1, 2023
1066db9
Add code cov to test step
bdmendes Aug 1, 2023
5e3295d
Add ignore yaml
bdmendes Aug 1, 2023
27cd1bb
Add coverage badge
bdmendes Aug 1, 2023
8f659ff
Setup PR coverage comments
bdmendes Aug 1, 2023
f804baf
Update flutter and dart versions and update mockito
LuisDuarte1 Aug 10, 2023
1d8aae8
apply dart fix
LuisDuarte1 Aug 10, 2023
d49b169
Make build run on dev and master pushes (#897)
LuisDuarte1 Aug 10, 2023
12eecac
Bump app version [no ci]
LuisDuarte1 Aug 10, 2023
84e12a3
make build.yaml
LuisDuarte1 Aug 10, 2023
88ea2e5
Merge branch 'develop' into ci/codecov
bdmendes Aug 10, 2023
919518b
Add code cov to test step (#898)
LuisDuarte1 Aug 10, 2023
bea33b7
Bump app version [no ci]
LuisDuarte1 Aug 10, 2023
8a0a19c
Removing useless methods and completers
DGoiana Aug 11, 2023
5a1071c
Conflicts solving
DGoiana Aug 11, 2023
77631b1
Update sentry version.
LuisDuarte1 Aug 14, 2023
805af28
Update sentry version (#915)
bdmendes Aug 18, 2023
712ff54
Bump app version [no ci]
bdmendes Aug 18, 2023
632c61e
Remove splash screen
bdmendes Aug 19, 2023
3749251
Tweak eager providers initialization logic
bdmendes Aug 19, 2023
d88a7bb
Move terms check to page transition
bdmendes Aug 19, 2023
b051cf9
Remove profile image provider
bdmendes Aug 19, 2023
5bd42b5
Conflicts solving
DGoiana Aug 19, 2023
1a44005
Delete Generated 2.xcconfig
DGoiana Aug 19, 2023
cec375a
Delete flutter_export_environment 2.sh
DGoiana Aug 19, 2023
c12fa53
Merge branch 'develop' into feature/migration-i18n
DGoiana Aug 19, 2023
e067dc1
Fix version error
DGoiana Aug 19, 2023
333096f
Fix version error
DGoiana Aug 19, 2023
ec4bd54
Multiprovider change
DGoiana Aug 19, 2023
a6e278d
Remove send GitHub issue code
thePeras Aug 20, 2023
766fb6b
Refactor/remove splash (#919)
thePeras Aug 20, 2023
8dc036b
Bump app version [no ci]
thePeras Aug 20, 2023
9295cdf
Fixed hover error
DGoiana Aug 20, 2023
1f673bd
Merge branch 'develop' into fix/hover-error-restaurants-page
DGoiana Aug 20, 2023
0aa828b
Fix calendar parsing
DGoiana Aug 20, 2023
5bfcb30
Merge remote-tracking branch 'origin/develop' into feature/test-null-…
LuisDuarte1 Aug 21, 2023
70eecde
tests running in null safe mode
LuisDuarte1 Aug 21, 2023
574cc12
Update flutter CI version
LuisDuarte1 Aug 21, 2023
2a38386
Fix linting
LuisDuarte1 Aug 21, 2023
913d188
Tab hover artifact restaurants page (#923)
LuisDuarte1 Aug 21, 2023
39f86c2
Bump app version [no ci]
LuisDuarte1 Aug 21, 2023
f362f6e
Send sentry user feedback from report
thePeras Aug 21, 2023
af9d64f
Fix theme issues on login page
bdmendes Aug 19, 2023
192deef
Fix theme issues on login page (#922)
bdmendes Aug 22, 2023
8518f37
Bump app version [no ci]
bdmendes Aug 22, 2023
8c1a759
Relax codecov config
bdmendes Aug 19, 2023
14a7eb6
Hide "Impressão" link from "Outros links" card.
Process-ing Aug 17, 2023
7dc87c8
Add "Consultas SASUP" link to "Outros links" card.
Process-ing Aug 17, 2023
9acbe3f
Add 'Consultas SASUP' to Useful links and hide prints link under "Úte…
Process-ing Aug 22, 2023
b03270d
Bump app version [no ci]
Process-ing Aug 22, 2023
0c848c7
Update deploy.yaml
LuisDuarte1 Aug 22, 2023
4b2afe2
Merge branch 'develop' into feature/test-null-safety
LuisDuarte1 Aug 22, 2023
d30ffb8
Merge branch 'refactor/calendar-helper-functions' of github.com:NIAEF…
thePeras Aug 22, 2023
ba72588
Merge branch 'develop' into refactor/calendar-helper-functions
thePeras Aug 22, 2023
40311a2
Merge branch 'develop' into ci/relax-codecov-check
thePeras Aug 22, 2023
fa2a3ed
fix linting
LuisDuarte1 Aug 22, 2023
d4a5be7
Relax codecov config (#921)
LuisDuarte1 Aug 24, 2023
3943c02
Bump app version [no ci]
LuisDuarte1 Aug 24, 2023
2fec680
Widget testing changes
DGoiana Aug 24, 2023
d96185f
update readme to accomodate generated files
LuisDuarte1 Aug 24, 2023
46c06b0
Exclude mock files from being formatted or linted
LuisDuarte1 Aug 24, 2023
0fd6eea
Merge branch 'develop' into feature/test-null-safety
LuisDuarte1 Aug 24, 2023
7a44a00
make pre-commit hook not format mock files
LuisDuarte1 Aug 24, 2023
437f379
Filter at parse lever
DGoiana Aug 24, 2023
8b8f5ab
Testable widget changes
DGoiana Aug 25, 2023
d7769fb
Restaurant widget moved to the bottom
DGoiana Aug 25, 2023
2a120a4
Merge branch 'develop' into fix/restaurant-card-visibility
DGoiana Aug 25, 2023
1142b57
Update README.md grammer
LuisDuarte1 Aug 25, 2023
6a0cf07
Restaurant card on the widgets menu (#738)
bdmendes Aug 25, 2023
db339bf
Bump app version [no ci]
bdmendes Aug 25, 2023
4418be7
Fixed tests errors
DGoiana Aug 25, 2023
510aaef
Conflicts solving
DGoiana Aug 25, 2023
fe7c7de
Gitignore Podfile generated by CocoaPods
thePeras Aug 25, 2023
078d9e3
Merge branch 'develop' into refactor/calendar-helper-functions
thePeras Aug 25, 2023
bfb18c6
Fix calendar parsing
DGoiana Aug 20, 2023
d514742
Filter at parse lever
DGoiana Aug 24, 2023
026038c
Refactor helper functions in calendar (#880)
LuisDuarte1 Aug 26, 2023
543a363
Bump app version [no ci]
LuisDuarte1 Aug 26, 2023
11e9964
Merge branch 'develop' into feature/migration-i18n
DGoiana Aug 26, 2023
d1a3580
Fix home page loading on card number regression
bdmendes Aug 13, 2023
d2fe205
Fix concurrent login requests
bdmendes Aug 13, 2023
3959c83
Wait for profile provider initialization
bdmendes Aug 14, 2023
6b9e52c
Fix/init hang (#911)
bdmendes Aug 31, 2023
0e85708
Bump app version [no ci]
bdmendes Aug 31, 2023
800ce69
Update target sdk version
bdmendes Aug 19, 2023
ec7643e
Update target sdk version (#920)
bdmendes Aug 31, 2023
43e6780
Bump app version [no ci]
bdmendes Aug 31, 2023
49cc294
Merge branch 'develop' into feature/test-null-safety
LuisDuarte1 Aug 31, 2023
a74885d
Merge branch 'develop' into feature/migration-i18n
DGoiana Aug 31, 2023
006e281
fix tests
LuisDuarte1 Aug 31, 2023
161bb92
Missed translations, inefficient enums removal
DGoiana Aug 31, 2023
7d62941
Merging
DGoiana Aug 31, 2023
707f75a
Login exceptions translation
DGoiana Aug 31, 2023
5b16bd0
Commit error fix
DGoiana Aug 31, 2023
9172bc6
Code cleaning
DGoiana Sep 3, 2023
38b958e
Lint fixing
DGoiana Sep 3, 2023
4cbe514
Merging
DGoiana Sep 3, 2023
183f7ea
Cleaning code
DGoiana Sep 3, 2023
8e6d10f
Merge branch 'develop' into fix/calendar-parsing
DGoiana Sep 3, 2023
ca9479a
AppLocale model implementation
DGoiana Sep 5, 2023
13a13b9
Locale tweaks
DGoiana Sep 6, 2023
30c78f1
Tests and bug fix
DGoiana Sep 6, 2023
0ac99e9
Optimizing
DGoiana Sep 8, 2023
c04676f
Some missed translations
DGoiana Sep 9, 2023
da2afdb
Translations and context fix
DGoiana Sep 10, 2023
86a2078
Make tests null safe (#904)
LuisDuarte1 Sep 10, 2023
e184990
Bump app version [no ci]
LuisDuarte1 Sep 10, 2023
9087e05
Merge branch 'develop' into fix/calendar-parsing
thePeras Sep 10, 2023
ed44c6a
Fix calendar parsing (#924)
thePeras Sep 10, 2023
17c5449
Bump app version [no ci]
thePeras Sep 10, 2023
ef41952
Merging
DGoiana Sep 10, 2023
c84ad69
Upgrading intl to 0.18.0
DGoiana Sep 10, 2023
aba0544
Merge branch 'develop' into feature/sentry-bug-feature-report
thePeras Sep 10, 2023
12f5a9d
Remove .env from action and readme
thePeras Sep 10, 2023
b57cb7f
Sentry bug report (#925)
bdmendes Sep 10, 2023
f1e85df
Bump app version [no ci]
bdmendes Sep 10, 2023
ad377b8
Removing navigator context
DGoiana Sep 10, 2023
79a8586
Merge branch 'develop' into feature/migration-i18n
DGoiana Sep 10, 2023
1bc0fae
Testable widget fix
DGoiana Sep 10, 2023
5523701
Test fixing
DGoiana Sep 10, 2023
5e1cb2c
Generated mock file
DGoiana Sep 10, 2023
1ff9249
Update xcode project file
thePeras Sep 11, 2023
8702026
Log provider flow more extensively and fix lecture provider offline load
bdmendes Sep 12, 2023
ebd1e8d
Catch storage load exceptions in LazyConsumer
bdmendes Sep 12, 2023
d18a6ad
Consider conditioned course units as valid
bdmendes Sep 12, 2023
e1026f0
Send stack trace to Sentry on provider error
bdmendes Sep 12, 2023
683a6a8
Hotfix/lazy provider exception (#943)
LuisDuarte1 Sep 12, 2023
a1cb407
Bump app version [no ci]
LuisDuarte1 Sep 12, 2023
7e8d915
Removing session provider
DGoiana Sep 13, 2023
944bb66
Merge branch 'develop' into feature/migration-i18n
DGoiana Sep 13, 2023
e7bae04
Do not log missing startup providers in testing mode
bdmendes Sep 13, 2023
4c232c9
Fix untranslated page titles
bdmendes Sep 13, 2023
a2865e8
Add missing translations
bdmendes Sep 13, 2023
c8ecb5d
Add intl documentation
DGoiana Sep 13, 2023
dc5b36a
Merge
DGoiana Sep 13, 2023
10a3f33
Fixing test error
DGoiana Sep 18, 2023
2e04b64
Changing testable widget locale
DGoiana Sep 18, 2023
cdd14ff
Migration i18n (#791)
bdmendes Sep 19, 2023
263f2d2
Bump app version [no ci]
bdmendes Sep 19, 2023
4906c46
Fix status parsing of multiple year UCs
bdmendes Sep 20, 2023
b15861a
Use different models for different occurrences
bdmendes Sep 20, 2023
a39c706
Fix status parsing of multiple year UCs (#953)
LuisDuarte1 Sep 20, 2023
6e3ec96
Bump app version [no ci]
LuisDuarte1 Sep 20, 2023
aae1f6f
Bump very_good_analysis from 4.0.0+1 to 5.1.0 in /uni
dependabot[bot] Sep 20, 2023
3501e0d
Bump very_good_analysis from 4.0.0+1 to 5.1.0 in /uni (#941)
bdmendes Sep 22, 2023
610751e
Bump app version [no ci]
bdmendes Sep 22, 2023
3b4397e
Bump encrypt version
bdmendes Sep 23, 2023
09f3191
Use same key for encryption purposes
bdmendes Sep 23, 2023
c1e3c96
Use fixed iv for AES
bdmendes Sep 23, 2023
743e4c6
Fix user password encryption (#958)
limwa Sep 23, 2023
c4a2238
Bump app version [no ci]
limwa Sep 23, 2023
1f27e34
Remove useless login locks and checks
bdmendes Sep 23, 2023
cd97a1e
Fix/login speedup (#962)
bdmendes Sep 25, 2023
eda231e
Bump app version [no ci]
bdmendes Sep 25, 2023
5d66cad
Bug fix
DGoiana Sep 20, 2023
70799b5
Code improvement
DGoiana Sep 20, 2023
b28f2f3
Schedule displaying wrong times (#956)
bdmendes Sep 25, 2023
a2b0625
Bump app version [no ci]
bdmendes Sep 25, 2023
fd71a9b
Use home back button action on login page
bdmendes Sep 20, 2023
a141e6d
Use home back button action on login page (#954)
bdmendes Sep 25, 2023
8a20d6b
Bump app version [no ci]
bdmendes Sep 25, 2023
fbf0ba4
Merge remote-tracking branch 'origin/master' into develop [no ci]
bdmendes Sep 25, 2023
60c7d5b
Fixed username format while persisting
LuisDuarte1 Sep 25, 2023
a721c1a
Fixed username format while persisting (#966)
thePeras Sep 25, 2023
85d7277
Bump app version [no ci]
thePeras Sep 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/app_version_integrity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ on: pull_request

jobs:
app_version_integrity:
name: "Check for app version change"
name: "Version integrity"
runs-on: ubuntu-latest
env:
APP_VERSION_PATH: "uni/app_version.txt"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Fetch origin target branch
run: |
Expand Down
23 changes: 9 additions & 14 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
APP_VERSION_PATH: "uni/app_version.txt"
PUBSPEC_PATH: "uni/pubspec.yaml"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
token: ${{ secrets.NIAEFEUPBOT_PAT }}

Expand Down Expand Up @@ -40,25 +40,20 @@ jobs:
env:
PROPERTIES_PATH: "android/key.properties"
JAVA_VERSION: "11.x"
FLUTTER_VERSION: "3.3.2"
FLUTTER_VERSION: "3.10.6"
defaults:
run:
working-directory: ./uni
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: ${{env.JAVA_VERSION}}
- uses: subosito/flutter-action@v1
distribution: 'zulu'
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}

- name: Setup production environment
run: |
mkdir -p assets/env
rm -f -- assets/env/env.json
echo "{\"gh_token\": \"${{ secrets.NIAEFEUPBOT_PAT }}\"}" >> assets/env/env.json

- name: Download Android keystore
run: echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > /tmp/key.jks

Expand All @@ -77,7 +72,7 @@ jobs:
flutter build appbundle

- name: Upload App Bundle
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: appbundle
if-no-files-found: error
Expand All @@ -88,9 +83,9 @@ jobs:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Get App Bundle
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: appbundle

Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/format_lint_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
on:
pull_request:
push:
branches: [master, develop]

env:
FLUTTER_VERSION: 3.10.6
JAVA_VERSION: 11.x

jobs:
format:
name: "Format"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./uni
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}

- run: dart format $(find . -type f -name "*.dart" -a -not -name "*.g.dart" -a -not -name "*.mocks.dart") --set-exit-if-changed

lint:
name: "Lint"
runs-on: ubuntu-latest
needs: format
defaults:
run:
working-directory: ./uni
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "zulu"
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}

- name: Cache pub dependencies
uses: actions/cache@v3
with:
path: ${{ env.FLUTTER_HOME }}/.pub-cache
key: ${{ runner.os }}-pub-${{ github.ref }}-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-${{ github.ref }}-

- run: flutter analyze .

test:
name: "Test"
runs-on: ubuntu-latest
needs: lint
defaults:
run:
working-directory: ./uni
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "zulu"
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}

- name: Test with coverage
run: flutter test --coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
45 changes: 0 additions & 45 deletions .github/workflows/test_lint.yaml

This file was deleted.

11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
<br>
<br>

[![Build badge](https://img.shields.io/github/actions/workflow/status/NIAEFEUP/project-schrodinger/test_lint.yaml?style=for-the-badge)](https://github.com/NIAEFEUP/project-schrodinger/actions)
[![Deploy badge](https://img.shields.io/github/actions/workflow/status/NIAEFEUP/project-schrodinger/deploy.yaml?label=Deploy&style=for-the-badge)](https://github.com/NIAEFEUP/project-schrodinger/actions)
[![License badge](https://img.shields.io/github/license/NIAEFEUP/project-schrodinger?style=for-the-badge)](https://github.com/NIAEFEUP/project-schrodinger/blob/master/LICENSE)
[![Build badge](https://img.shields.io/github/actions/workflow/status/NIAEFEUP/uni/format_lint_test.yaml?style=for-the-badge&branch=develop)](https://github.com/NIAEFEUP/uni/actions)
[![Deploy badge](https://img.shields.io/github/actions/workflow/status/NIAEFEUP/uni/deploy.yaml?label=Deploy&style=for-the-badge&branch=develop)](https://github.com/NIAEFEUP/uni/actions)
[![Codecov branch](https://img.shields.io/codecov/c/github/NIAEFEUP/uni/develop?style=for-the-badge)](https://app.codecov.io/gh/NIAEFEUP/uni/)

[![style: very good analysis](https://img.shields.io/badge/style-very_good_analysis-B22C89.svg?style=for-the-badge)](https://pub.dev/packages/very_good_analysis)
[![License badge](https://img.shields.io/github/license/NIAEFEUP/uni?style=for-the-badge)](https://github.com/NIAEFEUP/uni/blob/develop/LICENSE)

<a href='https://play.google.com/store/apps/details?id=pt.up.fe.ni.uni&hl=pt_PT&gl=US&pli=1&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img style="width: 135px;" alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png'/></a>

Expand All @@ -31,4 +34,4 @@ This application is licensed under the [GNU General Public License v3.0](./LICEN

Contributions are welcome, and can be made by opening a pull request. Please note, however, that a university's account is required to access most of the app's features.

For further information about the project structure, please refer to [the app's README file](./uni/README.md).
For further information about the project structure, please refer to [the app's README file](./uni/README.md).
37 changes: 37 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# see https://docs.codecov.io/docs/codecov-yaml
# Validation check:
# $ curl --data-binary @codecov.yml https://codecov.io/validate

ignore:
- "**/*.g.dart"
- "!**/lib/**" # ignore all files outside of lib

codecov:
require_ci_to_pass: yes
notify:
wait_for_ci: yes

coverage:
precision: 0 # 2 = xx.xx%, 0 = xx%
round: up # how coverage is rounded: down/up/nearest
range: 40...100 # custom range of coverage colors from red -> yellow -> green
status:
project:
default:
informational: true
target: 70% # specify the target coverage for each commit status
threshold: 10% # allow this decrease on project
if_ci_failed: error
patch:
default:
informational: true
threshold: 50% # allow this decrease on patch
changes: false

github_checks:
annotations: false

comment:
layout: header, diff
require_changes: false
behavior: default
15 changes: 15 additions & 0 deletions pre-commit-hook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
mkdir -p .git/hooks #it seems that are some cases where git will not create a hook directory if someone removed the hook templates
tee .git/hooks/pre-commit << EOF
#!/bin/sh

FILES="\$(git diff --name-only --cached | grep .*\.dart | grep -v .*\.g\.dart | grep -v .*\.mocks\.dart)"

[ -z "\$FILES" ] && exit 0


echo "\$FILES" | xargs dart format
echo "\$FILES" | xargs git add
EOF

chmod +x .git/hooks/pre-commit
4 changes: 3 additions & 1 deletion uni/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
.buildlog/
.history
.svn/
assets/env/env.json
*.env

# IntelliJ related
*.iml
Expand Down Expand Up @@ -100,12 +100,14 @@ unlinked_spec.ds
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*
**/ios/Podfile

# macOS
**/Flutter/ephemeral/
**/Pods/
**/macos/Flutter/GeneratedPluginRegistrant.swift
**/macos/Flutter/ephemeral
**/macos/Podfile
**/xcuserdata/

# Windows
Expand Down
56 changes: 48 additions & 8 deletions uni/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,57 @@

This is a Flutter project, totally compatible with Android and iOS. To run it, you need to have Flutter installed on your machine. If you don't, you can follow the instructions on https://flutter.dev/docs/get-started/install.

### Further requirements
### Automated formatting

In order to submit bug reports to the Github API (needed in order to enable in-app bug reporting), a Github Personal Access Token is required. If you don't have one, you can create it on https://github.com/settings/tokens. The only permission it needs is **repo > public_repo**.
In order to contribute, you must format your changed files using `dart format` manually or enabing _formatting on save_ using your IDE ([VSCode or IntelliJ](https://docs.flutter.dev/tools/formatting)). Alternatively, you can install the git pre-commit hook that formats your changed files when you commit, doing the following command at the **root directory of the repository**:

The token is read from the file assets/env/env.json, which you may need to create, and must be in the following format:
``` bash
chmod +x pre-commit-hook.sh && ./pre-commit-hook.sh
```

In order to remove it, is it as simple as running the following command, from the **root directory of the repository**:

```bash
rm .git/hooks/pre-commit
```

### Generated files

Flutter doesn't support runtime reflection. In order to circumvent these limitations, we use **automatic code generation** or **static metaprogramming** for things like **mocks** and other possible usecases. By convention, you should **always commit** the generated `.dart` files into the repository.

Dart leverages annotations to signal the `build_runner` that it should generate some code. They look something like this:
```dart
import 'package:mockito/annotations.dart'

class Cat{
}

@GenerateNiceMocks([MockSpec<Cat>()])
void main(){

```json
{
"gh_token" : "your super secret token"
}
}
```
In this case, `build_runner` will detect that `GenerateNiceMocks` is a generator function from `mockito` and will generate code to a different file.

In order to run the `build_runner` once:
```sh
dart run build_runner build
```

But you can also watch for changes in `.dart` files and automatically run the `build_runner` on those file changes (useful if you find yourself in need to generate code very frequently):
```sh
dart run build_runner watch
```

## Translation files

Intl package allows the internationalization of the app, currently supporting Portuguese ('pt_PT') and English ('en_EN). This package creates `.arb` files (one for each language), mapping a key to the correspondent translated string.
In order to access those translations through getters, you must add the translations you want to the `.arb` files and run:
```
dart pub global run intl_utils:generate
```
This will generate `.dart` files with the getters you need to access the translations.
You must include `'package:uni/generated/l10n.dart'` and, depending on the locale of the application, `S.of(context).{key_of_translation}` will get you the translated string.

## Project structure

Expand All @@ -36,4 +76,4 @@ The *view* part of the app is made of *widgets* (stateful or stateless). They ea

### Controller

The *controller* directory contains all artifacts that are not directly related to the view or the model. This includes the parsers, the networking code, the database code and the logic that handles the global state of the app.
The *controller* directory contains all artifacts that are not directly related to the view or the model. This includes the parsers, the networking code, the database code and the logic that handles the global state of the app.
Loading