From b6fd4d90a18224c0a1fd96b8eb881366913d679b Mon Sep 17 00:00:00 2001 From: Toni Sevener Date: Thu, 27 May 2021 15:58:11 -0500 Subject: [PATCH] update documentation --- README.md | 39 +++++++++++++++++++-------------------- docs/event_logging.md | 6 +++--- docs/process.md | 15 +++++---------- 3 files changed, 27 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index e46073b5b09..c506221e53b 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,6 @@ The official Wikipedia iOS app. * **Planning (bugs & features)**: https://phabricator.wikimedia.org/project/view/782/ * **Team page**: https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/iOS -**Note: The latest `main` branch is set up to build with Xcode 12.** - ## Building and Running In the directory, run `./scripts/setup`. Note: going to `scripts` directory and running `setup` will not work due to relative paths. @@ -50,24 +48,25 @@ When reading logs, note that the log levels are shortened to emoji. - 🚨 Error ### Testing -The **Wikipedia** scheme is configured to execute the project's iOS unit tests, which can be run using the `Cmd+U` hotkey or the **Product → Test** menu bar action. Screenshot tests will fail unless you are running on one of the configurations defined by `configurations_to_test_on_pull` in `fastlane/Fastfile`. In order for the tests to pass, the test device's language and region must be set to `en-US` in Settings → General → Language & Region. There is a [ticket filed](https://phabricator.wikimedia.org/T259859) to update the tests to pass regardless of language and region. - -### Targets -- **Wikipedia** - Points to production servers. -- **Staging** - Points to the [Apps team's staging environment](https://mobileapps.wmflabs.org) for page content and production for everything else. Has additional debugging menus and is pushed to TestFlight as a separate app bundle. -- **Local Page Content Service and Announcements** - Points to the [mobileapps](https://gerrit.wikimedia.org/r/q/project:mediawiki%252Fservices%252Fmobileapps) and [wikifeeds](https://gerrit.wikimedia.org/r/q/project:mediawiki%252Fservices%252Fwikifeeds) repos running locally. -- **MediaWiki Beta Cluster** - Points to the [MediaWiki beta cluster](https://www.mediawiki.org/wiki/Beta_Cluster) for MediaWiki API calls and production for everything else. -- **RTL** - Launches the app in an RTL locale using the `-AppleLocale` argument. -- **Experimental** - For one off builds. Can point to whatever is needed for the given experiment. -- **User Testing** - For user testing. Has an alternate configuration so that it can be delivered ad hoc. -- **Event Logging Dev Debug** - For testing the events that the app sends to [Event Logging](https://wikitech.wikimedia.org/wiki/Analytics/Systems/EventLogging). Points to the Event Logging staging environment. -- **Beta Cluster tests** - Tests that run against the [MediaWiki beta cluster](https://www.mediawiki.org/wiki/Beta_Cluster), checking for upstream changes to MediaWiki that might break any assumptions we have. -- **UITests** - Runs automated screenshot tests. -- **WMF** - Bundles up the app logic shared between the main app and the extensions (widgets, notifications). -- **Update Localizations** - Covered in the [localization document](docs/localization.md). -- **Update Languages** - For adding new Wikipedia languages or updating language configurations. Covered in the [languages document](docs/languages.md). -- **{{name}}Widget, {{name}}Notification, {{name}}Stickers** - Extensions for widgets, notifications, and stickers. -- **codemirror-config** - Generates the [CodeMirror](https://codemirror.net) configuration files. CodeMirror is used in the section editor. +The **Wikipedia** scheme is configured to execute the project's iOS unit tests, which can be run using the `Cmd+U` hotkey or the **Product → Test** menu bar action. In order for the tests to pass, the test device's language and region must be set to `en-US` in Settings → General → Language & Region. There is a [ticket filed](https://phabricator.wikimedia.org/T259859) to update the tests to pass regardless of language and region. + +### Schemes and Targets +* **Wikipedia** - Points to production servers. +* **Staging** - Pushed to TestFlight as a separate app bundle, and has the ability to toggle different staging environments within the `current` [property](https://github.com/wikimedia/wikipedia-ios/blob/de349525f652ca59c3437cd36fcb13846d737f1e/WMF%20Framework/Configuration.swift#L41) of `Configuration`: + - An option of `appsLabsForPCS` will point to the [Apps team's staging environment](https://mobileapps.wmflabs.org) for page content. This is selected by default. + - An option of `deploymentLabsForEventLogging` will point to the [Event Logging](https://wikitech.wikimedia.org/wiki/Analytics/Systems/EventLogging) staging environment. It is for testing analytics events that the app sends to Event Logging. It is not selected by default. + - All other endpoints will point to production. +* **Local Page Content Service and Announcements** - used in Debug mode only, has the ability to toggle different local environments within the `current` [property](https://github.com/wikimedia/wikipedia-ios/blob/de349525f652ca59c3437cd36fcb13846d737f1e/WMF%20Framework/Configuration.swift#L41) of `Configuration`: + - An option of `localPCS` will point to a locally running [mobileapps](https://gerrit.wikimedia.org/r/q/project:mediawiki%252Fservices%252Fmobileapps) repository for page content. This is selected by default. + - An option of `localAnnouncements` will point to a locally running [wikifeeds](https://gerrit.wikimedia.org/r/q/project:mediawiki%252Fservices%252Fwikifeeds) repository for the announcements endpoint. This is selected by default. + - All other endpoints will point to production. +* **RTL** - Launches the app in an RTL locale using the `-AppleLocale` argument. +* **Experimental** - For one off builds. Can point to whatever is needed for the given experiment. Pushed to TestFlight as a separate app bundle. +* **User Testing** - For user testing. Has an alternate configuration so that it can be delivered ad hoc. Pushed to TestFlight as a separate app bundle. +* **WMF** - Bundles up the app logic shared between the main app and the extensions (widgets, notifications). +* **Update Localizations** - Covered in the [localization document](docs/localization.md). +* **Update Languages** - For adding new Wikipedia languages or updating language configurations. Covered in the [languages document](docs/languages.md). +* **{{name}}Widget, {{name}}Notification, {{name}}Stickers** - Extensions for widgets, notifications, and stickers. ### Continuous Integration Covered in the [CI document](docs/ci.md). diff --git a/docs/event_logging.md b/docs/event_logging.md index 5543d0f4d64..fbcad03c94d 100644 --- a/docs/event_logging.md +++ b/docs/event_logging.md @@ -3,11 +3,11 @@ Note: Testing event logging requires `labs` access to `deployment-eventlog05.eqi To test event logging: - ensure event logging is enabled via `Gear icon > Send usage reports` -- select `Event Logging Dev Debug` scheme in Xcode +- select `Staging` scheme in Xcode, then in `Configuration`'s `current` [property](https://github.com/wikimedia/wikipedia-ios/blob/de349525f652ca59c3437cd36fcb13846d737f1e/WMF%20Framework/Configuration.swift#L41), change the staging options to `return Configuration.staging(options: [.deploymentLabsForEventLogging])`. - get the app install id: - run app in the simulator - pause - - paste `po [WMFEventLoggingService sharedInstance].appInstallID` in the Xcode console and copy the resulting string + - paste `po [[NSUserDefaults standardUserDefaults] wmf_appInstallId];` in the Xcode console and copy the resulting string - ssh to labs: `ssh deployment-eventlog05.eqiad.wmflabs` - [tail](https://en.wikipedia.org/wiki/Tail_%28Unix%29) the following files (`tail` keeps stream open and prints last few lines of a file any time it changes) with the app install id and the id of the schema being tested (from [MPopov](https://meta.wikimedia.org/wiki/User:MPopov_%28WMF%29/Notes/Android_app_analytics#Verifying)): - `/srv/log/eventlogging/all-events.log` @@ -19,4 +19,4 @@ To test event logging: - if there are any issues with the incoming events or their validation, there will be detailed messages in the two `eventlogging-processor@-client-side-XX` logs Example: - - `tail -f /srv/log/eventlogging/all-events.log | grep "" | grep ""` \ No newline at end of file + - `tail -f /srv/log/eventlogging/all-events.log | grep "" | grep ""` diff --git a/docs/process.md b/docs/process.md index d4c0a158074..bbd49d374ae 100644 --- a/docs/process.md +++ b/docs/process.md @@ -4,20 +4,15 @@ When composing a pull request, link to the phabricator ticket that the work relates to. Also apply GitHub labels where appropriate. ### Labels -#### Release number (6.2, 6.2.1, etc) -Which release is this work for? -#### WIP -Work in progress. Don't merge, also hold off on full review -#### Hold -Don't merge yet. Needs more discussion with product & design or is blocked by something else. -#### Changes welcome -Just make the suggested change rather than adding a code review comment. #### Update branch before merging Pull request contains changes from another pull request. Updating from main after the dependent PR is merged will clean up the diff. #### Question/Design Question Pull request has a question that needs answering. -#### Low impact -The code change in the pull request doesn't affect more than a few files or is just a refactor. + +For Work in Progress or pull requests on Hold, [mark your PR as draft](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests) via the GitHub UI. + +## Assigning pull requests +Assigning the `wikimedia/ios` bot as a reviewer will randomly choose an iOS engineer from the team to review. If you have one or more a specific engineers in mind to review, you can assign them directly. ## Merging pull requests Pull requests require code review approval from one other developer before merging. After the pull request is merged, delete the branch, unless it's the TWN branch. **Never delete the twn branch** as it's [required by translatewiki to import translations](localization.md).