pytheas_simulator 1.0.0__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.
- pytheas_simulator-1.0.0/.gitignore +256 -0
- pytheas_simulator-1.0.0/LICENSE +21 -0
- pytheas_simulator-1.0.0/PKG-INFO +57 -0
- pytheas_simulator-1.0.0/README.md +24 -0
- pytheas_simulator-1.0.0/pyproject.toml +208 -0
- pytheas_simulator-1.0.0/src/pytheas_simulator/__init__.py +0 -0
- pytheas_simulator-1.0.0/src/pytheas_simulator/boat.py +309 -0
- pytheas_simulator-1.0.0/src/pytheas_simulator/map.py +467 -0
- pytheas_simulator-1.0.0/src/pytheas_simulator/search.py +295 -0
- pytheas_simulator-1.0.0/src/pytheas_simulator/travel.py +250 -0
- pytheas_simulator-1.0.0/src/pytheas_simulator/utilities.py +239 -0
- pytheas_simulator-1.0.0/tests/__init__.py +0 -0
- pytheas_simulator-1.0.0/tests/context.py +7 -0
- pytheas_simulator-1.0.0/tests/test_boat.py +135 -0
- pytheas_simulator-1.0.0/tests/test_map.py +45 -0
- pytheas_simulator-1.0.0/tests/test_travel.py +1 -0
- pytheas_simulator-1.0.0/tests/test_utilities.py +115 -0
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
### caches and related
|
|
2
|
+
.pytest_cache/
|
|
3
|
+
*__pycache__/
|
|
4
|
+
.ipynb_checkpoints/
|
|
5
|
+
|
|
6
|
+
./configs
|
|
7
|
+
|
|
8
|
+
testing_notebook.ipynb
|
|
9
|
+
|
|
10
|
+
docs/build/
|
|
11
|
+
|
|
12
|
+
### Linux template
|
|
13
|
+
*~
|
|
14
|
+
|
|
15
|
+
# temporary files which can be created if a process still has a handle open of a deleted file
|
|
16
|
+
.fuse_hidden*
|
|
17
|
+
|
|
18
|
+
# KDE directory preferences
|
|
19
|
+
.directory
|
|
20
|
+
|
|
21
|
+
# Linux trash folder which might appear on any partition or disk
|
|
22
|
+
.Trash-*
|
|
23
|
+
|
|
24
|
+
# .nfs files are created when an open file is removed but is still being accessed
|
|
25
|
+
.nfs*
|
|
26
|
+
|
|
27
|
+
### Windows template
|
|
28
|
+
# Windows thumbnail cache files
|
|
29
|
+
Thumbs.db
|
|
30
|
+
Thumbs.db:encryptable
|
|
31
|
+
ehthumbs.db
|
|
32
|
+
ehthumbs_vista.db
|
|
33
|
+
|
|
34
|
+
# Dump file
|
|
35
|
+
*.stackdump
|
|
36
|
+
|
|
37
|
+
# Folder config file
|
|
38
|
+
[Dd]esktop.ini
|
|
39
|
+
|
|
40
|
+
# Recycle Bin used on file shares
|
|
41
|
+
$RECYCLE.BIN/
|
|
42
|
+
|
|
43
|
+
# Windows Installer files
|
|
44
|
+
*.cab
|
|
45
|
+
*.msi
|
|
46
|
+
*.msix
|
|
47
|
+
*.msm
|
|
48
|
+
*.msp
|
|
49
|
+
|
|
50
|
+
# Windows shortcuts
|
|
51
|
+
*.lnk
|
|
52
|
+
|
|
53
|
+
### JupyterNotebooks template
|
|
54
|
+
# gitignore template for Jupyter Notebooks
|
|
55
|
+
# website: http://jupyter.org/
|
|
56
|
+
|
|
57
|
+
.ipynb_checkpoints
|
|
58
|
+
*/.ipynb_checkpoints/*
|
|
59
|
+
|
|
60
|
+
# IPython
|
|
61
|
+
profile_default/
|
|
62
|
+
ipython_config.py
|
|
63
|
+
|
|
64
|
+
# Remove previous ipynb_checkpoints
|
|
65
|
+
# git rm -r .ipynb_checkpoints/
|
|
66
|
+
|
|
67
|
+
### macOS template
|
|
68
|
+
# General
|
|
69
|
+
.DS_Store
|
|
70
|
+
.AppleDouble
|
|
71
|
+
.LSOverride
|
|
72
|
+
|
|
73
|
+
# Icon must end with two \r
|
|
74
|
+
Icon
|
|
75
|
+
|
|
76
|
+
# Thumbnails
|
|
77
|
+
._*
|
|
78
|
+
|
|
79
|
+
# Files that might appear in the root of a volume
|
|
80
|
+
.DocumentRevisions-V100
|
|
81
|
+
.fseventsd
|
|
82
|
+
.Spotlight-V100
|
|
83
|
+
.TemporaryItems
|
|
84
|
+
.Trashes
|
|
85
|
+
.VolumeIcon.icns
|
|
86
|
+
.com.apple.timemachine.donotpresent
|
|
87
|
+
|
|
88
|
+
# Directories potentially created on remote AFP share
|
|
89
|
+
.AppleDB
|
|
90
|
+
.AppleDesktop
|
|
91
|
+
Network Trash Folder
|
|
92
|
+
Temporary Items
|
|
93
|
+
.apdisk
|
|
94
|
+
|
|
95
|
+
### Python template
|
|
96
|
+
# Byte-compiled / optimized / DLL files
|
|
97
|
+
__pycache__/
|
|
98
|
+
*.py[cod]
|
|
99
|
+
*$py.class
|
|
100
|
+
|
|
101
|
+
# C extensions
|
|
102
|
+
*.so
|
|
103
|
+
|
|
104
|
+
# Distribution / packaging
|
|
105
|
+
.Python
|
|
106
|
+
build/
|
|
107
|
+
develop-eggs/
|
|
108
|
+
dist/
|
|
109
|
+
downloads/
|
|
110
|
+
eggs/
|
|
111
|
+
.eggs/
|
|
112
|
+
lib/
|
|
113
|
+
lib64/
|
|
114
|
+
parts/
|
|
115
|
+
sdist/
|
|
116
|
+
var/
|
|
117
|
+
wheels/
|
|
118
|
+
share/python-wheels/
|
|
119
|
+
*.egg-info/
|
|
120
|
+
.installed.cfg
|
|
121
|
+
*.egg
|
|
122
|
+
MANIFEST
|
|
123
|
+
|
|
124
|
+
# PyInstaller
|
|
125
|
+
# Usually these files are written by a python script from a template
|
|
126
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
127
|
+
*.manifest
|
|
128
|
+
*.spec
|
|
129
|
+
|
|
130
|
+
# Installer logs
|
|
131
|
+
pip-log.txt
|
|
132
|
+
pip-delete-this-directory.txt
|
|
133
|
+
|
|
134
|
+
# Unit test / coverage reports
|
|
135
|
+
htmlcov/
|
|
136
|
+
.tox/
|
|
137
|
+
.nox/
|
|
138
|
+
.coverage
|
|
139
|
+
.coverage.*
|
|
140
|
+
.cache
|
|
141
|
+
nosetests.xml
|
|
142
|
+
coverage.xml
|
|
143
|
+
*.cover
|
|
144
|
+
*.py,cover
|
|
145
|
+
.hypothesis/
|
|
146
|
+
.pytest_cache/
|
|
147
|
+
cover/
|
|
148
|
+
|
|
149
|
+
# Translations
|
|
150
|
+
*.mo
|
|
151
|
+
*.pot
|
|
152
|
+
|
|
153
|
+
# Django stuff:
|
|
154
|
+
*.log
|
|
155
|
+
local_settings.py
|
|
156
|
+
db.sqlite3
|
|
157
|
+
db.sqlite3-journal
|
|
158
|
+
|
|
159
|
+
# Flask stuff:
|
|
160
|
+
instance/
|
|
161
|
+
.webassets-cache
|
|
162
|
+
|
|
163
|
+
# Scrapy stuff:
|
|
164
|
+
.scrapy
|
|
165
|
+
|
|
166
|
+
# Sphinx documentation
|
|
167
|
+
docs/_build/
|
|
168
|
+
docs/api
|
|
169
|
+
|
|
170
|
+
# PyBuilder
|
|
171
|
+
.pybuilder/
|
|
172
|
+
target/
|
|
173
|
+
|
|
174
|
+
# Jupyter Notebook
|
|
175
|
+
|
|
176
|
+
# IPython
|
|
177
|
+
|
|
178
|
+
# pyenv
|
|
179
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
180
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
181
|
+
# .python-version
|
|
182
|
+
|
|
183
|
+
# pipenv
|
|
184
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
185
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
186
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
187
|
+
# install all needed dependencies.
|
|
188
|
+
#Pipfile.lock
|
|
189
|
+
|
|
190
|
+
# poetry
|
|
191
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
192
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
193
|
+
# commonly ignored for libraries.
|
|
194
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
195
|
+
#poetry.lock
|
|
196
|
+
|
|
197
|
+
# pdm
|
|
198
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
199
|
+
#pdm.lock
|
|
200
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
201
|
+
# in version control.
|
|
202
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
203
|
+
.pdm.toml
|
|
204
|
+
|
|
205
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
206
|
+
__pypackages__/
|
|
207
|
+
|
|
208
|
+
# Celery stuff
|
|
209
|
+
celerybeat-schedule
|
|
210
|
+
celerybeat.pid
|
|
211
|
+
|
|
212
|
+
# SageMath parsed files
|
|
213
|
+
*.sage.py
|
|
214
|
+
|
|
215
|
+
# Environments
|
|
216
|
+
.env
|
|
217
|
+
.venv
|
|
218
|
+
env/
|
|
219
|
+
venv/
|
|
220
|
+
ENV/
|
|
221
|
+
env.bak/
|
|
222
|
+
venv.bak/
|
|
223
|
+
|
|
224
|
+
# Spyder project settings
|
|
225
|
+
.spyderproject
|
|
226
|
+
.spyproject
|
|
227
|
+
|
|
228
|
+
# Rope project settings
|
|
229
|
+
.ropeproject
|
|
230
|
+
|
|
231
|
+
# mkdocs documentation
|
|
232
|
+
/site
|
|
233
|
+
|
|
234
|
+
# mypy
|
|
235
|
+
.mypy_cache/
|
|
236
|
+
.dmypy.json
|
|
237
|
+
dmypy.json
|
|
238
|
+
|
|
239
|
+
# Pyre type checker
|
|
240
|
+
.pyre/
|
|
241
|
+
|
|
242
|
+
# pytype static type analyzer
|
|
243
|
+
.pytype/
|
|
244
|
+
|
|
245
|
+
# Cython debug symbols
|
|
246
|
+
cython_debug/
|
|
247
|
+
|
|
248
|
+
# PyCharm
|
|
249
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
250
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
251
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
252
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
253
|
+
#.idea/
|
|
254
|
+
|
|
255
|
+
# Hatch-VCS
|
|
256
|
+
_version.py
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Matteo Tomasini
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: pytheas_simulator
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A pytheas package to simulate ancient seafaring.
|
|
5
|
+
Project-URL: Homepage, https://github.com/mtomasini/PytheasSimulator
|
|
6
|
+
Project-URL: Source Code, https://github.com/mtomasini/PytheasSimulator
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/mtomasini/PytheasSimulator/issues
|
|
8
|
+
Project-URL: Documentation, https://github.com/mtomasini/PytheasSimulator/blob/main/README.md
|
|
9
|
+
Project-URL: Download, https://pypi.org/project/PytheasSimulator/#files
|
|
10
|
+
Author: Matteo Tomasini
|
|
11
|
+
License-Expression: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: agent-based modelling,ancient navigation,ancient seafaring,bronze age,computational archaeology,neolithic
|
|
14
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Requires-Python: >=3.9
|
|
20
|
+
Requires-Dist: bottleneck
|
|
21
|
+
Requires-Dist: cartopy
|
|
22
|
+
Requires-Dist: dask
|
|
23
|
+
Requires-Dist: ephem>=4.2.1
|
|
24
|
+
Requires-Dist: geopy>=2.3.0
|
|
25
|
+
Requires-Dist: netcdf4
|
|
26
|
+
Requires-Dist: numpy>=1.23.5
|
|
27
|
+
Requires-Dist: opencv-python
|
|
28
|
+
Requires-Dist: pandas>=1.5.3
|
|
29
|
+
Requires-Dist: pip
|
|
30
|
+
Requires-Dist: xarray==2023.1.0
|
|
31
|
+
Requires-Dist: xoak
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
# Pytheas - a flexible and agile simulator of ancient seafaring
|
|
35
|
+
|
|
36
|
+
Current research in the [Maritime Encounters project](https://www.gu.se/en/research/maritime-encounters), at the University of Gothenburg, has been led by using and developing the software [Voyager](https://github.com/mtomasini/voyager). While this software is very complete and thorough, it can be difficult to maintain and develop due to the many components that it uses. I decided to write a version of the code that is more flexible and less complex to use, based on my own experiences in simulating seafaring in ancient times. This software is an improvement on the work by Alvaro Montenegro (Ohio State University) and Victor Wåhlstrand Skärström (University of Gothenburg, now at Chalmers University of Technology). The code is written in Python.
|
|
37
|
+
|
|
38
|
+
At this stage, I only make available the code [and its documentation](https://mtomasini.github.io/pytheas-simulator/); at a latter stage, I will make available:
|
|
39
|
+
|
|
40
|
+
- [ ] A demonstration file with attached parameters
|
|
41
|
+
- [ ] A complete vignette containing a description of all functionalities
|
|
42
|
+
- [ ] A script to download data from Copernicus for usage within Pytheas
|
|
43
|
+
- [ ] (Optional) A snakemake file or similar that will help the user picking a few parameters and simulating with Pytheas without having to download data locally.
|
|
44
|
+
|
|
45
|
+
## Development philosophy
|
|
46
|
+
|
|
47
|
+
The code for Voyager was documented but had no tests. In the development of this new software, it is my intention to have even better documentation as well as unit testing. This follows from years of working in an academic context where tests are an afterthought and are seldom developed. But when using a software developed over years, by developers who have since quit the workplace, and that has required quick developments to respond to publication deadlines, the lack of testing in particular has proven deleterious, leading to bad mistakes at the production stage.
|
|
48
|
+
|
|
49
|
+
## Name of the software
|
|
50
|
+
|
|
51
|
+
I decided to name this new iteration of the Voyager software "Pytheas". As a software engineer, this is a (bad) pun on the fact that the software was developed in Python. But as an archaeologist, Pytheas was an ancient Greek navigator from Massalia (modern Marseille) who in around 330 BCE went on a sailing travel to the far North of Europe, reaching the British Isles and travelling further north to _Ultima Thule_ (which may be, according to Barry Cunliffe[^1], most probably Iceland, but possibly Norway or Shetland). Pytheas' travel has been source of inspiration and marvel for more than 2000 years.
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
This software is packaged with a MIT License.
|
|
56
|
+
|
|
57
|
+
[^1]: The Extraordinary Voyage of Pytheas the Greek, Barry Cunliffe (2001), Chapter 6.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Pytheas - a flexible and agile simulator of ancient seafaring
|
|
2
|
+
|
|
3
|
+
Current research in the [Maritime Encounters project](https://www.gu.se/en/research/maritime-encounters), at the University of Gothenburg, has been led by using and developing the software [Voyager](https://github.com/mtomasini/voyager). While this software is very complete and thorough, it can be difficult to maintain and develop due to the many components that it uses. I decided to write a version of the code that is more flexible and less complex to use, based on my own experiences in simulating seafaring in ancient times. This software is an improvement on the work by Alvaro Montenegro (Ohio State University) and Victor Wåhlstrand Skärström (University of Gothenburg, now at Chalmers University of Technology). The code is written in Python.
|
|
4
|
+
|
|
5
|
+
At this stage, I only make available the code [and its documentation](https://mtomasini.github.io/pytheas-simulator/); at a latter stage, I will make available:
|
|
6
|
+
|
|
7
|
+
- [ ] A demonstration file with attached parameters
|
|
8
|
+
- [ ] A complete vignette containing a description of all functionalities
|
|
9
|
+
- [ ] A script to download data from Copernicus for usage within Pytheas
|
|
10
|
+
- [ ] (Optional) A snakemake file or similar that will help the user picking a few parameters and simulating with Pytheas without having to download data locally.
|
|
11
|
+
|
|
12
|
+
## Development philosophy
|
|
13
|
+
|
|
14
|
+
The code for Voyager was documented but had no tests. In the development of this new software, it is my intention to have even better documentation as well as unit testing. This follows from years of working in an academic context where tests are an afterthought and are seldom developed. But when using a software developed over years, by developers who have since quit the workplace, and that has required quick developments to respond to publication deadlines, the lack of testing in particular has proven deleterious, leading to bad mistakes at the production stage.
|
|
15
|
+
|
|
16
|
+
## Name of the software
|
|
17
|
+
|
|
18
|
+
I decided to name this new iteration of the Voyager software "Pytheas". As a software engineer, this is a (bad) pun on the fact that the software was developed in Python. But as an archaeologist, Pytheas was an ancient Greek navigator from Massalia (modern Marseille) who in around 330 BCE went on a sailing travel to the far North of Europe, reaching the British Isles and travelling further north to _Ultima Thule_ (which may be, according to Barry Cunliffe[^1], most probably Iceland, but possibly Norway or Shetland). Pytheas' travel has been source of inspiration and marvel for more than 2000 years.
|
|
19
|
+
|
|
20
|
+
## License
|
|
21
|
+
|
|
22
|
+
This software is packaged with a MIT License.
|
|
23
|
+
|
|
24
|
+
[^1]: The Extraordinary Voyage of Pytheas the Greek, Barry Cunliffe (2001), Chapter 6.
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
################################################################################
|
|
2
|
+
# Build Configuration
|
|
3
|
+
################################################################################
|
|
4
|
+
|
|
5
|
+
[build-system]
|
|
6
|
+
build-backend = "hatchling.build"
|
|
7
|
+
requires = ["hatchling"]
|
|
8
|
+
|
|
9
|
+
################################################################################
|
|
10
|
+
# Project Configuration
|
|
11
|
+
################################################################################
|
|
12
|
+
|
|
13
|
+
[project]
|
|
14
|
+
name = "pytheas_simulator"
|
|
15
|
+
# You can chose to use dynamic versioning with hatch or static where you add it manually.
|
|
16
|
+
version = "1.0.0"
|
|
17
|
+
|
|
18
|
+
description = "A pytheas package to simulate ancient seafaring."
|
|
19
|
+
authors = [
|
|
20
|
+
{ name = "Matteo Tomasini" },
|
|
21
|
+
]
|
|
22
|
+
license = "MIT"
|
|
23
|
+
requires-python = ">= 3.9" # Adjust based on the minimum version of Python that you support
|
|
24
|
+
readme = {"file" = "README.md", "content-type" = "text/markdown"}
|
|
25
|
+
# Please consult https://pypi.org/classifiers/ for a full list.
|
|
26
|
+
classifiers = [
|
|
27
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
28
|
+
"Intended Audience :: Science/Research",
|
|
29
|
+
"License :: OSI Approved :: MIT License",
|
|
30
|
+
"Operating System :: OS Independent",
|
|
31
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
32
|
+
]
|
|
33
|
+
keywords = [
|
|
34
|
+
"ancient seafaring",
|
|
35
|
+
"ancient navigation",
|
|
36
|
+
"bronze age",
|
|
37
|
+
"neolithic",
|
|
38
|
+
"computational archaeology",
|
|
39
|
+
"agent-based modelling"
|
|
40
|
+
]
|
|
41
|
+
dependencies = [
|
|
42
|
+
"bottleneck",
|
|
43
|
+
"cartopy",
|
|
44
|
+
"dask",
|
|
45
|
+
"ephem>=4.2.1",
|
|
46
|
+
"geopy>=2.3.0",
|
|
47
|
+
"netCDF4",
|
|
48
|
+
"numpy>=1.23.5",
|
|
49
|
+
"opencv-python",
|
|
50
|
+
"pandas>=1.5.3",
|
|
51
|
+
"pip",
|
|
52
|
+
"xarray==2023.1.0",
|
|
53
|
+
"xoak"
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
[project.urls]
|
|
57
|
+
Homepage = "https://github.com/mtomasini/PytheasSimulator"
|
|
58
|
+
"Source Code" = "https://github.com/mtomasini/PytheasSimulator"
|
|
59
|
+
"Bug Tracker" = "https://github.com/mtomasini/PytheasSimulator/issues"
|
|
60
|
+
Documentation = "https://github.com/mtomasini/PytheasSimulator/blob/main/README.md"
|
|
61
|
+
# Note: update this url when you have published your package to pypi. (or delete it)
|
|
62
|
+
Download = "https://pypi.org/project/PytheasSimulator/#files"
|
|
63
|
+
|
|
64
|
+
[dependency-groups]
|
|
65
|
+
dev = [
|
|
66
|
+
"hatch",
|
|
67
|
+
"pre-commit",
|
|
68
|
+
"bottleneck",
|
|
69
|
+
"cartopy",
|
|
70
|
+
"dask",
|
|
71
|
+
"ephem>=4.2.1",
|
|
72
|
+
"geopy>=2.3.0",
|
|
73
|
+
"netCDF4",
|
|
74
|
+
"numpy>=1.23.5",
|
|
75
|
+
"opencv-python",
|
|
76
|
+
"pandas>=1.5.3",
|
|
77
|
+
"pip",
|
|
78
|
+
"xarray==2023.1.0",
|
|
79
|
+
"xoak"
|
|
80
|
+
]
|
|
81
|
+
|
|
82
|
+
docs = [
|
|
83
|
+
"sphinx~=8.0",
|
|
84
|
+
"myst-parser>=4.0",
|
|
85
|
+
"pydata-sphinx-theme>=0.16",
|
|
86
|
+
"sphinx-autobuild>=2024.10.3",
|
|
87
|
+
"sphinx-autoapi>=3.6.0",
|
|
88
|
+
"sphinx-copybutton>=0.5.2",
|
|
89
|
+
"sphinx-design>=0.6.1",
|
|
90
|
+
]
|
|
91
|
+
|
|
92
|
+
build = [
|
|
93
|
+
"pip-audit",
|
|
94
|
+
"twine",
|
|
95
|
+
]
|
|
96
|
+
tests = [
|
|
97
|
+
"pytest",
|
|
98
|
+
"pytest-cov",
|
|
99
|
+
]
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
################################################################################
|
|
103
|
+
# Tool Configuration
|
|
104
|
+
################################################################################
|
|
105
|
+
|
|
106
|
+
# Hatch is building your package's wheel and sdist
|
|
107
|
+
# This tells hatch to only include Python packages (i.e., folders with __init__.py) in the build.
|
|
108
|
+
# read more about package building, here:
|
|
109
|
+
# https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-distribution-files-sdist-wheel.html
|
|
110
|
+
[tool.hatch.build]
|
|
111
|
+
only-packages = true
|
|
112
|
+
|
|
113
|
+
# This tells Hatch to build the package from the src/ directory.
|
|
114
|
+
# Read more about src layouts here: https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-structure.html
|
|
115
|
+
[tool.hatch.build.targets.wheel]
|
|
116
|
+
packages = ["src/pytheastest"]
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
######## Configure pytest for your test suite ########
|
|
121
|
+
[tool.pytest.ini_options]
|
|
122
|
+
testpaths = ["tests"] # Tells pytest what directory tests are in
|
|
123
|
+
markers = ["raises"] # Tells pytest to not raise a warning if you use @pytest.mark.raises
|
|
124
|
+
|
|
125
|
+
[tool.coverage.paths]
|
|
126
|
+
source = [
|
|
127
|
+
"src/pytheas_simulator",
|
|
128
|
+
"*/site-packages/pytheas_simulator",
|
|
129
|
+
]
|
|
130
|
+
|
|
131
|
+
[tool.coverage.run]
|
|
132
|
+
# Ensures code coverage is measured for branches (conditional statements with different outcomes) in your code.
|
|
133
|
+
branch = true
|
|
134
|
+
parallel = true
|
|
135
|
+
|
|
136
|
+
[tool.coverage.report]
|
|
137
|
+
# This configures the output test coverage report
|
|
138
|
+
exclude_lines = ["pragma: no cover"]
|
|
139
|
+
precision = 2
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
# Use UV to create Hatch environments
|
|
143
|
+
[tool.hatch.envs.default]
|
|
144
|
+
installer = "uv"
|
|
145
|
+
|
|
146
|
+
################################################################################
|
|
147
|
+
# Hatch Environments
|
|
148
|
+
################################################################################
|
|
149
|
+
|
|
150
|
+
#--------------- Build and check your package ---------------#
|
|
151
|
+
|
|
152
|
+
# This table installs the tools you need to test and build your package
|
|
153
|
+
[tool.hatch.envs.build]
|
|
154
|
+
description = """Test the installation the package."""
|
|
155
|
+
dependency-groups = [
|
|
156
|
+
"build",
|
|
157
|
+
]
|
|
158
|
+
builder = true
|
|
159
|
+
|
|
160
|
+
# This table installs created the command hatch run install:check which will build and check your package.
|
|
161
|
+
[tool.hatch.envs.build.scripts]
|
|
162
|
+
check = [
|
|
163
|
+
"hatch build {args:--clean}",
|
|
164
|
+
"twine check dist/*",
|
|
165
|
+
]
|
|
166
|
+
|
|
167
|
+
#--------------- Run tests ---------------#
|
|
168
|
+
[tool.hatch.envs.test]
|
|
169
|
+
description = """Run the test suite."""
|
|
170
|
+
dependency-groups = [
|
|
171
|
+
"tests",
|
|
172
|
+
]
|
|
173
|
+
|
|
174
|
+
[[tool.hatch.envs.test.matrix]]
|
|
175
|
+
python = ["3.11", "3.12", "3.13"]
|
|
176
|
+
|
|
177
|
+
[tool.hatch.envs.test.scripts]
|
|
178
|
+
run = "pytest {args:--cov=pytheastest --cov-report=term-missing --cov-report=xml}"
|
|
179
|
+
|
|
180
|
+
#--------------- Build and preview your documentation ---------------#
|
|
181
|
+
|
|
182
|
+
# This sets up a hatch environment with associated dependencies that need to be installed
|
|
183
|
+
[tool.hatch.envs.docs]
|
|
184
|
+
description = """Build or serve the documentation."""
|
|
185
|
+
# Install optional dependency test for docs
|
|
186
|
+
dependency-groups = [
|
|
187
|
+
"docs",
|
|
188
|
+
]
|
|
189
|
+
|
|
190
|
+
# This table contains the scripts that you can use to build and serve your docs
|
|
191
|
+
# hatch run docs:build will build your documentation
|
|
192
|
+
# hatch run docs:serve will serve them 'live' on your computer locally
|
|
193
|
+
[tool.hatch.envs.docs.scripts]
|
|
194
|
+
build = ["sphinx-build {args:-W -b html docs docs/_build}"]
|
|
195
|
+
serve = ["sphinx-autobuild docs --watch src/pytheastest {args:-b html docs/_build/serve}"]
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
#--------------- Check security for your dependencies ---------------#
|
|
200
|
+
|
|
201
|
+
[tool.hatch.envs.audit]
|
|
202
|
+
description = """Check dependencies for security vulnerabilities."""
|
|
203
|
+
dependency-groups = [
|
|
204
|
+
"build",
|
|
205
|
+
]
|
|
206
|
+
|
|
207
|
+
[tool.hatch.envs.audit.scripts]
|
|
208
|
+
check = ["pip-audit"]
|
|
File without changes
|