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
18 changes: 8 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
repos:
- repo: https://github.com/python-poetry/poetry
rev: '1.2.1' # add version here
hooks:
- id: poetry-check
- id: poetry-lock
- id: poetry-export
args: ["-f", "requirements.txt", "-o", "requirements.txt"]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
Expand All @@ -18,6 +10,7 @@ repos:
- id: check-toml
- id: check-yaml
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
- id: end-of-file-fixer
- id: requirements-txt-fixer
Expand All @@ -29,7 +22,7 @@ repos:
hooks:
- id: pyupgrade
args:
- --py38-plus
- --py311-plus

- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
Expand All @@ -38,7 +31,7 @@ repos:
name: absolufy-imports

- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.13.2
hooks:
- id: isort
args: ["--filter-files"]
Expand All @@ -51,3 +44,8 @@ repos:
language_version: python3
args:
- --target-version=py38

- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,47 @@ AstroVIPER (Visibility and Image Parallel Execution Reduction) is in development
<!-- [![Documentation Status](https://readthedocs.org/projects/astroviper/badge/?version=latest)](https://astroviper.readthedocs.io) -->
[![Version Status](https://img.shields.io/pypi/v/astroviper.svg)](https://pypi.python.org/pypi/astroviper/)

## Installation

### Linux

Create a virtual environment using any tool of your choice (`venv`, `uv`, `mamba`, `conda` etc.)
and run

```
pip install astroviper
```

### Mac

On macOS, `pip install python-casacore` does not work. Install it via
conda-forge first (this requires an active conda/mamba environment)

```bash
conda install -c conda-forge python-casacore
```
Then install astroviper:

```bash
pip install astroviper
```

### Developer Setup

```bash
git clone git@github.com:casangi/astroviper.git
cd astroviper
pip install '.[all]'
pre-commit install
```

On macOS, install python-casacore via conda-forge (as above) before running `pip install`.

The `pre-commit install` step sets up git hooks that automatically run code
formatting (black) and strip Jupyter notebook outputs (nbstripout) on every
commit. This keeps diffs clean and prevents large binary outputs from bloating
the repository.

If `pre-commit` detects and makes any changes, those files will need to be
re-staged before committing. This is to allow the developer to inspect the
modified file before committing.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ all = [
"sphinx_rtd_theme",
"twine",
"pandoc",
"pre-commit",
"nbstripout",
]

[build-system]
Expand Down
Loading