Skip to content

Conversation

@SlayerOrnstein
Copy link
Member

@SlayerOrnstein SlayerOrnstein commented Feb 25, 2025

What did you fix?

  • feat: migrate fandom wikia links to the official Warframe wiki
  • fix: archwing and companion wiki data wasn't being added

Reproduction steps


Evidence/screenshot/link to line

Considerations

  • Does this contain a new dependency? No
  • Does this introduce opinionated data formatting or manual data entry? Yes
  • Does this pr include updated data files in a separate commit that can be reverted for a clean code-only pr? No
  • Have I run the linter? Yes
  • Is is a bug fix, feature request, or enhancement? Feature

Summary by CodeRabbit

  • New Features

    • Expanded in-game data processing now includes additional categories for items such as Sentinels and Archwings.
    • Introduced a new "any" option for polarity selection.
  • Chores

    • Updated various data source endpoints and URL references to ensure improved accuracy and consistency in information retrieval.

@SlayerOrnstein SlayerOrnstein requested a review from a team as a code owner February 25, 2025 16:19
@coderabbitai
Copy link

coderabbitai bot commented Feb 25, 2025

Walkthrough

This pull request updates several modules to change URL endpoints from warframe.fandom.com to wiki.warframe.com and extends data handling. The Parser class now supports an additional category ("sentinels") with conditional logic for mapping to the appropriate wiki category. In the companion transformer, a new transformation step is added using the transformPolarity function. Furthermore, polarity definitions receive an update with a new value, 'any'. These changes adjust data fetching and transformation without altering the overall application architecture.

Changes

Files Change Summary
build/parser.mjs Enhanced addAdditionalWikiaData to process 'sentinels' and 'Archwing' categories by mapping them to companions and archwings respectively, and added a new switch case for 'sentinels' that calls addWarframeWikiaData.
build/scraper.mjs, build/wikia/WikiaDataScraper.mjs, build/wikia/scrapers/ArchwingScraper.mjs, build/wikia/scrapers/CompanionScraper.mjs, build/wikia/scrapers/VersionScraper.mjs, build/wikia/scrapers/WarframeScraper.mjs, build/wikia/scrapers/WeaponScraper.mjs, build/wikia/transformers/transformMod.mjs, build/wikia/transformers/transformVersion.mjs, build/wikia/transformers/transformWarframe.mjs, build/wikia/transformers/transformWeapon.mjs, build/wikia/transformers/transformerArchwing.mjs Updated URL endpoints in various scrapers and transformers to use wiki.warframe.com instead of warframe.fandom.com.
build/wikia/transformers/transformCompanion.mjs Updated the base URL for the companion entity, imported transformPolarity, and applied a new transformation step by invoking transformPolarity on the newly built companion object.
build/wikia/transformers/polarities.mjs, index.d.ts Added a new key-value pair (O: 'any') and updated the Polarity type declaration to include the 'any' option.

Sequence Diagram(s)

sequenceDiagram
  participant C as Caller
  participant P as Parser
  C->>P: addAdditionalWikiaData(item, category, wikiaData)
  alt category is 'Sentinels'
    P->>P: Set wikiCategory = 'companions'
  else category is 'Archwing'
    P->>P: Set wikiCategory = 'archwings'
  else
    P->>P: Process other categories
  end
  alt category matches 'sentinels' case
    P->>P: Call addWarframeWikiaData(item, wikiCategory, wikiaData)
  end
  P-->>C: Return processed data
Loading
sequenceDiagram
  participant T as Transformer
  participant TP as transformPolarity
  T->>T: Create newCompanion with updated URL
  T->>TP: Invoke transformPolarity(oldCompanion, newCompanion)
  TP-->>T: Return transformed newCompanion
  T-->>Caller: Return final newCompanion
Loading

Possibly related PRs

  • feat: added RailJack turrets #644: Modifies the Parser class (specifically the addCategory method) to enhance item categorization logic, aligning closely with the changes introduced in this PR.

Suggested labels

Scope: Data, released

Suggested reviewers

  • EricSihaoLin
  • TobiTenno

Poem

In the fields of code I hop,
Digging deeper into data non-stop.
New URLs bloom like spring so bright,
"Sentinels" join the joyous light.
With a twist of polarity in the air,
This rabbit cheers—a bug-free affair!
🐰💻 Happy coding, everywhere!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fbfb22f and 9800044.

