Skip to content

Commit 6a8df70

Browse files
added unit test and template (#4)
* Add GITHUB_WORKSPACE to python-nose.yml * Remove load module path * Create __init__.py * run CI * Update test_modelinfo.py * Update python-nose.yml * Update python-nose.yml * Update python-nose.yml * Update python-nose.yml * Update modelinfolib.py * Update python-nose.yml * Update python-nose.yml * Update python-nose.yml * Update python-nose.yml * Update python-nose.yml * Create bug_report.md * Create feature_request.md * revert branches in python-nose.yml --------- Co-authored-by: Morten <mortenkretschmer@yahoo.de>
1 parent 8318c34 commit 6a8df70

File tree

6 files changed

+64
-4
lines changed

6 files changed

+64
-4
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/python-nose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ jobs:
88
build-linux:
99
runs-on: ubuntu-latest
1010

11+
env:
12+
PYTHONPATH: ${{ github.workspace }}
13+
1114
steps:
1215
- uses: actions/checkout@v3
1316
- name: Set up Python 3.11

src/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

src/modelinfolib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from datetime import datetime, date
33
import pygrib
44
import numpy as np
5-
import utilitylib as ut
5+
import src.utilitylib as ut
66

77
"""
88
# ICON Nest

test/test_modelinfo.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#!/usr/bin/python3
2-
import sys
32
import unittest
43
from datetime import datetime
54
# project moduls
6-
sys.path.append('../src/')
7-
from modelinfolib import MODELIFNO
5+
from src.modelinfolib import MODELIFNO
86

97

108
class TestMODELIFNO(unittest.TestCase):

0 commit comments

Comments
 (0)