Skip to content

Commit

Permalink
Merge branch 'release/3.2.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
KathleenLabrie committed Apr 16, 2024
2 parents bee8e73 + bf3b6c4 commit d5cb575
Show file tree
Hide file tree
Showing 336 changed files with 30,207 additions and 2,374 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v2

- name: Cache conda packages and test files
uses: actions/cache@v2
uses: actions/cache@v4
env:
# Increase this value to reset cache
CACHE_NUMBER: 0
Expand All @@ -29,12 +29,11 @@ jobs:
~/dragons_tests
key: ${{ runner.os }}-${{ env.CACHE_NUMBER }}

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
channels: conda-forge
python-version: ${{ matrix.python-version }}
use-only-tar-bz2: true

- name: Conda info
shell: bash -l {0}
Expand All @@ -53,4 +52,4 @@ jobs:
- name: Run Tox
shell: bash -l {0}
run: |
tox -e py310-unit -v
tox -r -e py310-unit -v
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,6 @@ dmypy.json
**/.adcc
**/dragons_test_inputs
**/spec_data.json

# VSCode settings
.vscode/settings.json
Binary file not shown.
Binary file not shown.
44 changes: 41 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ def runtests_niri = 1
def runtests_gsaoi = 1
def runtests_gnirs = 1
def runtests_wavecal = 1
def runtests_ghost = 1

pipeline {

agent any

//triggers {
// // Polls Source Code Manager every four hours
// pollSCM('*/15 * * * *')
// //Polls Source Code Manager every 15 mins
// pollSCM('*/15 * * * *')
//}

options {
Expand Down Expand Up @@ -418,7 +419,7 @@ pipeline {
agent { label "master" }
environment {
MPLBACKEND = "agg"
DRAGONS_TEST_OUT = "regression_tests_outputs"
DRAGONS_TEST_OUT = "slow_tests_outputs"
TOX_ARGS = "astrodata geminidr gemini_instruments gempy recipe_system"
TMPDIR = "${env.WORKSPACE}/.tmp/slow/"
}
Expand Down Expand Up @@ -446,6 +447,43 @@ pipeline {
}
} // end post
} // end stage

stage('GHOST Tests') {
when {
expression { runtests_gnirs == 1 }
}

agent { label "master" }
environment {
MPLBACKEND = "agg"
DRAGONS_TEST_OUT = "ghost_tests_outputs"
TOX_ARGS = "astrodata geminidr gemini_instruments gempy recipe_system"
TMPDIR = "${env.WORKSPACE}/.tmp/ghost/"
}
steps {
echo "Running build #${env.BUILD_ID} on ${env.NODE_NAME}"
checkout scm
echo "${env.PATH}"
sh '.jenkins/scripts/setup_dirs.sh'
echo "GHOST tests"
sh 'tox -e py310-ghost -v -- --basetemp=${DRAGONS_TEST_OUT} --junit-xml reports/ghost_results.xml ${TOX_ARGS}'
echo "Reporting coverage"
sh 'tox -e codecov -- -F ghost'
} // end steps
post {
always {
junit (
allowEmptyResults: true,
testResults: '.tmp/py310-ghost/reports/*_results.xml'
)
echo "Deleting GHOST Tests workspace ${env.WORKSPACE}"
cleanWs()
dir("${env.WORKSPACE}@tmp") {
deleteDir()
}
}
} // end post
} // end stage
} // end parallel
}

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ whether written by AURA or third parties.

-----

Copyright (C) 2014-2021 Association of Universities for Research in Astronomy, Inc. (AURA)
Copyright (C) 2014-2024 Association of Universities for Research in Astronomy, Inc. (AURA)

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Expand Down
51 changes: 25 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@
</table>

