apsg 1.3.1__py3-none-any.whl → 1.3.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
apsg/__init__.py CHANGED
@@ -98,6 +98,6 @@ __all__ = (
98
98
  "quicknet",
99
99
  )
100
100
 
101
- __version__ = "1.3.1"
101
+ __version__ = "1.3.3"
102
102
  __author__ = "Ondrej Lexa"
103
103
  __email__ = "lexa.ondrej@gmail.com"
apsg/database/_alchemy.py CHANGED
@@ -35,7 +35,7 @@ class Meta(Base):
35
35
  __tablename__ = "meta"
36
36
 
37
37
  id = Column(Integer, primary_key=True, autoincrement=True)
38
- name = Column(String(16), nullable=False)
38
+ name = Column(String(16), nullable=False, unique=True)
39
39
  value = Column(Text)
40
40
 
41
41
  def __repr__(self):
@@ -47,7 +47,7 @@ class Site(Base):
47
47
 
48
48
  id = Column(Integer, primary_key=True, autoincrement=True)
49
49
  id_units = Column(ForeignKey("units.id"), nullable=False, index=True)
50
- name = Column(String(16), nullable=False)
50
+ name = Column(String(16), nullable=False, unique=True)
51
51
  x_coord = Column(Float, server_default=text("NULL"))
52
52
  y_coord = Column(Float, server_default=text("NULL"))
53
53
  description = Column(Text)
@@ -58,8 +58,6 @@ class Site(Base):
58
58
  "Structdata", back_populates="site", cascade="all, delete-orphan"
59
59
  )
60
60
 
61
- __table_args__ = (UniqueConstraint("name", name="_site_name_uc"),)
62
-
63
61
  def __repr__(self):
64
62
  return "Site:{} ({})".format(self.name, self.unit.name)
65
63
 
@@ -131,7 +129,7 @@ class Structype(Base):
131
129
 
132
130
  id = Column(Integer, primary_key=True, autoincrement=True)
133
131
  pos = Column(Integer, nullable=False, server_default=text("0"))
134
- structure = Column(String(16), nullable=False)
132
+ structure = Column(String(16), nullable=False, unique=True)
135
133
  description = Column(Text)
136
134
  structcode = Column(Integer, server_default=text("0"))
137
135
  groupcode = Column(Integer, server_default=text("0"))
@@ -139,8 +137,6 @@ class Structype(Base):
139
137
 
140
138
  structdata = relationship("Structdata", back_populates="structype")
141
139
 
142
- __table_args__ = (UniqueConstraint("structure", name="_structype_structure_uc"),)
143
-
144
140
  def __repr__(self):
145
141
  return "Type:{}".format(self.structure)
146
142
 
@@ -150,13 +146,11 @@ class Tag(Base):
150
146
 
151
147
  id = Column(Integer, primary_key=True, autoincrement=True)
152
148
  pos = Column(Integer, nullable=False, server_default=text("0"))
153
- name = Column(String(16), nullable=False)
149
+ name = Column(String(16), nullable=False, unique=True)
154
150
  description = Column(Text)
155
151
 
156
152
  structdata = relationship("Structdata", secondary=tagged, back_populates="tags")
157
153
 
158
- __table_args__ = (UniqueConstraint("name", name="_tag_name_uc"),)
159
-
160
154
  def __repr__(self):
161
155
  return "Tag:{}".format(self.name)
162
156
 
@@ -166,13 +160,11 @@ class Unit(Base):
166
160
 
167
161
  id = Column(Integer, primary_key=True, autoincrement=True)
168
162
  pos = Column(Integer, nullable=False, server_default=text("0"))
169
- name = Column(String(60), nullable=False)
163
+ name = Column(String(60), nullable=False, unique=True)
170
164
  description = Column(Text)
171
165
 
172
166
  sites = relationship("Site", back_populates="unit")
173
167
 
