generated from nullndr/pyproj
Initial commit
This commit is contained in:
24
.gitea/workflows/code-quality.yaml
Normal file
24
.gitea/workflows/code-quality.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Code Quality
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pylint
|
||||
|
||||
- name: Run lint
|
||||
run: |
|
||||
pylint --errors-only $(git ls-files '*.py')
|
||||
26
.gitea/workflows/run-tests.yaml
Normal file
26
.gitea/workflows/run-tests.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Run tests
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
pip install pytest
|
||||
pytest
|
||||
|
||||
24
.github/workflows/code-quality.yaml
vendored
Normal file
24
.github/workflows/code-quality.yaml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Code Quality
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pylint
|
||||
|
||||
- name: Run lint
|
||||
run: |
|
||||
pylint --errors-only $(git ls-files '*.py')
|
||||
26
.github/workflows/run-tests.yaml
vendored
Normal file
26
.github/workflows/run-tests.yaml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Run tests
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
pip install pytest
|
||||
pytest
|
||||
|
||||
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
src/__pycache__
|
||||
tests/__pycache__
|
||||
6
CHANGELOG.md
Normal file
6
CHANGELOG.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
12
README.md
Normal file
12
README.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Python Project
|
||||
|
||||
A little template for Python projects.
|
||||
|
||||
## Testing
|
||||
|
||||
This project uses [`pytest`](https://docs.pytest.org/en/stable/), once installed the tests can be runned with:
|
||||
|
||||
```sh
|
||||
pytest
|
||||
```
|
||||
|
||||
0
docs/.gitkeep
Normal file
0
docs/.gitkeep
Normal file
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@@ -0,0 +1 @@
|
||||
# List of dependencies
|
||||
0
src/__init__.py
Normal file
0
src/__init__.py
Normal file
7
src/main.py
Normal file
7
src/main.py
Normal file
@@ -0,0 +1,7 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
def main():
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
10
tests/test_main.py
Normal file
10
tests/test_main.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from src.main import main
|
||||
import unittest
|
||||
|
||||
class TestMain(unittest.TestCase):
|
||||
def test_main(self):
|
||||
self.assertEqual(True, True)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user