# Current Status
**The stable version is v3.1.0.**
**The stable version is v3.2.0.**

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7776065.svg)](https://doi.org/10.5281/zenodo.7776065)
DRAGONS is distributed as a conda package, *dragons*, and it is

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10841622.svg)](https://doi.org/10.5281/zenodo.10841622) DRAGONS is distributed as a conda package, *dragons*, and it is
included in the conda *gemini* stack.

Version 3.1 is recommend for the reduction of **imaging** data from Gemini's
current facility instruments: GMOS, NIRI, Flamingos-2, and GSAOI, and for the
reduction of GMOS longslit spectroscopy data.
Version 3.2 is recommend for the reduction of **imaging** data from Gemini's
current facility instruments: GMOS, NIRI, Flamingos-2, and GSAOI, for the
reduction of GMOS longslit spectroscopy data, and the reduction of GHOST data.

To reduce other types of Gemini spectroscopy data, please continue to use
the [Gemini IRAF package](https://gemini.edu/observing/phase-iii/reducing-data/gemini-iraf-data-reduction-software).
the [Gemini IRAF package](https://www.gemini.edu/observing/phase-iii/reducing-data/gemini-iraf-data-reduction-software).

To install DRAGONS:

```
`$ conda create -n dragons python=3.10 dragons ds9
$ conda create -n dragons python=3.10 dragons ds9
```

You might need to add two relevant conda channels if you haven't already:
Expand All @@ -38,7 +38,7 @@ $ conda config --add channels http://astroconda.gemini.edu/public
```


A list of changes since 3.0 can be found in the [Change Logs](https://dragons.readthedocs.io/en/v3.1.0/changes.html).
A list of changes since 3.1 can be found in the [Change Logs](https://dragons.readthedocs.io/en/v3.2.0/changes.html).

---
# What is DRAGONS
Expand All @@ -51,9 +51,9 @@ reduction of Gemini data.
---

# Documentation
Documentation on DRAGONS v3.1 is available on "readthedocs" at:
Documentation on DRAGONS v3.2 is available on "readthedocs" at:

* https://dragons.readthedocs.io/en/v3.1.0/
* https://dragons.readthedocs.io/en/v3.2.0/

There your will find manuals for Astrodata and the Recipe System, and hands-on
tutorials on reducing Gemini imaging data with DRAGONS.
Expand All @@ -66,21 +66,20 @@ manuals.

---

# Citing DRAGONS

If you are using DRAGONS for your project, we ask that you please cite the
following paper:

* [K. Labrie et al 2023 Res. Notes AAS 7 214](https://iopscience.iop.org/article/10.3847/2515-5172/ad0044) ([BibTex](https://iopscience.iop.org/export?type=article&doi=10.3847/2515-5172/ad0044&exportFormat=iopexport_bib&exportType=abs&navsubmit=Export+abstract))

The DOI for DRAGONS version 3.1.0 is:
# Setting up a development environment

* [10.5281/zenodo.7776065](https://zenodo.org/record/7776065) ([BibTex](https://zenodo.org/record/7776065/export/hx))

If you are using AASTeX and plan to submit an article to one of the AAS journals,
we recommend adding a `\software` tag to your manuscript that cites DRAGONS and
the specific version you have used. For example:
To run checkouts, first set up a development conda environment. This is what
we are using at this time for the `master` branch and the `release/3.2.x`
branches.

```
\software{DRAGONS \citep{dragonsRNAAS_2023}, \cite[Version 3.1.0]{dragons3.1.0}
```
$ conda create -n dgdev3.10_20240401 python=3.10 astropy=6 astroquery matplotlib numpy psutil pytest python-dateutil requests scikit-image scipy sextractor sqlalchemy ds9 gwcs specutils sphinx sphinx_rtd_theme bokeh holoviews cython future astroscrappy=1.1 fitsverify imexam
$ conda activate dgdev3.10_20240401
$ pip install git+https://github.com/GeminiDRSoftware/GeminiObsDB.git@release/1.0.x
$ pip install git+https://github.com/GeminiDRSoftware/GeminiCalMgr.git@release/1.1.x
```
Dependencies change all the time and can break the development environment
or cause problems when conda tries to find a solution for the dependencies.
This not guaranteed to work flawlessly, you might have to adjust version
requirements.

4 changes: 2 additions & 2 deletions astrodata/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# --- Setup Version Here ---
API = 3
FEATURE = 2
BUG = 0
TAG = ''
BUG = 1
TAG = 'dev'


def version(short=False, tag=TAG):
Expand Down
32 changes: 32 additions & 0 deletions astrodata/doc/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.10"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: astrodata/doc/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
# - pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: requirements.txt
- requirements: doc/requirements.txt
- method: pip
path: .
2 changes: 1 addition & 1 deletion astrodata/doc/cheatsheet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Cheat Sheet
A data package is available for download if you wish to run the examples
included in this cheat sheet. Download it at:

`<http://www.gemini.edu/sciops/data/software/datapkgs/ad_usermanual_datapkg-v1.tar>`_
`<https://www.gemini.edu/sciops/data/software/datapkgs/ad_usermanual_datapkg-v1.tar>`_

To unpack::

Expand Down
12 changes: 7 additions & 5 deletions astrodata/doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

# General information about the project.
project = 'Astrodata Manual'
copyright = '2023, Association of Universities for Research in Astronomy'
copyright = '2024, Association of Universities for Research in Astronomy'
author = 'DRAGONS Team'

# The version info for the project you're documenting, acts as replacement for
Expand All @@ -58,10 +58,10 @@
#
# The short X.Y version.
version = '3.2'
# The ull version, including alpha/beta/rc tags.
#release = '3.1.x'
# The full version, including alpha/beta/rc tags.
#release = '3.2.x'
#rtdurl = 'release-'+release
#release = '3.1.0'
#release = '3.2.0'
#rtdurl = 'v'+release
rtdurl = 'latest'

Expand All @@ -76,7 +76,7 @@
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#
today = 'April 2023'
today = 'April 2024'
#
# Else, today_fmt is used as the format for a strftime call.
#
Expand Down Expand Up @@ -458,6 +458,8 @@ def setup(app):
.. |RSProgManual| replace:: :raw-html:`<a href="http://dragons-recipe-system-programmers-manual.readthedocs.io/en/{v}/">Recipe System Programmer Manual</a>`
.. |RSUserManual| replace:: :raw-html:`<a href="http://dragons-recipe-system-users-manual.readthedocs.io/en/{v}/">Recipe System User Manual<a>`
.. |RSUserInstall| replace:: :raw-html:`<a href="http://dragons-recipe-system-users-manual.readthedocs.io/en/{v}/install.html">Installation Guide</a>`
""".format(v = rtdurl)

10 changes: 5 additions & 5 deletions astrodata/doc/usermanual/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ add a variance plane to our raw data frame.
>>> # Here we work on the NDAstroData object to have the variance
>>> # trimmed automatically to the same size as the science array.
>>> # To reassign the cropped NDAstroData, we use the reset() method.
>>> ad[0].reset(ad[0].nddata[datasec.y1:datasec.y2, datasec.x1:datasec.x2]
>>> ad[0].reset(ad[0].nddata[datasec.y1:datasec.y2, datasec.x1:datasec.x2])

>>> # Now look at the dimensions of the first extension, science
>>> # and variance. That extension is smaller than the others.
Expand Down Expand Up @@ -771,9 +771,9 @@ attention.
>>> intensity = adcube[0].data[:, 24, 13] # (wlen, y, x)

# We plot
plt.clf()
plt.plot(wavelengths, intensity)
plt.show()
>>> plt.clf()
>>> plt.plot(wavelengths, intensity)
>>> plt.show()


Plot Data
Expand Down Expand Up @@ -874,7 +874,7 @@ what ``imexam`` has to offer.
>>> ds9.scale('zscale')

# Run in interactive mode. Try the various commands.
>>> ds9.imexam()
>>> ds9.imexam()

# Use the programmatic interface
# First initialize an Imexamine object.
Expand Down
Loading

0 comments on commit d5cb575

Please sign in to comment.