Skip to content

Commit

Permalink
feat(build): switch build to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
ljgray committed Aug 1, 2024
1 parent b6f953d commit cac3ccd
Show file tree
Hide file tree
Showing 15 changed files with 137 additions and 2,665 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

44 changes: 26 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,24 @@ on:
jobs:

lint-code:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v1
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y libopenmpi-dev openmpi-bin libhdf5-serial-dev
- name: Install black and pydocstyle
run: pip install black pydocstyle
- name: Install lint requirements
run: |
pip install -e .
pip install -e .[lint]
- name: Check code with black
run: black --check .
Expand All @@ -34,26 +40,27 @@ jobs:

strategy:
matrix:
python-version: [3.9, 3.11]
python-version: ["3.9", "3.12"]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y libhdf5-serial-dev libopenmpi-dev openmpi-bin
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install pip dependencies
run: |
pip install pytest
pip install --use-deprecated=legacy-resolver -e . --no-binary bitshuffle
pip install -e .
pip install -e .[test]
- name: Run tests
env:
OMP_NUM_THREADS: 1
Expand All @@ -69,12 +76,12 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v1
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Install apt dependencies
run: |
Expand All @@ -83,7 +90,8 @@ jobs:
- name: Install pip dependencies
run: |
pip install -r doc/requirements.txt
pip install --use-deprecated=legacy-resolver -e . --no-binary bitshuffle
pip install -e .
pip install -e .[docs]
- name: Build sphinx docs
run: sphinx-build -W -b html doc/ doc/_build/html
13 changes: 6 additions & 7 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,20 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Python 3.11
uses: actions/setup-python@v1
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y libhdf5-serial-dev libopenmpi-dev openmpi-bin
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install pip requirements
run: |
pip install -r requirements.txt
pip install -r doc/requirements.txt
pip install .
pip install -e .
pip install -e .[docs]
- name: Sphinx build
run: |
git checkout -b gh-pages
Expand Down
84 changes: 0 additions & 84 deletions CHANGELOG.md

This file was deleted.

2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

10 changes: 3 additions & 7 deletions README.rst → README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
=============================
Drift Scan Telescope Analysis
=============================
# Drift Scan Telescope Analysis

This is a Python project for simulating and analysing the transit radio
telescopes, with a particular focus on 21cm Cosmology.

Installation
============
## Installation

The primary dependency of this project is the `cora` package. This can be
fetched from `here <http://github.com/radiocosmology/cora>`_. In addition to its
Expand All @@ -26,6 +23,5 @@ It should also be installable directly with `pip` using the command::
$ pip install [-e] git+ssh://git@github.com/radiocosmology/driftscan


Documentation
=============
## Documentation
The full documentation of `driftscan` is at https://radiocosmology.github.io/driftscan/.
2 changes: 0 additions & 2 deletions TODO

This file was deleted.

2 changes: 0 additions & 2 deletions doc/requirements.txt

This file was deleted.

14 changes: 9 additions & 5 deletions drift/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
Modelling for transit radio telescopes.
"""Modelling for transit radio telescopes.
The existing code is mostly focussed on interferometers but can also be used
for multi-beam transit telescopes.
Expand All @@ -17,7 +16,12 @@
util
"""

from ._version import get_versions
from importlib.metadata import PackageNotFoundError, version

try:
__version__ = version("cora")
except PackageNotFoundError:
# package is not installed
pass

__version__ = get_versions()["version"]
del get_versions
del version, PackageNotFoundError
Loading

0 comments on commit cac3ccd

Please sign in to comment.