apsg 1.3.1__tar.gz → 1.3.3__tar.gz

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.
Files changed (83) hide show
  1. {apsg-1.3.1 → apsg-1.3.3}/PKG-INFO +32 -30
  2. {apsg-1.3.1 → apsg-1.3.3}/pyproject.toml +4 -7
  3. apsg-1.3.3/setup.cfg +4 -0
  4. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/__init__.py +1 -1
  5. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/database/_alchemy.py +5 -13
  6. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/database/_sdbread.py +8 -1
  7. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/shell.py +4 -4
  8. apsg-1.3.3/src/apsg.egg-info/PKG-INFO +189 -0
  9. apsg-1.3.3/src/apsg.egg-info/SOURCES.txt +43 -0
  10. apsg-1.3.3/src/apsg.egg-info/dependency_links.txt +1 -0
  11. apsg-1.3.3/src/apsg.egg-info/entry_points.txt +2 -0
  12. apsg-1.3.3/src/apsg.egg-info/requires.txt +30 -0
  13. apsg-1.3.3/src/apsg.egg-info/top_level.txt +1 -0
  14. apsg-1.3.1/.editorconfig +0 -21
  15. apsg-1.3.1/.gitattributes +0 -25
  16. apsg-1.3.1/.github/dependabot.yml +0 -6
  17. apsg-1.3.1/.github/workflows/release.yml +0 -32
  18. apsg-1.3.1/.github/workflows/testing.yml +0 -36
  19. apsg-1.3.1/.gitignore +0 -55
  20. apsg-1.3.1/.pre-commit-config.yaml +0 -40
  21. apsg-1.3.1/.readthedocs.yaml +0 -16
  22. apsg-1.3.1/CHANGELOG.md +0 -309
  23. apsg-1.3.1/CONTRIBUTING.md +0 -91
  24. apsg-1.3.1/docs/Makefile +0 -177
  25. apsg-1.3.1/docs/apsg.database.rst +0 -87
  26. apsg-1.3.1/docs/apsg.feature.rst +0 -11
  27. apsg-1.3.1/docs/apsg.helpers.rst +0 -7
  28. apsg-1.3.1/docs/apsg.math.rst +0 -11
  29. apsg-1.3.1/docs/apsg.pandas.rst +0 -11
  30. apsg-1.3.1/docs/apsg.plotting.rst +0 -10
  31. apsg-1.3.1/docs/authors.rst +0 -13
  32. apsg-1.3.1/docs/automodules.rst +0 -15
  33. apsg-1.3.1/docs/conf.py +0 -292
  34. apsg-1.3.1/docs/contributing.rst +0 -104
  35. apsg-1.3.1/docs/index.rst +0 -148
  36. apsg-1.3.1/docs/installation.rst +0 -40
  37. apsg-1.3.1/docs/make.bat +0 -242
  38. apsg-1.3.1/docs/notebooks/01_apsg_basics.ipynb +0 -1815
  39. apsg-1.3.1/docs/notebooks/02_apsg_tensors.ipynb +0 -1074
  40. apsg-1.3.1/docs/notebooks/03_apsg_stereonet.ipynb +0 -495
  41. apsg-1.3.1/docs/notebooks/04_apsg_fabricplots.ipynb +0 -387
  42. apsg-1.3.1/docs/notebooks/05_apsg_pandas.ipynb +0 -912
  43. apsg-1.3.1/docs/notebooks/06_apsg_various.ipynb +0 -495
  44. apsg-1.3.1/docs/notebooks/mele.csv +0 -95
  45. apsg-1.3.1/docs/notebooks/rerender_notebooks.sh +0 -8
  46. apsg-1.3.1/docs/notebooks/structures.csv +0 -254
  47. apsg-1.3.1/docs/requirements.txt +0 -8
  48. apsg-1.3.1/docs/tutorials.rst +0 -13
  49. apsg-1.3.1/environment-dev.yml +0 -12
  50. apsg-1.3.1/tests/__init__.py +0 -0
  51. apsg-1.3.1/tests/conftest.py +0 -36
  52. {apsg-1.3.1 → apsg-1.3.3}/LICENSE +0 -0
  53. {apsg-1.3.1 → apsg-1.3.3}/README.md +0 -0
  54. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/config.py +0 -0
  55. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/database/__init__.py +0 -0
  56. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/decorator/__init__.py +0 -0
  57. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/decorator/_decorator.py +0 -0
  58. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/feature/__init__.py +0 -0
  59. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/feature/_container.py +0 -0
  60. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/feature/_geodata.py +0 -0
  61. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/feature/_paleomag.py +0 -0
  62. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/feature/_statistics.py +0 -0
  63. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/feature/_tensor2.py +0 -0
  64. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/feature/_tensor3.py +0 -0
  65. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/helpers/__init__.py +0 -0
  66. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/helpers/_helper.py +0 -0
  67. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/helpers/_math.py +0 -0
  68. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/helpers/_notation.py +0 -0
  69. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/math/__init__.py +0 -0
  70. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/math/_matrix.py +0 -0
  71. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/math/_vector.py +0 -0
  72. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/pandas/__init__.py +0 -0
  73. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/pandas/_pandas_api.py +0 -0
  74. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/plotting/__init__.py +0 -0
  75. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/plotting/_fabricplot.py +0 -0
  76. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/plotting/_paleomagplots.py +0 -0
  77. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/plotting/_plot_artists.py +0 -0
  78. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/plotting/_projection.py +0 -0
  79. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/plotting/_roseplot.py +0 -0
  80. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/plotting/_stereogrid.py +0 -0
  81. {apsg-1.3.1 → apsg-1.3.3}/src/apsg/plotting/_stereonet.py +0 -0
  82. {apsg-1.3.1 → apsg-1.3.3}/tests/test_apsg.py +0 -0
  83. {apsg-1.3.1 → apsg-1.3.3}/tests/test_tensors.py +0 -0
@@ -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
 
@@ -50,14 +50,11 @@ Changelog = "https://github.com/ondrolexa/apsg/blob/master/CHANGELOG.md"
50
50
  iapsg = "apsg.shell:main"
51
51
 
52
52
  [build-system]
53
- requires = ["hatchling"]
54
- build-backend = "hatchling.build"
53
+ requires = ["setuptools >= 61.0"]
54
+ build-backend = "setuptools.build_meta"
55
55
 
56
- [tool.hatch.build.targets.wheel]
57
- packages = ["src/apsg"]
58
-
59
- [tool.hatch.version]
60
- path = "src/apsg/__init__.py"
56
+ [tool.setuptools.dynamic]
57
+ version = { attr = "apsg.__version__" }
61
58
 
62
59
  [tool.black]
63
60
  line-length = 88
apsg-1.3.3/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -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"
@@ -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
 
@@ -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))
@@ -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()
@@ -0,0 +1,189 @@
1
+ Metadata-Version: 2.4
2
+ Name: apsg
3
+ Version: 1.3.3
4
+ Summary: APSG - The package for structural geologists
5
+ Author-email: Ondrej Lexa <lexa.ondrej@gmail.com>
6
+ Maintainer-email: Ondrej Lexa <lexa.ondrej@gmail.com>
7
+ License: MIT License
8
+
9
+ APSG - The package for structural geologists.
10
+ Copyright (c) 2015-2024, Ondrej Lexa
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
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
+ Classifier: Development Status :: 4 - Beta
37
+ Classifier: Intended Audience :: Science/Research
38
+ Classifier: License :: OSI Approved :: MIT License
39
+ Classifier: Operating System :: OS Independent
40
+ Classifier: Programming Language :: Python :: 3
41
+ Requires-Python: >=3.10
42
+ Description-Content-Type: text/markdown
43
+ License-File: LICENSE
44
+ Requires-Dist: numpy
45
+ Requires-Dist: matplotlib>=3.9
46
+ Requires-Dist: scipy
47
+ Requires-Dist: sqlalchemy
48
+ Requires-Dist: pandas
49
+ Provides-Extra: extra
50
+ Requires-Dist: jupyterlab; extra == "extra"
51
+ Requires-Dist: pyqt5; extra == "extra"
52
+ Provides-Extra: tests
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
71
+
72
+ <img src="https://ondrolexa.github.io/apsg/apsg_banner.svg" alt="APSG logo" width="300px"/>
73
+
74
+ [![PyPI - Version](https://img.shields.io/pypi/v/apsg)](https://pypi.org/project/apsg)
75
+ [![Conda](https://img.shields.io/conda/v/conda-forge/apsg)](https://anaconda.org/conda-forge/apsg)
76
+ [![Documentation Status](https://readthedocs.org/projects/apsg/badge/?version=stable)](https://apsg.readthedocs.io/en/stable/?badge=stable)
77
+ [![DOI](https://zenodo.org/badge/24879346.svg)](https://zenodo.org/badge/latestdoi/24879346)
78
+
79
+ ## :thinking: What is APSG?
80
+
81
+ APSG is the package for structural geologists. It defines several new python classes to easily manage, analyze and visualize orientational structural geology data.
82
+
83
+ > [!IMPORTANT]
84
+ > APSG has been significantly refactored from version 1.0 and several changes are
85
+ > breaking backward compatibility. The main APSG namespace provides often-used
86
+ > classes in lowercase names as aliases to `PascalCase` convention used in
87
+ > modules to provide a simplified interface for users. The `PascalCase` names of
88
+ > classes use longer and plain English names instead acronyms for better readability.
89
+ >
90
+ > Check [documentation](https://apsg.readthedocs.org) for more details.
91
+
92
+ ## :hammer_and_wrench: Requirements
93
+
94
+ You need Python 3.9 or later to run APSG. The package requires [NumPy](https://numpy.org/) and [SciPy](https://www.scipy.org/),
95
+ [Matplotlib](https://matplotlib.org/), [SciPy](https://scipy.org/), [SQLAlchemy](https://www.sqlalchemy.org/)
96
+ and [pandas](https://pandas.pydata.org/).
97
+
98
+ ## :rocket: How to install
99
+
100
+ It is strongly suggested to install **apsg** into separate environment. You can create
101
+ Python virtual environment. For Linux and macOS use:
102
+
103
+ python -m venv .venv
104
+ source .venv/bin/activate
105
+
106
+ for Windows use Command Prompt or PowerShell:
107
+
108
+ python -m venv .venv
109
+ .venv\Scripts\activate
110
+
111
+ > [!NOTE]
112
+ > On Microsoft Windows, it may be required to set the execution policy in PowerShell for the user.
113
+ > You can do this by issuing the following PowerShell command:
114
+ > ```
115
+ > Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
116
+ > ```
117
+
118
+ and install latest stable version of **apsg** using pip within the environment:
119
+
120
+ pip install apsg
121
+
122
+ To include jupyterlab and pyqt5 in installation, use `extra` option:
123
+
124
+ ## I'm using conda or mamba to manage environments
125
+
126
+ pip install apsg[extra]
127
+
128
+ or install **master** with:
129
+
130
+ pip install git+https://github.com/ondrolexa/apsg.git
131
+
132
+ Alternatively, you can clone the repository and do a local install (recommended for dev):
133
+ git clone https://github.com/ondrolexa/apsg.git
134
+ cd apsg
135
+ pip install -e .[dev]
136
+
137
+ #### Upgrading via pip
138
+
139
+ To upgrade an existing version of APSG from PyPI, execute:
140
+
141
+ pip install apsg --upgrade --no-deps
142
+
143
+ #### Comments on system-wide instalations on Debian systems
144
+
145
+ Latest Debian-based systems does not allow to install non-debian packages system-wide.
146
+ However, installing all requirements allows to force install APSG system-wide without troubles.
147
+
148
+ Install requirements using apt:
149
+
150
+ sudo apt install python3-numpy python3-matplotlib python3-scipy python3-sqlalchemy python3-pandas
151
+
152
+ and then install apsg using pip:
153
+
154
+ pip install --break-system-packages apsg
155
+
156
+ ### I'm using conda or mamba to manage environments
157
+
158
+ If you have already have conda or mamba installed, you can create environment with:
159
+
160
+ conda config --add channels conda-forge
161
+ conda create -n apsg python apsg jupyterlab pyqt
162
+
163
+ or using mamba
164
+
165
+ mamba create -n apsg python apsg jupyterlab pyqt
166
+
167
+ #### Current release info
168
+
169
+ | Name | Downloads | Version | Platforms |
170
+ | --- | --- | --- | --- |
171
+ | [![Conda Recipe](https://img.shields.io/badge/recipe-apsg-green.svg)](https://anaconda.org/conda-forge/apsg) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/apsg.svg)](https://anaconda.org/conda-forge/apsg) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/apsg.svg)](https://anaconda.org/conda-forge/apsg) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/apsg.svg)](https://anaconda.org/conda-forge/apsg) |
172
+
173
+ ## :blue_book: Documentation
174
+
175
+ Explore all the features of APSG. You can find detailed documentation [here](https://apsg.readthedocs.org).
176
+
177
+ ## :computer: Contributing
178
+
179
+ Most discussion happens on [Github](https://github.com/ondrolexa/apsg). Feel free to open [an issue](https://github.com/ondrolexa/apsg/issues/new) or comment on any open issue or pull request. Check ``CONTRIBUTING.md`` for more details.
180
+
181
+ ## :coin: Donate
182
+
183
+ APSG is an open-source project, available for you for free. It took a lot of time and resources to build this software. If you find this software useful and want to support its future development please consider donating me.
184
+
185
+ [![Donate via PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=QTYZWVUNDUAH8&item_name=APSG+development+donation&currency_code=EUR&source=url)
186
+
187
+ ## License
188
+
189
+ APSG is free software: you can redistribute it and/or modify it under the terms of the MIT License. A copy of this license is provided in ``LICENSE`` file.
@@ -0,0 +1,43 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/apsg/__init__.py
5
+ src/apsg/config.py
6
+ src/apsg/shell.py
7
+ src/apsg.egg-info/PKG-INFO
8
+ src/apsg.egg-info/SOURCES.txt
9
+ src/apsg.egg-info/dependency_links.txt
10
+ src/apsg.egg-info/entry_points.txt
11
+ src/apsg.egg-info/requires.txt
12
+ src/apsg.egg-info/top_level.txt
13
+ src/apsg/database/__init__.py
14
+ src/apsg/database/_alchemy.py
15
+ src/apsg/database/_sdbread.py
16
+ src/apsg/decorator/__init__.py
17
+ src/apsg/decorator/_decorator.py
18
+ src/apsg/feature/__init__.py
19
+ src/apsg/feature/_container.py
20
+ src/apsg/feature/_geodata.py
21
+ src/apsg/feature/_paleomag.py
22
+ src/apsg/feature/_statistics.py
23
+ src/apsg/feature/_tensor2.py
24
+ src/apsg/feature/_tensor3.py
25
+ src/apsg/helpers/__init__.py
26
+ src/apsg/helpers/_helper.py
27
+ src/apsg/helpers/_math.py
28
+ src/apsg/helpers/_notation.py
29
+ src/apsg/math/__init__.py
30
+ src/apsg/math/_matrix.py
31
+ src/apsg/math/_vector.py
32
+ src/apsg/pandas/__init__.py
33
+ src/apsg/pandas/_pandas_api.py
34
+ src/apsg/plotting/__init__.py
35
+ src/apsg/plotting/_fabricplot.py
36
+ src/apsg/plotting/_paleomagplots.py
37
+ src/apsg/plotting/_plot_artists.py
38
+ src/apsg/plotting/_projection.py
39
+ src/apsg/plotting/_roseplot.py
40
+ src/apsg/plotting/_stereogrid.py
41
+ src/apsg/plotting/_stereonet.py
42
+ tests/test_apsg.py
43
+ tests/test_tensors.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ iapsg = apsg.shell:main
@@ -0,0 +1,30 @@
1
+ numpy
2
+ matplotlib>=3.9
3
+ scipy
4
+ sqlalchemy
5
+ pandas
6
+
7
+ [dev]
8
+ pytest
9
+ black
10
+ sphinx
11
+ sphinx_rtd_theme
12
+ readthedocs-sphinx-search
13
+ ipykernel
14
+ nbsphinx
15
+ autodocsumm
16
+
17
+ [docs]
18
+ sphinx
19
+ sphinx_rtd_theme
20
+ readthedocs-sphinx-search
21
+ ipykernel
22
+ nbsphinx
23
+ autodocsumm
24
+
25
+ [extra]
26
+ jupyterlab
27
+ pyqt5
28
+
29
+ [tests]
30
+ pytest
@@ -0,0 +1 @@
1
+ apsg
apsg-1.3.1/.editorconfig DELETED
@@ -1,21 +0,0 @@
1
- # http://editorconfig.org
2
-
3
- root = true
4
-
5
- [*]
6
- indent_style = space
7
- indent_size = 4
8
- trim_trailing_whitespace = true
9
- insert_final_newline = true
10
- charset = utf-8
11
- end_of_line = lf
12
-
13
- [*.bat]
14
- indent_style = tab
15
- end_of_line = crlf
16
-
17
- [LICENSE]
18
- insert_final_newline = false
19
-
20
- [Makefile]
21
- indent_style = tab
apsg-1.3.1/.gitattributes DELETED
@@ -1,25 +0,0 @@
1
- # Basic .gitattributes for a python repo.
2
-
3
- # Source files
4
- # ============
5
- *.pxd text
6
- *.py text
7
- *.py3 text
8
- *.pyw text
9
- *.pyx text
10
-
11
- # Binary files
12
- # ============
13
- *.db binary
14
- *.p binary
15
- *.pkl binary
16
- *.pyc binary
17
- *.pyd binary
18
- *.pyo binary
19
-
20
- # Note: .db, .p, and .pkl files are associated
21
- # with the python modules ``pickle``, ``dbm.*``,
22
- # ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
23
- # (among others).
24
-
25
- .ipynb linguist-generated=true
@@ -1,6 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: "github-actions"
4
- directory: "/"
5
- schedule:
6
- interval: "monthly"
@@ -1,32 +0,0 @@
1
- name: PyPi Publisher
2
-
3
- on:
4
- release:
5
- types: [published]
6
-
7
- jobs:
8
- pypi-publisher:
9
- runs-on: ubuntu-latest
10
- environment:
11
- name: pypi
12
- url: https://pypi.org/a/apsg
13
-
14
- permissions:
15
- id-token: write # IMPORTANT: mandatory for trusted publishing
16
-
17
- steps:
18
- - uses: actions/checkout@v4
19
- with:
20
- persist-credentials: false
21
- - name: Set up Python
22
- uses: actions/setup-python@v5
23
- with:
24
- python-version: "3.x"
25
- - name: Install dependencies
26
- run: |
27
- python -m pip install --upgrade pip
28
- pip install build
29
- - name: Build package
30
- run: python -m build
31
- - name: Publish distribution 📦 to PyPI
32
- uses: pypa/gh-action-pypi-publish@release/v1
@@ -1,36 +0,0 @@
1
- name: Python testing
2
-
3
- on:
4
- push:
5
- branches:
6
- - "**"
7
- pull_request:
8
-
9
- jobs:
10
- build:
11
- name: Testing on ${{matrix.os}}
12
- runs-on: ${{matrix.os}}
13
- strategy:
14
- matrix:
15
- os: [ubuntu-latest, macos-latest, windows-latest]
16
- python-version: ["3.10", "3.11", "3.12"]
17
-
18
- steps:
19
- - name: Checkout repository
20
- uses: actions/checkout@v4
21
- with:
22
- # setuptools_scm requires a non-shallow clone of the repository
23
- fetch-depth: 0
24
-
25
- - name: Set up Python ${{ matrix.python-version }}
26
- uses: actions/setup-python@v5
27
- with:
28
- python-version: ${{ matrix.python-version }}
29
-
30
- - name: Install Python package
31
- run: |
32
- python -m pip install .[tests]
33
-
34
- - name: Run Python tests
35
- run: |
36
- python -m pytest