Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 23 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.12.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v5.0.0"
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/psf/black
rev: 22.6.0
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: name-tests-test
args: ["--pytest-test-first"]
- id: requirements-txt-fixer
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.12.1"
hooks:
- id: black-jupyter
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
- id: ruff-format
- id: ruff-check
args: ["--fix", "--show-fixes"]
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: flake8
args: [--max-line-length=88, "--extend-ignore=E203,E741"]
- id: codespell
54 changes: 37 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
[build-system]
requires = ["setuptools>=64", "setuptools_scm[toml]>=8"]
build-backend = "setuptools.build_meta"
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "pyvisgrid"
dynamic = ["version"]
description = " Grid and visualize observations of radio interferometers."
readme = "README.md"
authors = [{ name = "Kevin Schmitz, Tom Groß, Anno Knierim" }]
readme = "README.rst"
authors = [
{ name = "Kevin Schmitz", email = "kevin2.schmitz@tu-dortmund.de" },
{ name = "Tom Groß", email = "tom.gross@tu-dortmund.de" },
{ name = "Anno Knierim", email = "anno.knierim@tu-dortmund.de" },
]
maintainers = [
{ name = "Kevin Schmitz", email = "kevin2.schmitz@tu-dortmund.de" },
{ name = "Tom Groß", email = "tom.gross@tu-dortmund.de" },
Expand All @@ -32,30 +36,46 @@ dependencies = [
"astropy<=6.1.0",
"click",
"h5py",
"ipython",
"jupyter",
"matplotlib",
"numpy",
"pandas",
"matplotlib",
"scipy",
"toml",
"torch",
"tqdm",
"casatools",
"pyvisgen@git+https://github.com/radionets-project/pyvisgen#egg=main",
"pyvisgen@git+https://github.com/radionets-project/pyvisgen.git@main",
]

[project.optional-dependencies]

tests = ["h5py", "pytest >= 7.0", "pytest-cov", "tomli"]

dev = ["pre-commit"]
[dependency-groups]
tests = [
"h5py",
"pytest >= 7.0",
"pytest-cov",
"tomli",
]
dev = [
"pre-commit",
"ipython",
"jupyter",
{include-group = "tests"},
]

[project.urls]
repository = "https://github.com/radionets-project/pyvisgrid"

[tool.setuptools_scm]
write_to = "pyvisgrid/_version.py"
[tool.hatch.version]
source = "vcs"

[tool.hatch.build.hooks.vcs]
version-file = "pyvisgrid/_version.py"


[tool.hatch.build.targets.wheel]
packages = ["."]

[tool.setuptools.packages.find]
where = ["."]
# as long as we still directly install
# pyvisgen from git we need to set this
# to true
[tool.hatch.metadata]
allow-direct-references = true
8 changes: 4 additions & 4 deletions pyvisgrid/core/gridder.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def from_pyvisgen(
----------

obs : pyvisgen.simulation.Observation
The obeservation which is returned by the
The observation which is returned by the
``pyvisgen.simulation.vis_loop`` function.

vis_data : pyvisgen.simulation.Visibilities
Expand Down Expand Up @@ -519,7 +519,7 @@ def plot_ungridded_uv(self, **kwargs):
Default is ``None``, meaning the plot won't be saved.

save_args : dict, optional
The additional arugments passed to the ``fig.savefig`` call.
The additional arguments passed to the ``fig.savefig`` call.
Default is ``{"bbox_inches":"tight"}``.

fig : matplotlib.figure.Figure | None, optional
Expand Down Expand Up @@ -640,7 +640,7 @@ def plot_mask(self, stokes_component: str = "I", **kwargs):
Default is ``None``, meaning the plot won't be saved.

save_args : dict, optional
The additional arugments passed to the ``fig.savefig`` call.
The additional arguments passed to the ``fig.savefig`` call.
Default is ``{"bbox_inches":"tight"}``.

fig : matplotlib.figure.Figure | None, optional
Expand Down Expand Up @@ -752,7 +752,7 @@ def plot_dirty_image(self, stokes_component: str = "I", **kwargs):
Default is ``None``, meaning the plot won't be saved.

save_args : dict, optional
The additional arugments passed to the ``fig.savefig`` call.
The additional arguments passed to the ``fig.savefig`` call.
Default is ``{"bbox_inches":"tight"}``.

fig : matplotlib.figure.Figure | None, optional
Expand Down
2 changes: 1 addition & 1 deletion pyvisgrid/core/stokes.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def compute_single_stokes_component(
stokes_comp_2 : int
Index of second stokes visibility.
sign : str
Wether to add or substract ``stokes_comp_1`` and ``stokes_comp_2``.
Whether to add or subtract ``stokes_comp_1`` and ``stokes_comp_2``.
Valid values are ``'+'`` or ``'-'``.

Returns
Expand Down
6 changes: 3 additions & 3 deletions pyvisgrid/plotting/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def plot_ungridded_uv(
Default is ``None``, meaning the plot won't be saved.

save_args : dict, optional
The additional arugments passed to the ``fig.savefig`` call.
The additional arguments passed to the ``fig.savefig`` call.
Default is ``{"bbox_inches":"tight"}``.

fig : matplotlib.figure.Figure | None, optional
Expand Down Expand Up @@ -322,7 +322,7 @@ def plot_mask(
Default is ``None``, meaning the plot won't be saved.

save_args : dict, optional
The additional arugments passed to the ``fig.savefig`` call.
The additional arguments passed to the ``fig.savefig`` call.
Default is ``{"bbox_inches":"tight"}``.

fig : matplotlib.figure.Figure | None, optional
Expand Down Expand Up @@ -531,7 +531,7 @@ def plot_dirty_image(
Default is ``None``, meaning the plot won't be saved.

save_args : dict, optional
The additional arugments passed to the ``fig.savefig`` call.
The additional arguments passed to the ``fig.savefig`` call.
Default is ``{"bbox_inches":"tight"}``.

fig : matplotlib.figure.Figure | None, optional
Expand Down
Loading