Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infrastructure clean-up #605

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# flake8 does not support pyproject.toml (https://github.com/PyCQA/flake8/issues/234)

[flake8]
max-line-length = 100
exclude = __init__.py
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ updates:
actions:
patterns:
- "*"

92 changes: 41 additions & 51 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@
name: CI Tests

on:
schedule:
# run every Wednesday at 6am UTC
- cron: '0 6 * * 3'
push:
branches:
- main
tags:
- '*'
pull_request:
branches: # only build on PRs against 'main' if you need to further limit when CI is run.
- main

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -20,60 +28,42 @@ jobs:
# Github Actions supports ubuntu, windows, and macos virtual environments:
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
ci_tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Code style checks
os: ubuntu-latest
python: 3.x
toxenv: codestyle
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
submodules: false
coverage: ''
envs: |
- name: Code style checks
linux: codestyle

- name: Python 3.7 with minimal dependencies
os: ubuntu-latest
python: 3.7
toxenv: py37-test
- name: Link checks
linux: linkcheck

- name: OS X - Python 3.9 with minimal dependencies
os: macos-latest
python: 3.9
toxenv: py39-test
- name: OS X - Python 3.13 with minimal dependencies
macos: py313-test
runs-on: macos-latest

- name: Windows - Python 3.11 with all optional dependencies
os: windows-latest
python: '3.11'
toxenv: py11-test-alldeps
toxargs: -v
- name: Windows - Python 3.11 with all optional dependencies
windows: py311-test-alldeps
toxargs: -v

- name: Python 3.11 with remote data, all dependencies, and coverage
os: ubuntu-latest
python: '3.11'
toxenv: py11-test-alldeps-cov
toxargs: -v
posargs: --remote-data=any
- name: Python 3.12 with remote data, all dependencies, and coverage
linux: py312-test-alldeps-cov
toxargs: -v
posargs: --remote-data=any
coverage: codecov

- name: Python 3.11 with latest dev versions of key dependencies
os: ubuntu-latest
python: '3.11'
toxenv: py11-test-devdeps
- name: Python 3.11 with oldest version of key dependencies
linux: py311-test-oldestdeps

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set up python ${{ matrix.python }} on ${{ matrix.os }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{ matrix.python }}
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox codecov
- name: Install graphviz dependency
if: ${{ contains(matrix.toxenv, 'build_docs') }}
run: sudo apt-get -y install graphviz
- name: Test with tox
run: |
python -m tox -e ${{ matrix.toxenv }} ${{ matrix.toxargs }} -- ${{ matrix.posargs }}
allowed_failures:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
with:
submodules: false
coverage: ''
envs: |
- name: (Allowed Failure) Python 3.13 with latest dev versions of key dependencies
linux: py313-test-devdeps
posargs: --verbose
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Wheel building

on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches: # only build on PRs against 'main' if you need to further limit when CI is run.
- main

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_and_publish:
permissions:
contents: none
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.0
if: github.repository == 'astropy/astroplan'
with:
submodules: false
# We upload to PyPI for all tags starting with v but not ones ending in .dev
upload_to_pypi: ${{ startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '.dev') && (github.event_name == 'push') }}
test_extras: test
test_command: pytest -p no:warnings --astropy-header --pyargs astroplan
env: |
PY_IGNORE_IMPORTMISMATCH: 1
secrets:
pypi_token: ${{ secrets.PYPI_TOKEN }}
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
0.11 (unreleased)
-----------------

- Minimum Python version is now 3.11. Also bumped minversion
of dependencies. [#605]

0.10.1 (2024-08-13)
-------------------

Expand Down
12 changes: 0 additions & 12 deletions LONG_DESCRIPTION.rst

This file was deleted.

1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ include README.rst
include CHANGES.rst

include pyproject.toml
include setup.cfg

recursive-include docs *
recursive-include licenses *
Expand Down
22 changes: 15 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
astroplan
=========

Observation planning package for astronomers

* Code: https://github.com/astropy/astroplan
* Docs: https://astroplan.readthedocs.io/
* License: BSD-3

.. image:: https://readthedocs.org/projects/astroplan/badge/?version=latest
:target: https://astroplan.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
Expand All @@ -25,10 +19,24 @@ Observation planning package for astronomers
:target: https://pypi.python.org/pypi/astroplan/
:alt: Latest release

* Code: https://github.com/astropy/astroplan
* Docs: https://astroplan.readthedocs.io/
* License: BSD-3 Clause

**astroplan** is an open-source observation planning package for
astronomers that can help you plan for everything but the clouds.

It is an `Astropy <http://www.astropy.org>`__
`affiliated package <http://www.astropy.org/affiliated/index.html>`__ that
seeks to make your life as an observational astronomer a little less
infuriating.

Contributions welcome!

Attribution
+++++++++++

If you use astroplan in your work, please cite `Morris et al. 2018 <https://ui.adsabs.harvard.edu/abs/2018AJ....155..128M/abstract>`_:
If you use astroplan in your work, please cite `Morris et al. 2018 <https://ui.adsabs.harvard.edu/abs/2018AJ....155..128M/abstract>`_:

.. code :: bibtex

Expand Down
14 changes: 1 addition & 13 deletions astroplan/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
astroplan is an open source (BSD licensed) observation planning package for
astronomers that can help you plan for everything but the clouds.

It is an in-development `Astropy <http://www.astropy.org>`__
`affiliated package <http://www.astropy.org/affiliated/index.html>`__ that
seeks to make your life as an observational astronomer a little less
infuriating.

* Code: https://github.com/astropy/astroplan
* Docs: https://astroplan.readthedocs.io/
"""

try:
from .version import version as __version__
from ._version import version as __version__
except ImportError:
__version__ = ''

Expand Down
46 changes: 0 additions & 46 deletions astroplan/conftest.py

This file was deleted.

Loading
Loading