diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 48e499c..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: 2.1 - -orbs: - python: circleci/python@2.0.3 - -workflows: - pytest-all: - jobs: - - build-and-test - -jobs: - build-and-test: - resource_class: medium+ - docker: - - image: jupyter/scipy-notebook:python-3.10 - steps: - - checkout - - run: - name: Install tox - command: pip install tox==3.25.1 - - run: - name: Run Tests - command: tox \ No newline at end of file diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml new file mode 100644 index 0000000..36db52c --- /dev/null +++ b/.github/workflows/ci_tests.yml @@ -0,0 +1,64 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: ci_tests + +on: + push: + branches: + - main + tags: + - '*' + pull_request: + +jobs: + tests: + name: ${{ matrix.prefix }} ${{ matrix.os }}, ${{ matrix.tox_env }} + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.allow_failure }} + strategy: + matrix: + include: + - os: ubuntu-latest + python: '3.10' + tox_env: 'py310-test-alldeps' + allow_failure: false + prefix: '' + + - os: ubuntu-latest + python: '3.10' + tox_env: 'py310-test-astropy50' + allow_failure: false + prefix: '' + + - os: ubuntu-latest + python: '3.10' + tox_env: 'py310-test-numpy122' + allow_failure: false + prefix: '' + + - os: ubuntu-latest + python: '3.10' + tox_env: 'build_docs' + allow_failure: false + prefix: '' + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python }} + - name: Install Pandoc for build_docs + if: matrix.tox_env == 'build_docs' + run: sudo apt-get install -y pandoc + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install tox + - name: Test with Tox + run: | + export PY_COLORS=1 + tox -e ${{ matrix.tox_env }} + env: + PY_COLORS: '1' diff --git a/README.rst b/README.rst index 7f4f976..ef75b06 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,7 @@ PetroFit -------- -|circleci tag| |rtd tag| |PyPI tag| |AJ tag| |astropy tag| |photutils tag| +|rtd tag| |PyPI tag| |AJ tag| |astropy tag| |photutils tag| PetroFit is a package for calculating Petrosian properties, such as radii and concentration indices, as well as fitting galaxy light profiles. In particular, PetroFit includes tools for performing accurate photometry, segmentations, diff --git a/requirements.txt b/requirements.txt index ba1de2b..417f34e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,13 +9,14 @@ notebook regions # Dependencies -photutils>=1.1.0 +photutils==1.5.0 ipywidgets # Docs sphinx docutils nbsphinx +nbconvert # Other tox diff --git a/tox.ini b/tox.ini index 8cc8abf..7d5744f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,19 +1,22 @@ [tox] envlist = - py{python3.10}-test{-alldeps} - py{python3.10}-test-numpy{122} - py{python3.10}-test-astropy{503} + py{310}-test{-alldeps} + py{310}-test-numpy{122} + py{310}-test-astropy{50} build_docs linkcheck -# codestyle # Disabled until cleanup + requires = setuptools >= 61.0.0 pip >= 22.0.0 + isolated_build = true + indexserver = NIGHTLY = https://pypi.anaconda.org/scipy-wheels-nightly/simple [testenv] + # Suppress display of matplotlib plots generated during docs build setenv = MPLBACKEND=agg @@ -35,9 +38,6 @@ changedir = .tmp/{envname} description = run tests alldeps: with all optional dependencies - devdeps: with the latest developer version of key dependencies - oldestdeps: with the oldest supported version of key dependencies - cov: and test coverage numpy122: with numpy 1.22.* astropy50: with astropy 5.0.* astropylts: with the latest astropy LTS @@ -45,14 +45,8 @@ description = # The following provides some specific pinnings for key packages deps = -r{toxinidir}/requirements.txt - cov: coverage numpy122: numpy==1.22.* - astropy50: astropy==5.0.* - astropylts: astropy==5.0.* - - devdeps: :NIGHTLY:numpy - devdeps: git+https://github.com/astropy/astropy.git#egg=astropy # The following indicates which extras_require from setup.cfg will be installed extras = @@ -61,9 +55,7 @@ extras = commands = pip freeze - !cov: pytest --pyargs petrofit {toxinidir}/docs {posargs} - cov: pytest --pyargs petrofit {toxinidir}/docs --cov petrofit --cov-config={toxinidir}/setup.cfg {posargs} - cov: coverage xml -o {toxinidir}/coverage.xml + pytest --pyargs petrofit {toxinidir}/docs [testenv:build_docs] changedir = docs @@ -80,10 +72,3 @@ extras = docs commands = pip freeze sphinx-build -W -b linkcheck . _build/html - -[testenv:codestyle] -skip_install = true -changedir = . -description = check code style, e.g. with flake8 -deps = flake8 -commands = flake8 petrofit --count --max-line-length=100