174
- __table_args__ = (UniqueConstraint("name", name="_unit_name_uc"),)
175
-
176
168
  def __repr__(self):
177
169
  return "Unit:{}".format(self.name)
178
170
 
apsg/database/_sdbread.py CHANGED
@@ -94,6 +94,13 @@ class SDB(object):
94
94
  raise
95
95
 
96
96
  def info(self, report="basic"):
97
+ """
98
+ PySDB database report
99
+
100
+ Args:
101
+ report (str): type of report. `basic`, `data` or `tags`. Default `basic`
102
+
103
+ """
97
104
  lines = []
98
105
  if report == "basic":
99
106
  lines.append("PySDB database version: {}".format(self.meta("version")))
@@ -111,7 +118,7 @@ class SDB(object):
111
118
  if len(r) > 0:
112
119
  lines.append("Number of {} measurements: {}".format(s, len(r)))
113
120
  elif report == "tags":
114
- for s in self.structures():
121
+ for s in self.tags():
115
122
  r = self.execsql(self._make_select(tags=s))
116
123
  if len(r) > 0:
117
124
  lines.append("{} measurements tagged as {}.".format(len(r), s))
apsg/shell.py CHANGED
@@ -6,8 +6,6 @@
6
6
  Run the interactive shell.
7
7
  """
8
8
 
9
-
10
- import pkg_resources
11
9
  import code
12
10
 
13
11
  try:
@@ -15,14 +13,16 @@ try:
15
13
  except ImportError:
16
14
  pass
17
15
 
18
- from pylab import * # NOQA
16
+ import numpy as np
17
+ import matplotlib.pyplot as plt
18
+ import apsg
19
19
  from apsg import * # NOQA
20
20
 
21
21
 
22
22
  def main():
23
23
  banner = "+----------------------------------------------------------+\n"
24
24
  banner += " APSG toolbox "
25
- banner += pkg_resources.require("apsg")[0].version
25
+ banner += apsg.__version__
26
26
  banner += " - http://ondrolexa.github.io/apsg\n"
27
27
  banner += "+----------------------------------------------------------+"
28
28
  vars = globals().copy()
@@ -1,12 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apsg
3
- Version: 1.3.1
3
+ Version: 1.3.3
4
4
  Summary: APSG - The package for structural geologists
5
- Project-URL: Homepage, https://github.com/ondrolexa/apsg
6
- Project-URL: Documentation, https://apsg.readthedocs.io
7
- Project-URL: Repository, https://github.com/ondrolexa/apsg.git
8
- Project-URL: Issues, https://github.com/ondrolexa/apsg/issues
9
- Project-URL: Changelog, https://github.com/ondrolexa/apsg/blob/master/CHANGELOG.md
10
5
  Author-email: Ondrej Lexa <lexa.ondrej@gmail.com>
11
6
  Maintainer-email: Ondrej Lexa <lexa.ondrej@gmail.com>
12
7
  License: MIT License
@@ -31,41 +26,48 @@ License: MIT License
31
26
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
27
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
28
  SOFTWARE.
34
- License-File: LICENSE
35
- Keywords: orientation data,stereonet,structural geology
29
+
30
+ Project-URL: Homepage, https://github.com/ondrolexa/apsg
31
+ Project-URL: Documentation, https://apsg.readthedocs.io
32
+ Project-URL: Repository, https://github.com/ondrolexa/apsg.git
33
+ Project-URL: Issues, https://github.com/ondrolexa/apsg/issues
34
+ Project-URL: Changelog, https://github.com/ondrolexa/apsg/blob/master/CHANGELOG.md
35
+ Keywords: structural geology,stereonet,orientation data
36
36
  Classifier: Development Status :: 4 - Beta
37
37
  Classifier: Intended Audience :: Science/Research
38
38
  Classifier: License :: OSI Approved :: MIT License
39
39
  Classifier: Operating System :: OS Independent
40
40
  Classifier: Programming Language :: Python :: 3
41
41
  Requires-Python: >=3.10
42
- Requires-Dist: matplotlib>=3.9
42
+ Description-Content-Type: text/markdown
43
+ License-File: LICENSE
43
44
  Requires-Dist: numpy
44
- Requires-Dist: pandas
45
+ Requires-Dist: matplotlib>=3.9
45
46
  Requires-Dist: scipy
46
47
  Requires-Dist: sqlalchemy
47
- Provides-Extra: dev
48
- Requires-Dist: autodocsumm; extra == 'dev'
49
- Requires-Dist: black; extra == 'dev'
50
- Requires-Dist: ipykernel; extra == 'dev'
51
- Requires-Dist: nbsphinx; extra == 'dev'
52
- Requires-Dist: pytest; extra == 'dev'
53
- Requires-Dist: readthedocs-sphinx-search; extra == 'dev'
54
- Requires-Dist: sphinx; extra == 'dev'
55
- Requires-Dist: sphinx-rtd-theme; extra == 'dev'
56
- Provides-Extra: docs
57
- Requires-Dist: autodocsumm; extra == 'docs'
58
- Requires-Dist: ipykernel; extra == 'docs'
59
- Requires-Dist: nbsphinx; extra == 'docs'
60
- Requires-Dist: readthedocs-sphinx-search; extra == 'docs'
61
- Requires-Dist: sphinx; extra == 'docs'
62
- Requires-Dist: sphinx-rtd-theme; extra == 'docs'
48
+ Requires-Dist: pandas
63
49
  Provides-Extra: extra
64
- Requires-Dist: jupyterlab; extra == 'extra'
65
- Requires-Dist: pyqt5; extra == 'extra'
50
+ Requires-Dist: jupyterlab; extra == "extra"
51
+ Requires-Dist: pyqt5; extra == "extra"
66
52
  Provides-Extra: tests
67
- Requires-Dist: pytest; extra == 'tests'
68
- Description-Content-Type: text/markdown
53
+ Requires-Dist: pytest; extra == "tests"
54
+ Provides-Extra: docs
55
+ Requires-Dist: sphinx; extra == "docs"
56
+ Requires-Dist: sphinx_rtd_theme; extra == "docs"
57
+ Requires-Dist: readthedocs-sphinx-search; extra == "docs"
58
+ Requires-Dist: ipykernel; extra == "docs"
59
+ Requires-Dist: nbsphinx; extra == "docs"
60
+ Requires-Dist: autodocsumm; extra == "docs"
61
+ Provides-Extra: dev
62
+ Requires-Dist: pytest; extra == "dev"
63
+ Requires-Dist: black; extra == "dev"
64
+ Requires-Dist: sphinx; extra == "dev"
65
+ Requires-Dist: sphinx_rtd_theme; extra == "dev"
66
+ Requires-Dist: readthedocs-sphinx-search; extra == "dev"
67
+ Requires-Dist: ipykernel; extra == "dev"
68
+ Requires-Dist: nbsphinx; extra == "dev"
69
+ Requires-Dist: autodocsumm; extra == "dev"
70
+ Dynamic: license-file
69
71
 
70
72
  <img src="https://ondrolexa.github.io/apsg/apsg_banner.svg" alt="APSG logo" width="300px"/>
71
73
 
@@ -1,9 +1,9 @@
1
- apsg/__init__.py,sha256=UMS0nMQdDAnftTSM1Upz4xe-5zlXJM3rlhP9NcC720Q,1966
1
+ apsg/__init__.py,sha256=TSryR0LIs4EdoYtd6YEhLdoh2CfQnMgNKc6v25SH6Vw,1966
2
2
  apsg/config.py,sha256=X3_yXT96xXlVxFA94EfYFKJbrcGIHT0PvB9s8EKmYOg,4569
3
- apsg/shell.py,sha256=UFIOy01KckLsOlqfB0UomyWZ1ITL36-lBUFhlxWdZLE,718
3
+ apsg/shell.py,sha256=1D0PeB7qXzlpiOf2QYGo6OJlEVN1KJPYld1GEREBiFg,707
4
4
  apsg/database/__init__.py,sha256=7Rvcf1KBBBNhoM28ZlvQ01CkScQTroFkoS4d1kD55Ws,315
5
- apsg/database/_alchemy.py,sha256=cs8un4RJwUoE62GOberiTIQ2akFXYM0FoR-f1h4_DW8,19726
6
- apsg/database/_sdbread.py,sha256=Gzj0bpp0vnMvCfxIuX6Ktf01LoQWDCOcXST7HZp_XTY,10868
5
+ apsg/database/_alchemy.py,sha256=fBcLJBwcqxeImu7y_I6rDGFX3_i9w67VN1-T1lULsi4,19489
6
+ apsg/database/_sdbread.py,sha256=EP0hSp6_4-DZZptkMNDgKnQ3GD58mpr_SAgFohKu6xQ,11017
7
7
  apsg/decorator/__init__.py,sha256=fZ-dxpldQIk6-2JhVnCj-Tsl8bz2nvoGOyG7uXKvBfg,160
8
8
  apsg/decorator/_decorator.py,sha256=8TMSrcVvhU5UCbNMrnyrW3-65qo20_6N2ShtXd3bP-k,1194
9
9
  apsg/feature/__init__.py,sha256=XGLq3GXpiWtzX6ROtuSc0kCPJEPTVRoIUtr8VpRZOWI,1664
@@ -30,8 +30,9 @@ apsg/plotting/_projection.py,sha256=qnJgTQaFW0v2Pu9ySAEPADHhLgpXmfJ6QIrydry8rXQ,
30
30
  apsg/plotting/_roseplot.py,sha256=jbaUXSb3DIcXs0pWAQUTZfdlA2XcbquT0yHLYDjLirQ,12808
31
31
  apsg/plotting/_stereogrid.py,sha256=awh7MwN1WgszhOlr6UgR20wHQJ8u778-Tf_w1uflrV4,11869
32
32
  apsg/plotting/_stereonet.py,sha256=-BFM9RCInI-RYs1DKz-ymNFkMFJLTWuw3JcyUs7YiGM,36596
33
- apsg-1.3.1.dist-info/METADATA,sha256=VO_IH05Lz7B_VVuKzAVnjgYCB-4fbLboV8I6kVJ1L8o,8267
34
- apsg-1.3.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
35
- apsg-1.3.1.dist-info/entry_points.txt,sha256=SowP7_uRI0NJuzznKBXyM9BJcSwBxbXo6Iz5LUo9mEQ,42
36
- apsg-1.3.1.dist-info/licenses/LICENSE,sha256=lY0kfpVRrzcgVZq7pI6rLK5WYiUMWe0bdKpDelN6hk8,1120
37
- apsg-1.3.1.dist-info/RECORD,,
33
+ apsg-1.3.3.dist-info/licenses/LICENSE,sha256=lY0kfpVRrzcgVZq7pI6rLK5WYiUMWe0bdKpDelN6hk8,1120
34
+ apsg-1.3.3.dist-info/METADATA,sha256=h1WqeVtnjWG8vo8gi4zZynpXCsGxIaGYwlata_jwAMU,8298
35
+ apsg-1.3.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
36
+ apsg-1.3.3.dist-info/entry_points.txt,sha256=SowP7_uRI0NJuzznKBXyM9BJcSwBxbXo6Iz5LUo9mEQ,42
37
+ apsg-1.3.3.dist-info/top_level.txt,sha256=xWxwi0nqqOyKdmpsszfR-bmqnNpgVbhnLRuIKGJnaUM,5
38
+ apsg-1.3.3.dist-info/RECORD,,
@@ -1,4 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.27.0
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ apsg