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 9e6aaf7 commit f0e5334
Show file tree
Hide file tree
Showing 15 changed files with 157 additions and 2,685 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

35 changes: 17 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ 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 black
run: pip install black
- name: Install linting requirements
run: pip install -e .[lint]

- name: Check code with black
run: black --check .
Expand All @@ -30,26 +30,26 @@ 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 libgsl-dev
- 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 .
pip install -e .
pip install -e .[test]
- name: Run serial tests
run: pytest --doctest-modules tests/
Expand All @@ -58,12 +58,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 @@ -72,9 +72,8 @@ jobs:
- name: Install pip dependencies
run: |
pip install --use-deprecated=legacy-resolver -r requirements.txt
pip install --use-deprecated=legacy-resolver -r doc/requirements.txt
pip install --use-deprecated=legacy-resolver -e .
pip install -e .
pip install -e .[docs]
- name: Build sphinx docs
run: sphinx-build -W -b html doc/ doc/_build/html
14 changes: 6 additions & 8 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,21 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Python 3.9
uses: actions/setup-python@v1
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.9
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 libgsl-dev
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install pip requirements
run: |
pip install numpy # Needed for pygsl installation
pip install --use-deprecated=legacy-resolver -r requirements.txt
pip install -r doc/requirements.txt
pip install .[sphfunc]
pip install -e .
pip install -e .[docs]
- name: Sphinx build
run: |
git checkout -b gh-pages
Expand Down
7 changes: 4 additions & 3 deletions .readthedocs.yml → .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
python: "3.12"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand All @@ -17,6 +17,7 @@ sphinx:
# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: doc/requirements.txt
- method: pip
path: .
path: .
extra_requirements:
- docs
92 changes: 0 additions & 92 deletions CHANGELOG.md

This file was deleted.

2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

4 changes: 1 addition & 3 deletions README.rst → README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
==================================
cora - Cosmology in the Radio Band
==================================
# cora - Cosmology in the Radio Band

A package for simulating skies for 21cm Intensity Mapping, with a lot of bonus
utility code for dealing with Healpix maps, spherical co-ordinates etc.
Expand Down
14 changes: 9 additions & 5 deletions cora/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
Cosmology in the Radio Band
"""Cosmology in the Radio Band
Submodules
==========
Expand All @@ -14,7 +13,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 f0e5334

Please sign in to comment.