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

Add Dependencies for Servers in pyproject.toml #1568

Merged
merged 8 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: build

on:
release:
types: [ released ]
pull_request:
workflow_dispatch:

defaults:
run:
shell: micromamba-shell {0}

jobs:
build:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1
with:
upload_to_pypi: false
freeze:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.11"
fail-fast: false
name: freeze versions (Python ${{ matrix.python-version }})
steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
environment-name: jwql-${{ runner.os }}-py${{ matrix.python-version }}
environment-file: environment.yml
create-args: >-
python=${{ matrix.python-version }}
init-shell: none
generate-run-shell: true
- run: pip install .
- run: pip list
- id: version
uses: mtkennerly/dunamai-action@v1
- run: mkdir envs
- run: pip freeze > envs/jwql_pip_py${{ matrix.python-version }}_${{ steps.version.outputs.version }}.txt
- run: micromamba env export > envs/jwql_conda_py${{ matrix.python-version }}_${{ steps.version.outputs.version }}.yml
- uses: actions/upload-artifact@v4
with:
name: envs
path: envs/*
- if: (github.event_name == 'release' && github.event.action == 'published')
uses: svenstaro/upload-release-action@v2
with:
file: envs/*
file_glob: true


37 changes: 20 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash -l {0}

jobs:
check:
runs-on: ubuntu-latest
Expand All @@ -25,30 +21,37 @@ jobs:
name: test (Python ${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 5
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.10"]

os: [ "ubuntu-latest", "macos-latest" ]
python-version: [ "3.11" ]
fail-fast: false
env:
PYTHONUNBUFFERED: 1
defaults:
run:
shell: micromamba-shell {0}
steps:
- uses: actions/checkout@v4

- uses: mamba-org/setup-micromamba@v1
with:
environment-file: ./environment_python_${{ matrix.python-version }}.yml
cache-environment: true
cache-downloads: true
init-shell: bash

environment-name: jwql-${{ runner.os }}-py${{ matrix.python-version }}
environment-file: environment.yml
create-args: >-
python=${{ matrix.python-version }}
init-shell: none
generate-run-shell: true

- run: pip install -e .[test]

- run: pip list

- run: micromamba env export

- uses: supercharge/redis-github-action@1.4.0
- if: runner.os == 'Linux'
uses: supercharge/redis-github-action@1.4.0
with:
redis-version: 5.0
if: runner.os == 'Linux'

- run: python -c "import jwql; print('Version ' + jwql.__version__); print('Path ' + jwql.__path__[0])"

Expand Down
3 changes: 3 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dependencies:
- firefox
- python
74 changes: 0 additions & 74 deletions environment_python_3.10.yml

This file was deleted.

48 changes: 25 additions & 23 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,31 @@ classifiers = [
"Programming Language :: Python",
]
dependencies = [
"asdf",
"astropy",
"astroquery",
"bokeh>=3",
"crds",
"cryptography",
"django",
"inflection",
"jinja2",
"jsonschema",
"jwst",
"jwst_reffiles",
"matplotlib",
"numpy",
"numpydoc",
"pandas",
"psycopg2-binary",
"pysiaf",
"pyvo",
"scipy",
"sqlalchemy",
"stdatamodels",
"wtforms",
"asdf>=3.1.0,<4",
"astropy>=6.0,<7",
"astroquery>=0.4.7,<0.5.0",
"beautifulsoup4>=4.12.3,<5",
"bokeh>=3.4.0,<4",
"celery>=5.3.6,<6",
"crds>=11.17.19,<12",
"django>=5.0.3,<6",
"gunicorn",
zacharyburnett marked this conversation as resolved.
Show resolved Hide resolved
"inflection>=0.5.1,<0.6",
"jsonschema>=4.21.1,<5",
"jwst>=1.13.4,<2",
"jwst_backgrounds>=1.2.0,<1.3.0",
"jwst_reffiles@git+https://github.com/spacetelescope/jwst_reffiles",
"matplotlib>=3.8.3,<4",
"numpy>=1.26.4,<2",
"pandas>=2.2.1,<3",
"psycopg2-binary>=2.9.9,<3",
"pysiaf>=0.22.0",
"pyvo>=1.5.1,<2",
"redis>=5.0.3,<6",
"scipy>=1.12.0,<2",
"selenium>=4.18.1,<5",
"sqlalchemy>=2.0.29,<3",
"wtforms>=3.1.2,<4",
]
dynamic = [
"version",
Expand Down