Skip to content

Commit

Permalink
Merge pull request #144 from DislikesSchool/master
Browse files Browse the repository at this point in the history
New API
  • Loading branch information
vyPal committed Oct 31, 2023
2 parents a735a21 + c5cecbf commit a73d88a
Show file tree
Hide file tree
Showing 31 changed files with 1,451 additions and 776 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build-patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,10 @@ jobs:
with:
fallback: 1.0.0
- name: Extract version from tag
id: semver
uses: damienaicheh/extract-version-from-tag-action@v1.1.0
- run: flutter pub get
- run: flutter gen-l10n
- name: 🚀 Shorebird Patch
run: shorebird patch android --force '--' --dart-define=BVS="Patch ${{ steps.previoustag.outputs.tag }}+$NUMBER_OF_COMMITS ShoreBird"
run: shorebird patch android --force '--' --dart-define=BVS="Patch ${{ steps.previoustag.outputs.tag }}+${{ env.NUMBER_OF_COMMITS_SINCE_TAG }} ShoreBird"
env:
SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/build-prerelease-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ jobs:
commitChange: true
branch: 'build-prerelease'
labels: 'bump'
message: 'Bump version to ${{ steps.semvers.outputs.patch }}'
message: 'Bump version to ${{ steps.semvers.outputs.patch }} [no ci]'
createPR: true
description: 'Automatic version bump to ${{ steps.semvers.outputs.patch }} for prerelease build'
- run: flutter pub get
- run: flutter gen-l10n
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-preview-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "v${{ steps.semver.outputs.version }}"
automatic_release_tag: "v${{ steps.semver.outputs.version }}-${{ github.ref_name }}"
prerelease: true
title: "EduPage2 Preview v${{ steps.semver.outputs.version }} ${{ github.ref_name }}"
files: |
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/build-release-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,17 @@ jobs:
with:
valueFile: 'pubspec.yaml'
propertyPath: 'version'
value: "${{ steps.semvers.outputs.patch }}"
value: "${{ steps.semvers.outputs.minor }}"
commitChange: true
branch: 'build-release'
labels: 'bump'
message: 'Bump version to ${{ steps.semvers.outputs.patch }}'
description: 'Automatic version bump to ${{ steps.semvers.outputs.patch }} for release build'
createPR: true
message: 'Bump version to ${{ steps.semvers.outputs.minor }} [no ci]'
description: 'Automatic version bump to ${{ steps.semvers.outputs.minor }} for release build'
- run: flutter pub get
- run: flutter gen-l10n
- name: 🚀 Shorebird Release
run: shorebird release android --force --artifact apk '--' --dart-define=BVS="Release ${{ steps.semvers.outputs.v_patch }} ShoreBird"
run: shorebird release android --force --artifact apk '--' --dart-define=BVS="Release ${{ steps.semvers.outputs.v_minor }} ShoreBird"
env:
SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }}
- run: cp "build/app/outputs/apk/release/app-release.apk" "EduPage2-${{ steps.semvers.outputs.v_minor }}.apk"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
l10n.yaml
lib
android
test
integration_test
build:
runs-on: macos-latest
needs: check_changes
Expand Down
54 changes: 54 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Contributing to EduPage2
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer

## We Develop with Github
We use github to host code, to track issues and feature requests, as well as accept pull requests.

## We Use [Github Flow](https://docs.github.com/en/get-started/quickstart/github-flow), So All Code Changes Happen Through Pull Requests
Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://docs.github.com/en/get-started/quickstart/github-flow)). We actively welcome your pull requests:

1. Fork the repo and create your branch from `master`.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes.
5. Make sure your code lints.
6. Issue that pull request!

## Any contributions you make will be under the GPL-3.0 Software License
In short, when you submit code changes, your submissions are understood to be under the same [GPL-3.0 License](https://choosealicense.com/licenses/gpl-3.0/) that covers the project. Feel free to contact the maintainers if that's a concern.

## Report bugs using Github's [issues](https://github.com/DislikesSchool/EduPage2/issues)
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](); it's that easy!