📒 Files selected for processing (16)
  • build/parser.mjs (1 hunks)
  • build/scraper.mjs (1 hunks)
  • build/wikia/WikiaDataScraper.mjs (2 hunks)
  • build/wikia/scrapers/ArchwingScraper.mjs (1 hunks)
  • build/wikia/scrapers/CompanionScraper.mjs (1 hunks)
  • build/wikia/scrapers/VersionScraper.mjs (1 hunks)
  • build/wikia/scrapers/WarframeScraper.mjs (1 hunks)
  • build/wikia/scrapers/WeaponScraper.mjs (1 hunks)
  • build/wikia/transformers/polarities.mjs (1 hunks)
  • build/wikia/transformers/transformCompanion.mjs (3 hunks)
  • build/wikia/transformers/transformMod.mjs (1 hunks)
  • build/wikia/transformers/transformVersion.mjs (1 hunks)
  • build/wikia/transformers/transformWarframe.mjs (1 hunks)
  • build/wikia/transformers/transformWeapon.mjs (1 hunks)
  • build/wikia/transformers/transformerArchwing.mjs (1 hunks)
  • index.d.ts (1 hunks)
✅ Files skipped from review due to trivial changes (8)
  • build/wikia/transformers/transformWeapon.mjs
  • build/wikia/transformers/transformMod.mjs
  • build/wikia/scrapers/ArchwingScraper.mjs
  • build/wikia/scrapers/CompanionScraper.mjs
  • build/wikia/scrapers/WeaponScraper.mjs
  • build/wikia/transformers/polarities.mjs
  • build/wikia/WikiaDataScraper.mjs
  • build/wikia/transformers/transformVersion.mjs
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Build
  • GitHub Check: Commit Lint
🔇 Additional comments (13)
build/wikia/scrapers/VersionScraper.mjs (1)

6-6: URL migrated from fandom to official wiki.

Updated the source URL from warframe.fandom.com to wiki.warframe.com, aligning with the PR objective to migrate all fandom wiki links to the official Warframe wiki.

build/wikia/scrapers/WarframeScraper.mjs (1)

6-6: URL migrated from fandom to official wiki.

Updated the source URL from warframe.fandom.com to wiki.warframe.com, aligning with the PR objective to migrate all fandom wiki links to the official Warframe wiki.

build/scraper.mjs (1)

218-218: URL migrated from fandom to official wiki.

Updated the source URL for ducats data from warframe.fandom.com to wiki.warframe.com, aligning with the PR objective to migrate all fandom wiki links to the official Warframe wiki.

build/wikia/transformers/transformerArchwing.mjs (1)

21-21: URL migrated from fandom to official wiki.

Updated the URL construction pattern from warframe.fandom.com/wiki/ to wiki.warframe.com/w/, aligning with the PR objective to migrate all fandom wiki links to the official Warframe wiki. The URL path formatting logic remains unchanged.

build/wikia/transformers/transformCompanion.mjs (3)

1-1: New import for transformPolarity function.

This new import allows the companion transformer to handle polarity data, which is a good improvement for standardizing data processing across different entity types.


21-21: URL endpoint migration from fandom to official wiki.

The URL construction has been updated to use the official Warframe wiki domain (wiki.warframe.com/w/) instead of the fandom domain, which aligns with the PR objective of migrating all fandom links.


31-31: Added polarity transformation for companions.

This new transformation step applies the transformPolarity function to companion data, ensuring that companions' polarity data is processed consistently with other entity types.

index.d.ts (1)

704-714: Added 'any' to Polarity type definition.

The Polarity type has been expanded to include the new 'any' value and reformatted for better readability. This enhancement provides more flexibility in handling polarities.

Make sure this addition is reflected in any documentation for API consumers, as it represents a change to the public type interface.

build/wikia/transformers/transformWarframe.mjs (1)

42-42: URL endpoint migration from fandom to official wiki.

Consistent with other files, the URL has been updated to use the official Warframe wiki domain (wiki.warframe.com/w/) instead of the fandom domain.

build/parser.mjs (4)

899-899: Added 'sentinels' to supported categories for Wikia data processing.

This change extends the parser to handle additional Wikia data for the 'sentinels' category, which addresses the PR objective of fixing companion wiki data handling.


901-905: Enhanced category mapping for wiki data lookups.

Created a new variable wikiCategory to properly map internal categories to wiki categories, with specific handling for 'Upgrades', 'Archwing', and 'Sentinels'.

This improvement makes the code more maintainable by centralizing the category mapping logic rather than having scattered conditionals.


906-906: Using the new wikiCategory variable for Wikia data lookup.

The lookup for Wikia data now uses the mapped category, ensuring proper data retrieval across different entity types.


910-910: Added 'sentinels' case to handle Wikia data processing.

The switch statement now includes a case for 'sentinels', treating them the same way as warframes by using the addWarframeWikiaData method. This addresses the PR objective of fixing companion wiki data handling.

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Member

@TobiTenno TobiTenno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@SlayerOrnstein SlayerOrnstein merged commit b0b7048 into WFCD:master Feb 25, 2025
10 checks passed
@wfcd-bot-boi
Copy link
Collaborator

🎉 This PR is included in version 1.1267.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants