Skip to content
Snippets Groups Projects
pyproject.toml 2.94 KiB
Newer Older
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"


[tool.poetry]
name = "geomag-algorithms"
authors = ["HazDev Team <gs-haz_dev_team_group@usgs.gov>"]
description = "USGS Geomag Algorithms Library"
homepage="https://code.usgs.gov/ghsc/geomag/geomag-algorithms"
include = [
  "LICENSE.md"
]
keywords = ["usgs", "geomag", "geomagnetism"]
license = "CC0-1.0"
packages = [
  {include = "geomagio" }
]
repository="https://code.usgs.gov/ghsc/geomag/geomag-algorithms"
version = "1.13.3"


[tool.poetry.dependencies]
python = ">3.9.1,<3.13"
numpy = "^1.25.0"
obspy = "^1.3.1"
openpyxl = "^3.0.10"
pycurl = {version = "^7.45.1", optional = true}
requests = "^2.28.1"
scipy = "^1.9.3"
typer = "^0.6.1"
# webservice
alembic = "^1.8.1"
Authlib = "^1.1.0"
cryptography = "^44.0.1"
databases = {extras = ["mysql", "sqlite"], version = "^0.6.1"}
# 2022-10-24 pin sqlalchemy to 1.4.41 for now
# 1.4.42 seems to cause issues with databases (https://stackoverflow.com/a/74102692)
SQLAlchemy = "1.4.41"
SQLAlchemy-Utc = "^0.14.0"
uvicorn = {extras = ["standard"], version = "^0.22.0"}
netcdf4 = "^1.7.2"
Shavers, Nicholas H's avatar
Shavers, Nicholas H committed
cdflib = "^1.3.2"


[tool.poetry.dev-dependencies]
black = "^24.3.0"
mypy = "^0.982"
poethepoet = "^0.16.4"
pytest-cov = "^4.0.0"
pytest-asyncio = "^0.24.0"
pytest-mock = "^3.14.0"
# type hints
data-science-types = "^0.2.23"
openpyxl-stubs = "^0.1.24"
sqlalchemy-stubs = "^0.4"
types-python-dateutil = "^2.8.19.2"
types-requests = "^2.28.11.2"
[tool.poetry.extras]
pycurl = ["pycurl"]


[tool.poetry.scripts]
generate-matrix = "geomagio.processing.affine_matrix:main"
geomag-efield = "geomagio.processing.efield:main"
geomag-metadata = "geomagio.metadata.main:main"
geomag-monitor = "geomagio.processing.monitor:main"
geomag-py = "geomagio.Controller:main"
magproc-prepfiles = "geomagio.processing.magproc:main"
make-cal = "geomagio.processing.make_cal:main"
geomag-filter = "geomagio.processing.filters:main"
copy-absolutes = "geomagio.processing.copy_absolutes:main"
copy-observatory = "geomagio.processing.copy_observatory:main"
make-iaga = "geomagio.processing.make_iaga:main"
copy-instrument = "geomagio.processing.copy_instrument:main"
flag-spikes = "geomagio.processing.flag_spikes:main"

[tool.poe.tasks]
# e.g. "poetry run poe lint"
  # Ignore 71199 as _eventloop.get_asynclib is not used directly or indirectly by FastAPI, HTTPX, or Watchfiles.
  { shell = "safety check --ignore 51668 --ignore 67599 --ignore 71199"}
lint = [
  { shell = "black --check ." },
  # TODO: fix isort warnings then enable this check
  #  { shell = "isort --check ." },
  # TODO: fix mypy warnings then enable this check
  #  { shell = "mypy ." }
]
test = [
  { shell = "pytest --cov=geomagio --junitxml junit.xml test" },
  { shell = "coverage html" },
  { shell = "coverage xml" }
]
webservice = [
  { shell = "uvicorn geomagio.api:app" }
]