No description
  • Python 94.5%
  • Gherkin 3.8%
  • Dockerfile 1.7%
Find a file
Thomas Schissler 19dac1e99a
Merge pull request #12 from proscrumdev/dependabot/pip/pylint-4.0.9
Bump pylint from 2.16.1 to 4.0.9
2026-11-02 12:46:00 +01:00
.devcontainer Moved connection string to config.toml and updated python references to 2026-08-18 16:02:31 -05:00
.forgejo/workflows Add Forgejo CI 2025-10-16 13:46:06 +02:00
.vscode feat(gh): add devcontainer 2024-05-16 10:09:42 +00:00
features Initial commit 2018-11-14 09:50:36 +01:00
tests Initial commit 2018-11-14 09:50:36 +01:00
torpydo Moved connection string to config.toml and updated python references to 2026-08-18 16:02:31 -05:00
.gitignore Fix Sonar analysis by using sonar-scanner directly in .gitlab-ci.yml 2019-04-08 19:30:51 +02:00
.gitlab-ci.yml Update distribution folder name 2024-03-05 15:58:34 +01:00
buildpipeline.yml Update Python version in build pipeline 2025-10-22 14:34:06 +02:00
config.toml Moved connection string to config.toml and updated python references to 2026-08-18 16:02:31 -05:00
Dockerfile Moved connection string to config.toml and updated python references to 2026-08-18 16:02:31 -05:00
DockerfileBuild Moved connection string to config.toml and updated python references to 2026-08-18 16:02:31 -05:00
MANIFEST Fixed issue with sdist in python3.10, Upgraded docker to python3.10 2022-08-29 17:30:44 +02:00
MANIFEST.in Fixed issue with sdist in python3.10, Upgraded docker to python3.10 2022-08-29 17:30:44 +02:00
nose2.cfg Fix build pipelines and README after nose2 update 2022-08-29 15:07:22 +02:00
README.md Update README.md 2026-08-18 16:02:36 -05:00
requirements.txt Bump pylint from 2.16.1 to 4.0.9 2026-11-01 22:35:41 +00:00
setup.py Fixed issue with sdist in python3.10, Upgraded docker to python3.10 2022-08-29 17:30:44 +02:00
start.py Updated Azure pipeline to generate executable 2023-08-22 13:53:37 +02:00

Build status

Torpydo - Battleship Python

A simple game of Battleship, written in Python. The purpose of this repository is to serve as an entry point into coding exercises and it was especially created for scrum.orgs Applying Professional Scrum for Software Development course (www.scrum.org/apssd). The code in this repository is unfinished by design.

Getting started

This project requires Python 3.12 or newer. To prepare to work with it, pick one of these options:

Linux and macOS

Create and activate a virtual environment. This assumes python3 is already installed.

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
export PYTHONPATH=.

If you stop working on this project, close your shell, and return later, make sure you run the source bin/venv/activate command again.

Windows

Download and install Python for Windows. Make sure python is on your PATH. Use the Python install manager to help set up dependencies and PATH variables.

Open a command prompt:

python -m venv venv
venv\Scripts\activate.bat
pip install -r requirements.txt
set PYTHONPATH=.

Docker

If you don't want to install anything Python-related on your system, you can run the game inside Docker instead.

Build the Docker Image

docker build -t torpydo .

Run a Docker Container from the Image

docker run -it --env PYTHONPATH=/torpydo -v ${PWD}:/torpydo torpydo bash

Launching the game

python -m torpydo

# alternatively:
python torpydo/battleship.py

Running the Tests

nose2 -v
behave

to run with coverage:

nose2 -v --with-coverage --coverage ./torpydo

to run and store the test results for further examination (e.g. build pipeline)

nose2 --v --junit-xml --junit-xml-path xunit.xml
behave --junit

Run behave tests with coverage:

https://stackoverflow.com/a/37447392/736079

Telemetry data

This application is collecting telemetry data with Microsoft Application Insights. For more details see https://docs.microsoft.com/en-us/azure/azure-monitor/app/opencensus-python.

To send the telemetry data to a specific instance of Application Insights, the connection string has to be adjusted in telemetryclient.py