## Write bug reports with detail, background, and sample code
[This is an example](http://stackoverflow.com/q/12488905/180626) of a bug report I wrote, and I think it's not a bad model. Here's [another example from Craig Hockenberry](http://www.openradar.me/11905408), an app developer whom I greatly respect.

**Great Bug Reports** tend to have:

- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can. [My stackoverflow question](http://stackoverflow.com/q/12488905/180626) includes sample code that *anyone* with a base R setup can run to reproduce what I was seeing
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)

People *love* thorough bug reports. I'm not even kidding.

## Use a Consistent Coding Style
I'm again borrowing these from [Facebook's Guidelines](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md)

* 2 spaces for indentation rather than tabs
* You can try running `flutter analyze` for style unification

## License
By contributing, you agree that your contributions will be licensed under its MIT License.

## References
This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md)
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
</p>
</p>

[![build-release-android](https://github.com/DislikesSchool/EduPage2/actions/workflows/build-release-apk.yml/badge.svg)](https://github.com/DislikesSchool/EduPage2/actions/workflows/build-release-apk.yml) ![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/dislikesschool/edupage2) ![Downloads](https://img.shields.io/github/downloads/DislikesSchool/EduPage2/total) ![Contributors](https://img.shields.io/github/contributors/DislikesSchool/EduPage2?color=dark-green) ![Issues](https://img.shields.io/github/issues/DislikesSchool/EduPage2) ![License](https://img.shields.io/github/license/DislikesSchool/EduPage2) [![codecov](https://codecov.io/github/DislikesSchool/EduPage2/branch/master/graph/badge.svg?token=HKP9WFL0LN)](https://codecov.io/github/DislikesSchool/EduPage2) [![Discord](https://img.shields.io/discord/1143488418840584224)](https://discord.gg/xy5nqWa2kQ)
![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/dislikesschool/edupage2) ![Downloads](https://img.shields.io/github/downloads/DislikesSchool/EduPage2/total) ![Contributors](https://img.shields.io/github/contributors/DislikesSchool/EduPage2?color=dark-green) ![Issues](https://img.shields.io/github/issues/DislikesSchool/EduPage2) ![License](https://img.shields.io/github/license/DislikesSchool/EduPage2) [![codecov](https://codecov.io/github/DislikesSchool/EduPage2/branch/master/graph/badge.svg?token=HKP9WFL0LN)](https://codecov.io/github/DislikesSchool/EduPage2)
[![Discord](https://discordapp.com/api/guilds/1143488418840584224/widget.png?style=banner2)](https://discord.gg/xy5nqWa2kQ)

[![test-coverage](https://github.com/DislikesSchool/EduPage2/actions/workflows/test-coverage.yml/badge.svg)](https://github.com/DislikesSchool/EduPage2/actions/workflows/test-coverage.yml)
[![build-patch-android](https://github.com/DislikesSchool/EduPage2/actions/workflows/build-patch.yml/badge.svg)](https://github.com/DislikesSchool/EduPage2/actions/workflows/build-patch.yml)

## Table Of Contents

- [Table Of Contents](#table-of-contents)
- [About The Project](#about-the-project)
- [Join Our Discord!](#join-our-discord)
- [Disclaimer](#disclaimer)
- [Built With](#built-with)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
Expand All @@ -31,7 +35,7 @@
- [Contributing](#contributing)
- [Creating A Pull Request](#creating-a-pull-request)
- [License](#license)
- [Authors](#authors)
- [Contributors](#contributors)
- [Acknowledgements](#acknowledgements)

## About The Project
Expand All @@ -42,11 +46,13 @@ And that's why we made EduPage2. So far, EduPage2 lacks a pretty big amount of f

EduPage2 uses local caching on your device, and a caching server with our own privte software, which periodically updates data from EduPage, strips it of all useless data (which EduPage includes for some reason), and finally sends out to your device when requested.

**IMPORTANT** EduPage2 is a cutom client for EduPage. We do not have any connection to EduPage.
## Disclaimer

## Join Our Discord!
**EduPage2** is an open-source project with contributions from multiple individuals and is not affiliated with or endorsed by the creators of EduPage. EduPage is a separate and (possibly) trademarked platform owned by asc Applied Software Consultants, s.r.o.

[![Discord](https://discordapp.com/api/guilds/1143488418840584224/widget.png?style=banner2)](https://discord.gg/xy5nqWa2kQ)
Please note that while EduPage2 is designed to work as a drop-in replacement or alternative mobile client for EduPage, it is not officially supported by the EduPage team. Any issues or inquiries related to EduPage2 should be directed to the project's [GitHub Issues](https://github.com/DislikesSchool/EduPage2/issues) provided in this repository.

This project is open source and distributed under the [GPL-3.0 license](https://choosealicense.com/licenses/gpl-3.0/), and all contributions are welcome from the community. However, use it responsibly and in compliance with the terms of use of the original EduPage platform.

## Built With

Expand All @@ -58,6 +64,7 @@ This is a list of all the main tools, libraries and frameworks, that were used i
- [Express.js](https://expressjs.com/)
- [PlanetScale](https://planetscale.com/)
- [Passport.js](https://www.passportjs.org/)
- [Shorebird](https://shorebird.dev/)

## Getting Started

Expand Down Expand Up @@ -106,10 +113,12 @@ Contributions are what make the open source community such an amazing place to b

Distributed under the MIT License. See [LICENSE](https://github.com/DislikesSchool/EduPage2/blob/master/LICENSE) for more information.

## Authors
## Contributors

- **vyPal** - _A highschool student, who is bored_ - [vyPal](https://github.com/vyPal) - _Author of EduPage2_
- **czmatejt9** - _Friend_ - [czmatejt9](https://github.com/czmatejt9) - _Helped fix bugs_
- **[vyPal](https://github.com/vyPal)** - _Author of EduPage2_
- **[WattMann](https://github.com/WattMann)** - _Created Edupage API in golang_
- **[czmatejt9](https://github.com/czmatejt9)** - _Helped fix bugs_
- **[SAMUELLL41](https://github.com/SAMUELLL41)** - _Slovak translation_

## Acknowledgements

Expand Down
13 changes: 5 additions & 8 deletions integration_test/app_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,27 @@ void main() {

testWidgets('Run app and login', (tester) async {
await prep(tester, username, password, name);

SharedPreferences prefs = await SharedPreferences.getInstance();
expect(prefs.get("email"), equals(username));
expect(prefs.get("password"), equals(password));
expect(find.text("Username"), findsNothing);
});

testWidgets('Test TimeTable page', (tester) async {
await prep(tester, username, password, name);

await tester.tap(find.byType(NavigationDestination).at(1));
await pumpUntilFound(tester, find.textContaining("Today"));
expect(find.textContaining("Today"), findsOneWidget);
expect(find.textContaining("TODAY"), findsOneWidget);
});

testWidgets('Test TimeTable page scroll', (tester) async {
await prep(tester, username, password, name);

await tester.tap(find.byType(NavigationDestination).at(1));
await pumpUntilFound(tester, find.textContaining("Today"));
expect(find.textContaining("Today"), findsOneWidget);
expect(find.textContaining("TODAY"), findsOneWidget);

await tester.tap(find.byKey(const Key("TimeTableScrollForward")));
await pumpUntilFound(tester, find.textContaining("Tomorrow"));
//expect(find.textContaining("Tomorrow"), findsOneWidget);
expect(find.textContaining("TOMORROW"), findsOneWidget);
});
});
}
Expand All @@ -60,5 +57,5 @@ Future<void> prep(
await tester.tap(find.byType(ElevatedButton));

await pumpUntilFound(tester, find.text(name));
await tester.pump(const Duration(seconds: 5));
await tester.pump(const Duration(seconds: 1));
}
2 changes: 1 addition & 1 deletion l10n.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
arb-dir: lib/l10n
template-arb-file: app_cs.arb
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
Loading

0 comments on commit a73d88a

Please sign in to comment.