An open API service indexing awesome lists of open source software.

https://github.com/ninest/military-sim


https://github.com/ninest/military-sim

Last synced: 8 months ago
JSON representation

Awesome Lists containing this project

README

          

# Military Simulator

## Features

### Commands

Reference: https://www.youtube.com/watch?v=TjUTaFcxXYo?t=1015

- View
- Configure
- Next

## Build setup

Clone the repository then run

```bash
poetry shell
poetry install

python --version
# Should output `Python 3.9.1`
```

Ensure that everything's working with

```bash
python -m military_sim
```

## Project creation

This section describes how this project was created. You do not need to run these commands, but you should know them.

1. [Install poetry](https://python-poetry.org/docs/#installation)

On Mac or Linux, run

```bash
pip install poetry
# You may have to use pip3
```

To check if installation has worked, restart your terminal and run `poetry --version`.

2. Create the project with `poetry new military-sim`. Run this command, and it will create a folder `military-sim`.

3. Open VScode's terminal and enter `poetry shell`.

The output should be something like

```bash
military-sim/ poetry shell
Spawning shell within /.../Caches/pypoetry/virtualenvs/military-sim-JTlYG4VT-py3.9
military-sim/ . /.../Caches/pypoetry/virtualenvs/military-sim-JTlYG4VT-py3.9/bin/activate
(military-sim-JTlYG4VT-py3.9) military-sim/
```

To ensure that it's working, type the following commands into the terminal:

- `which python`
- `python --version`

`which python` should return something like `/.../Caches/pypoetry/virtualenvs/military-sim-JTlYG4VT-py3.9/bin/python`. This is the location of the Python virtual environment

`python --version` should return `Python 3.9.1`, which is the _local version_ of Python we're using for this project.

4. Set up VScode's Python interpreter.

Look to the bottom left of your screen and you should see your global version. I see

> Python 3.9.1 64-bit

We should set it to use the local virtualenv for this project. To get the path, copy the output of `which python` and remove the `/bin/python` from the end.

1. Click on the Python version in VScode, and it will open up a menu where you can select your Python interpreter.
2. Click on "Enter interpreter path..." (this should be the first option)
3. Paste in the output of `which python`. In my case, it's something like `/.../Library/Caches/pypoetry/virtualenvs/military-sim-JT-py3.9`

To check if it has worked, look at the bottom left and you should see something like

> Python 3.9.1 64-bit ('military-sim-JTIYG4VT-py3.9': venv)