Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/santteegt/puzzle-solver
https://github.com/santteegt/puzzle-solver
Last synced: about 19 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/santteegt/puzzle-solver
- Owner: santteegt
- License: mit
- Created: 2022-06-27T04:49:54.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-06-27T06:59:30.000Z (over 2 years ago)
- Last Synced: 2023-08-06T09:22:26.539Z (over 1 year ago)
- Language: Python
- Size: 175 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Puzzle Solver
This is just another Puzzle Solver written in Python. It shows how to use `requests` to solve a puzzle using an external API. `Pytest` was used for writing mocks and unit tests.
![Output Console](sample_output.png "Output Console")
### Requirements
* Git (Pre-installed)
* Python 3.x (Pre-installed)
* Pip (Pre-installed)
* Virtualenv```
pip install virtualenv
```### Clone repository
```
git clone https://github.com/santteegt/puzzle-solver.git
```The rest of this guide assumes the repository was cloned in `HOME=/project/local/directory` and you have a terminal poiting to the project's root folder
### SetUp Local Environment
```
cd $HOME
virtualenv .venv -p 3.8
source .venv/bin/activate
pip install -r requirements.txt
```### Executing the PuzzleSolver
To execute the PuzzleSolver, you need to provide a valid email address as a parameter
```
python main.py -e
```### Running tests
```
pytest tests
```### Project Structure
- [tests](./tests/): UnitTest folder
* [test_api](./tests/test_api.py): Unit Tests for the `api` module
* [test_puzzle](./tests/test_puzzle.py): Unit Tests for the `puzzle` module
- [api.py](./api.py): Module that communicates with the Puzzle API
- [main.py](./main.py): Entrypoint for executing the PuzzleSolver
- [puzzle.py](./puzzle.py): PuzzleSolver module. It cointains the required`check` function### Licence
[MIT](LICENSE.md)