File: 0001-Do-not-treat-src-directory-as-a-Python-package.patch

package info (click to toggle)
python-pyomop 4.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 536 kB
  • sloc: python: 1,374; sh: 37; makefile: 26
file content (120 lines) | stat: -rw-r--r-- 3,717 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
From: Michael Fladischer <FladischerMichael@fladi.at>
Date: Fri, 23 Jun 2023 11:34:23 +0000
Subject: Do not treat src directory as a Python package.

Forwarded: not-needed
---
 src/__init__.py              | 3 ---
 tests/conftest.py            | 8 ++++----
 tests/test_a_pyomop.py       | 2 +-
 tests/test_ab_vector.py      | 4 ++--
 tests/test_b_create_vocab.py | 2 +-
 tests/test_c_vocab.py        | 2 +-
 tests/test_d_vector.py       | 2 +-
 7 files changed, 10 insertions(+), 13 deletions(-)
 delete mode 100644 src/__init__.py

diff --git a/src/__init__.py b/src/__init__.py
deleted file mode 100644
index 3721d72..0000000
--- a/src/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-import warnings
-
-warnings.filterwarnings("ignore", category=DeprecationWarning)
\ No newline at end of file
diff --git a/tests/conftest.py b/tests/conftest.py
index d34a744..2efa5fb 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -12,17 +12,17 @@ import pytest
 
 @pytest.fixture
 def pyomop_fixture():
-    from src.pyomop import CdmEngineFactory
+    from pyomop import CdmEngineFactory
     cdm = CdmEngineFactory()
     return cdm
 
 @pytest.fixture
 def metadata_fixture():
-    from src.pyomop import metadata
+    from pyomop import metadata
     return metadata
 
 
 @pytest.fixture
 def vector_fixture():
-    from src.pyomop import CdmVector
-    return CdmVector()
\ No newline at end of file
+    from pyomop import CdmVector
+    return CdmVector()
diff --git a/tests/test_a_pyomop.py b/tests/test_a_pyomop.py
index eadc1cc..32960a0 100644
--- a/tests/test_a_pyomop.py
+++ b/tests/test_a_pyomop.py
@@ -10,7 +10,7 @@ def test_create_cohort(pyomop_fixture, metadata_fixture, capsys):
 
 
 async def create_cohort(pyomop_fixture,engine):
-    from src.pyomop import Cohort
+    from pyomop import Cohort
     import datetime
     from sqlalchemy.future import select
 
diff --git a/tests/test_ab_vector.py b/tests/test_ab_vector.py
index 13b06c3..d17d053 100644
--- a/tests/test_ab_vector.py
+++ b/tests/test_ab_vector.py
@@ -10,8 +10,8 @@ def test_create_patient(pyomop_fixture, metadata_fixture, capsys):
 
 
 async def create_patient(pyomop_fixture,engine):
-    from src.pyomop import Person
-    from src.pyomop import Cohort
+    from pyomop import Person
+    from pyomop import Cohort
     import datetime
     from sqlalchemy.future import select
 
diff --git a/tests/test_b_create_vocab.py b/tests/test_b_create_vocab.py
index 874f76c..6c99517 100644
--- a/tests/test_b_create_vocab.py
+++ b/tests/test_b_create_vocab.py
@@ -12,7 +12,7 @@ def test_create_vocab(pyomop_fixture, metadata_fixture, capsys):
     create_vocab(pyomop_fixture, engine)
 
 def create_vocab(pyomop_fixture,engine):
-    from src.pyomop import CdmVocabulary
+    from pyomop import CdmVocabulary
     vocab = CdmVocabulary(pyomop_fixture)
     vocab.create_vocab('tests', 10)
     print("Done")
diff --git a/tests/test_c_vocab.py b/tests/test_c_vocab.py
index 4ae4081..acf3c97 100644
--- a/tests/test_c_vocab.py
+++ b/tests/test_c_vocab.py
@@ -1,7 +1,7 @@
 
 
 def test_vocab(pyomop_fixture, capsys):
-    from src.pyomop import CdmVocabulary
+    from pyomop import CdmVocabulary
     vocab = CdmVocabulary(pyomop_fixture)
     # for x in pyomop_fixture.base:
     #     print(x)
diff --git a/tests/test_d_vector.py b/tests/test_d_vector.py
index 22b4c74..6acea82 100644
--- a/tests/test_d_vector.py
+++ b/tests/test_d_vector.py
@@ -10,7 +10,7 @@ def test_create_vector(pyomop_fixture, metadata_fixture, vector_fixture, capsys)
 
 
 async def create_vector(pyomop_fixture, vector_fixture, engine):
-    from src.pyomop import Cohort
+    from pyomop import Cohort
     import datetime
     from sqlalchemy.future import select