Skip to content

Commit c0bed53

Browse files
authored
Merge pull request #189 from zonca/hatchling
switch from setuptools to hatch and switch Github Actions to conda
2 parents b79e0b5 + 8dc8ea6 commit c0bed53

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+554
-1626
lines changed

.git_archival.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node: $Format:%H$
2+
node-date: $Format:%cI$
3+
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git_archival.txt export-subst

.github/workflows/ci_tests.yml

+22-56
Original file line numberDiff line numberDiff line change
@@ -22,72 +22,38 @@ jobs:
2222
strategy:
2323
matrix:
2424
include:
25-
- name: Code style checks
26-
os: ubuntu-22.04
27-
python: 3.x
28-
toxenv: codestyle
2925

30-
- name: Python 3.9 with minimal dependencies
26+
- name: Python 3.9
3127
os: ubuntu-22.04
3228
python: 3.9
33-
toxenv: py39-test
3429

35-
- name: Python 3.11 with all optional dependencies and coverage checking
30+
- name: Python 3.12
3631
os: ubuntu-22.04
37-
python: 3.11
38-
toxenv: py311-test-alldeps-cov
39-
40-
# - name: OS X - Python 3.8
41-
# os: macos-10.15
42-
# python: 3.8
43-
# toxenv: py38-test
44-
45-
# - name: Python 3.7 with oldest supported version of all dependencies
46-
# os: ubuntu-16.04
47-
# python: 3.7
48-
# toxenv: py37-test-oldestdeps
49-
50-
# - name: Python 3.8 with latest dev versions of key dependencies
51-
# os: ubuntu-latest
52-
# python: 3.8
53-
# toxenv: py38-test-devdeps
54-
55-
# - name: Test building of Sphinx docs
56-
# os: ubuntu-latest
57-
# python: 3.x
58-
# toxenv: build_docs
32+
python: 3.12
5933

6034
steps:
6135
- name: Checkout code
6236
uses: actions/checkout@v4
6337
with:
6438
fetch-depth: 0
65-
- name: Install required system packages
66-
run: |
67-
if [ "$RUNNER_OS" == "Linux" ]; then
68-
sudo sed -i -e 's/azure.archive.ubuntu.com/us.archive.ubuntu.com/g' /etc/apt/sources.list
69-
sudo apt-get update
70-
sudo apt-get install -o Acquire::Retries=3 graphviz texlive-latex-extra dvipng libopenmpi-dev openmpi-bin pandoc libhdf5-dev netcdf-bin libnetcdf-dev
71-
fi
72-
shell: bash
73-
- name: Set up python ${{ matrix.python }} on ${{ matrix.os }}
74-
uses: actions/setup-python@v5
39+
- uses: mamba-org/setup-micromamba@v1
7540
with:
76-
python-version: ${{ matrix.python }}
77-
- name: Install base dependencies
78-
run: |
79-
python -m pip install --upgrade pip
80-
python -m pip install tox psutil codecov
81-
- name: Test with tox
41+
environment-name: test-env
42+
create-args: >-
43+
python=${{ matrix.python }}
44+
netcdf4
45+
init-shell: >-
46+
bash
47+
cache-environment: true
48+
post-cleanup: 'all'
49+
- name: Install package
50+
run: pip install .[test]
51+
shell: bash -el {0}
52+
- name: Run Pytest
8253
run: |
83-
tox -e ${{ matrix.toxenv }}
84-
- name: MPI test
85-
if: contains(matrix.toxenv, 'alldeps')
86-
run: |
87-
mpirun -np 2 --oversubscribe .tox/${{ matrix.toxenv}}/bin/python -m pytest pysm3/tests/test_read_map_mpi.py;
88-
# This is an example of how to upload coverage to codecov
89-
# - name: Upload coverage to codecov
90-
# if: "contains(matrix.toxenv, '-cov')"
91-
# uses: codecov/codecov-action@v1
92-
# with:
93-
# file: ./coverage.xml
54+
pytest -v
55+
shell: bash -el {0}
56+
57+
# - name: MPI test
58+
# run: |
59+
# mpirun -np 2 --oversubscribe .tox/${{ matrix.toxenv}}/bin/python -m pytest pysm3/tests/test_read_map_mpi.py;

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,5 @@ pip-wheel-metadata/
6666
*.log
6767
*.out
6868
obsolete
69+
src/pysm3/_version.py
70+
pysm.code-workspace

.pre-commit-config.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: "v4.6.0"
4+
hooks:
5+
- id: check-added-large-files
6+
- id: check-case-conflict
7+
- id: check-merge-conflict
8+
- id: check-symlinks
9+
- id: check-yaml
10+
- id: debug-statements
11+
- id: end-of-file-fixer
12+
- id: mixed-line-ending
13+
- id: name-tests-test
14+
args: ["--pytest-test-first"]
15+
- id: requirements-txt-fixer
16+
- id: trailing-whitespace
17+
- repo: https://github.com/astral-sh/ruff-pre-commit
18+
rev: "v0.6.1"
19+
hooks:
20+
- id: ruff
21+
args: ["--fix", "--show-fixes"]

CHANGES.rst

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
3.4.1 (unreleased)
22
==================
33
- Updated `pixell` from 0.17.3 to 0.26.0 https://github.com/galsci/pysm/pull/183
4+
- Initial implementation of a point source catalog component emission https://github.com/galsci/pysm/pull/187
5+
- Switch the build system to Hatch https://github.com/galsci/pysm/pull/189
46

57
3.4.0 (2023-12-11)
68
==================

LICENSE.rst renamed to LICENSE

File renamed without changes.

0 commit comments

Comments
 (0)