Skip to content

[FA-10] API Token Security#8

Merged
scott-clare1 merged 4 commits intomainfrom
FA-10-api-token-security
Apr 2, 2025
Merged

[FA-10] API Token Security#8
scott-clare1 merged 4 commits intomainfrom
FA-10-api-token-security

Conversation

@samgwd
Copy link
Collaborator

@samgwd samgwd commented Apr 2, 2025

Write a short description which explains what this pull request does and, briefly, how.

Updating the MCP to use an API key for LiChess set in a .env

If new dependencies are introduced to the project, please list them here:

  • new dependency

Checklist

Please ensure you have done the following:

  • I have read the CONTRIBUTING guide.
  • I have updated the documentation if required.
  • I have added tests which cover my changes.

Type of change

Tick all those that apply:

  • Bug Fix (non-breaking change, fixing an issue)
  • New feature (non-breaking change to add functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

MacOS tests

To trigger the CI to run on a macOS backed workflow, add the macos-ci-test label to the pull request (PR).

Our advice is to only run this workflow when testing the compatability between operating systems for a change that you've made, e.g., adding a new dependency to the virtual environment.

Note: This can take up to 5 minutes to run. This workflow costs x10 more than a Linux-based workflow, use at discretion.

@scott-clare1 scott-clare1 self-requested a review April 2, 2025 08:45
@scott-clare1 scott-clare1 added the enhancement New feature or request label Apr 2, 2025
Copy link
Contributor

@scott-clare1 scott-clare1 left a comment

Choose a reason for hiding this comment

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

Few issues then ready to be merged

README.md Outdated
> Can you please log into the Chess API with the following API key ************ and then create a game. Once the game has been created the opponent will make the first move. Can you use the previous moves and the layout of the board to determine what an optimal next move will be and then make your own move playing continuously back and forth until completion? Please use the UCI chess standard for your moves, e.g., e2e4.

> [!NOTE]
> an you please log into the Chess API and then create a game. Once the game has been created the opponent will make the first move. Can you use the previous moves and the layout of the board to determine what an optimal next move will be and then make your own move playing continuously back and forth until completion? Please use the UCI chess standard for your moves, e.g., e2e4.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
> an you please log into the Chess API and then create a game. Once the game has been created the opponent will make the first move. Can you use the previous moves and the layout of the board to determine what an optimal next move will be and then make your own move playing continuously back and forth until completion? Please use the UCI chess standard for your moves, e.g., e2e4.
> Can you please log into the Chess API and then create a game. Once the game has been created the opponent will make the first move. Can you use the previous moves and the layout of the board to determine what an optimal next move will be and then make your own move playing continuously back and forth until completion? Please use the UCI chess standard for your moves, e.g., e2e4.

Args:
api_key: The API key to use for logging in.
"""
api_key: str = os.getenv("API_KEY") or ""
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: this can just be:

api_key: str = os.getenv("API_KEY")

it should return None by default: https://www.w3schools.com/python/ref_os_getenv.asp

poetry.lock Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't be included. We should be using uv now

@scott-clare1 scott-clare1 self-requested a review April 2, 2025 09:12
@scott-clare1 scott-clare1 merged commit 14d1016 into main Apr 2, 2025
1 check passed
@scott-clare1 scott-clare1 deleted the FA-10-api-token-security branch April 2, 2025 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants