Skip to content

Commit 63f8cbb

Browse files
authored
Merge pull request #3 from MrClock8163/dna
DNA support with GSI Online
2 parents b1e864e + 4b9cde3 commit 63f8cbb

22 files changed

+2262
-17
lines changed

.github/workflows/run-tests.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Automated testing
22

33
on: push
44

5+
env:
6+
FORCE_COLOR: 1
7+
MYPY_FORCE_COLOR: 1
8+
59
jobs:
610
testing:
711
name: Running tests
@@ -23,8 +27,8 @@ jobs:
2327

2428
- name: Test with pytest
2529
run: |
26-
python -m pip install pytest
27-
python -m pytest
30+
python -m pip install -r requirements.txt
31+
python -m pytest -v --color=yes
2832
2933
linting:
3034
name: Linting

docs/api/dna/index.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
geocompy.dna
2+
============
3+
4+
.. module:: geocompy.dna
5+
6+
.. autoclass:: DNA
7+
:members:
8+
:class-doc-from: both
9+
10+
11+
.. toctree::
12+
:maxdepth: 1
13+
14+
meta
15+
settings
16+
measurements

docs/api/dna/measurements.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
geocompy.dna.measurements
2+
=========================
3+
4+
.. module:: geocompy.dna.measurements
5+
6+
.. autoclass:: DNAMeasurements
7+
:members:
8+
:undoc-members:
9+
:class-doc-from: both

docs/api/dna/meta.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
geocompy.dna.meta
2+
=================
3+
4+
.. module:: geocompy.dna.meta
5+
6+
.. autodata:: param_descriptions
7+
:no-value:
8+
9+
.. autodata:: word_descriptions
10+
:no-value:

docs/api/dna/settings.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
geocompy.dna.settings
2+
=====================
3+
4+
.. module:: geocompy.dna.settings
5+
6+
.. autoclass:: DNASettings
7+
:members:
8+
:undoc-members:
9+
:class-doc-from: both

docs/conf.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,15 @@
100100

101101
# Immaterial toc adjustments
102102
object_description_options = [
103-
("py:.*",
103+
(
104+
"py:.*",
104105
{
105106
"include_fields_in_toc": False,
106107
"include_rubrics_in_toc": False
107108
}
108109
),
109-
("py:parameter",
110+
(
111+
"py:parameter",
110112
{
111113
"include_in_toc": False
112114
}
@@ -123,7 +125,9 @@
123125
napoleon_google_docstring = False
124126
napoleon_use_ivar = True
125127
napoleon_type_aliases = {
126-
"GeoComResponse": "~geocompy.GeoComResponse"
128+
"GeoComResponse": "~geocompy.GeoComResponse",
129+
"GsiOnlineResponse": "~geocompy.GsiOnlineResponse",
130+
"datetime": "~datetime.datetime"
127131
}
128132

129133
python_display_short_literal_types = True
@@ -142,8 +146,8 @@
142146
("py:obj", r"[a-zA-Z]{3}\.\w+")
143147
}
144148

145-
# GitHub source linking
146-
def linkcode_resolve(domain, info):
149+
150+
def linkcode_resolve(domain, info): # GitHub source linking
147151
if domain != 'py':
148152
return None
149153
if not info['module']:
@@ -154,6 +158,7 @@ def linkcode_resolve(domain, info):
154158
f"geocompy/tree/main/src/{filename:s}.py"
155159
)
156160

161+
157162
latex_documents = [
158163
(
159164
"latexindex", "geocompy.tex",

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Content
3838
api/communication
3939
api/tps1200p/index
4040
api/vivatps/index
41+
api/dna/index
4142

4243
Indices
4344

docs/latexindex.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ API documentation
2323
api/communication
2424
api/tps1200p/index
2525
api/vivatps/index
26+
api/dna/index

docs/overview.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Features
1919
- GeoCom
2020
- TPS1200P
2121
- VivaTPS
22+
- GSI Online
23+
- DNA
2224

2325
Requirements
2426
------------

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ version-file = "src/geocompy/_version.py"
4242
[tool.pytest.ini_options]
4343
addopts = ["-ra"]
4444
testpaths = ["tests", "src", "examples"]
45+
required_plugins = "pytest-mock"

0 commit comments

Comments
 (0)