Skip to content

Commit

Permalink
Merge pull request #3 from WizzyGeek/devops
Browse files Browse the repository at this point in the history
Add configuration for tox, poetry and mypy
  • Loading branch information
Meetesh-Saini authored Nov 6, 2023
2 parents fba90ea + 2c08c95 commit 080cfe1
Show file tree
Hide file tree
Showing 25 changed files with 870 additions and 97 deletions.
34 changes: 34 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!-- TODO, write more about tox and poetry later -->

# What you need.

Install tox as mentioned [here](https://tox.wiki/en/latest/installation.html)

Then install poetry as detailed [here](https://python-poetry.org/docs/#installation)



## Adding a dependency
Warning, never use pip to add a dependency. Nasty things are gonna
happen if you ignore that advice.

```
$ poetry add yourdep yourdep2 ...
```

The command may take time due to dependency resolution sometimes, but
if it exceeds 5 minutes it is abnormal. Usually it should be done before you notice.

## Spawning a shell in the environment

```
$ poetry shell
```

You can learn more at https://python-poetry.org/docs/cli/

## Running tests

```
$ tox r
```
17 changes: 11 additions & 6 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,23 @@ jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [
"3.11",
"3.12"
]

steps:
# TODO: Add caching
- uses: actions/checkout@v4
- name: Set up Python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
python-version: ${{ matrix.python-version }}
- name: Install Tox in Python ${{ matrix.python-version }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run the tox environment
python -m pip install tox-gh
- name: Run the tox environment (Python ${{ matrix.python-version }})
run: |
tox
2 changes: 1 addition & 1 deletion OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Rough functionality:
- clear (NEW)
- Stops all running containers associated with the team
- CTF
- (id) -> Get CTF info
- (id) -> Get CTF info
- start
- Check if team has already completed it
- Only if no container is assigned to the team before
Expand Down
10 changes: 0 additions & 10 deletions app.py

This file was deleted.

1 change: 0 additions & 1 deletion config.py

This file was deleted.

1 change: 0 additions & 1 deletion db.py

This file was deleted.

8 changes: 0 additions & 8 deletions docs.py

This file was deleted.

Loading

0 comments on commit 080cfe1

Please sign in to comment.