Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/lint_and_typehints.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Lint and Typehints

on:
push:
branches:
- main
pull_request:
types: [ opened, synchronize, reopened ]

jobs:
lint_and_typehints:
uses: PyCeas/.github/.github/workflows/lint_and_test.yml@main
with:
requirements_path: 'requirements_dev.txt' # Optional: Path to requirements file
secrets:
repo_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/
78 changes: 61 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Discord](https://discord.com/api/guilds/1272287320934056066/widget.png)](https://discord.gg/s2P9fZbeZs)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://www.freecodecamp.org/news/how-to-make-your-first-pull-request-on-github-3/)
[![License](https://img.shields.io/github/license/ultimateownsz/PyCeas)](https://github.com/PyCeas/Pyceas/blob/main/LICENSE)
[![License](https://img.shields.io/github/license/PyCeas/PyCeas)](https://github.com/PyCeas/Pyceas/blob/main/LICENSE)

## Table of Contents
- [PyCeas - Open Source Pirate (Adventure) Board Game](#pyceas---open-source-pirate-adventure-board-game)
Expand All @@ -11,6 +11,12 @@
- [Game Design Document](#game-design-document)
- [Why Join PyCeas?](#why-join-pyceas)
- [Getting Started](#getting-started)
- [Clone the Repository](#clone-the-repository)
- [Install Python](#install-python)
- [Set up a virtual environment](#set-up-a-virtual-environment)
- [Install Required Software](#install-required-software)
- [Run the project](#run-the-project)
- [Deactivate the Virtual Environment:](#deactivate-the-virtual-environment)
- [Reporting bugs \& requesting features](#reporting-bugs--requesting-features)
- [Local Development](#local-development)
- [Linting and Formatting for developers](#linting-and-formatting-for-developers)
Expand All @@ -37,11 +43,7 @@ Every game needs thorough documentation, and you can find our Game Design Docume
- **Create something enjoyable**: Contributing to a project that results in a game you and others can enjoy.
- **Join our community on [Discord](https://discord.gg/MZ5MHqDnGW)**: Whether you want to help with ideas, give feedback, or simply enjoy the game, everyone is welcome!

## Getting Started

No need to worry if you are new to programming. This guide will walk you through the setup step by step. by the end, you'll have everything ready to run the PyCeas project.

> [!IMPORTANT]
> [!NOTE]
>
> This project was previously known as **PySeas** and has been renamed to **PyCeas**.
> If you have already cloned the repository under the old name, update your local repository’s remote URL:
Expand All @@ -50,17 +52,59 @@ No need to worry if you are new to programming. This guide will walk you through
> git remote set-url origin https://github.com/PyCeas/Pyceas.git
> ```

## Getting Started

1. **Clone the Repository:**
No need to worry if you are new to programming. This guide will walk you through the setup step by step. by the end, you'll have everything ready to run the PyCeas project.


### Clone the Repository
First you'll need to copy the PyCeas project to your computer through a process called "cloning".
```
git clone https://github.com/PyCeas/Pyceas.git

```

2. **Set up a virtual environment:**
### Install Python
Check if Python is installed on your system. You can check by running the following command in your terminal prompt:

- ##### For Mac Users:
1. Open the terminal and install Python using `Homebrew`. If Homebrew is not installed, [follow these instructions](https://brew.sh/):
```bash
brew install python3
```
1. After installation, verify it by running:
```bash
python3 --version
```

- ##### For Linux Users
1. Open the terminal and update your package list:
```bash
sudo apt update
```
2. Install Python
```bash
sudo apt install python3
```
3. After installation, verify it by running:
```bash
python3 --version
```

- ##### For Windows Users
1. Download the Python installer from the [official Python website](https://www.python.org/downloads/).
2. Run the installer and follow the on-screen instructions.
3. Make sure to check the box "Add Python to PATH" before clicking "Install Now".
4. After installation, verify by running:
```bash
python --version
```


### Set up a virtual environment
A virtual environment is like a seperate space on your computer where you can install the software needed for this project without affecting other programs.
- **For Mac or Linux Users:**

- ##### For Mac or Linux Users:
- In your terminal, navigate to the folder where you downloaded the project (usually the 'PyCeas' folder) using the 'cd' command:
```bash
cd PyCeas
Expand All @@ -74,43 +118,43 @@ A virtual environment is like a seperate space on your computer where you can in
source venv/bin/activate
```

- **For Windows Users**:
- ##### For Windows Users:
- Open Command Prompt and navigate to the 'PyCeas' folder (where you downloaded the project) using the 'cd' command:
```bash
cd PyCeas
```
- Set up the virtual environment by typing:
```bash
python3 -m venv venv
python -m venv venv
```
- Activate the virtual environment:
```bash
venv\Scripts\activate
```

3. **Install Required Software**:
### Install Required Software
Now, you'll need to install the necessary software that the project depends on.
- Make sure you're still in the 'PyCeas' directory/folder and that the virtual environment is active.
- Install the software by typing the following command:
```
```bash
pip install -r requirements.txt # For running the game (runtime dependencies)
```
This installs everything you need to run the project.
- If you plan to do any local development or modifications, also run:
```
```bash
pip install -r requirements_dev.txt # For local development
```

This step is optional and only needed if you want to make changes to the project.
4. **Run the project**
### Run the project
Now you are ready to start the project!
- Simply type:
```
```bash
python main.py
```
- The project should start running, and you'll see it in action!

**Deactivate the Virtual Environment**:
### Deactivate the Virtual Environment:
When you’re done working, you can deactivate the virtual environment using:
```bash
deactivate
Expand Down
1 change: 0 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
# import Pygame specific objects, functions and functionality
from src.game_manager import GameStateManager


if __name__ == "__main__":
game = GameStateManager()
game.run()
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[tool.ruff]
line-length = 120
lint.select = ["E", "F", "I"]
lint.fixable = ["F", "I"]
exclude = ["build/", "dist/", ".venv/"]

[tool.mypy]
python_version = "3.12"
check_untyped_defs = true
ignore_missing_imports = true
explicit_package_bases = true

["mypy-pygame.*"]
ignore_missing_imports = true
Loading