Skip to content

Commit

Permalink
Merge pull request #472 from spacetelescope/release-0.21.0
Browse files Browse the repository at this point in the history
Release 0.21.0 [master]
  • Loading branch information
bourque authored Jul 29, 2019
2 parents 2ae74c5 + ea3d624 commit bd89fe6
Show file tree
Hide file tree
Showing 51 changed files with 1,127 additions and 411 deletions.
42 changes: 42 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
0.21.0 (2019-07-23)
===================

New Features
------------

Project & API Documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Updated ``README`` to include instructions on package installation via ``pip``.

Web Application
~~~~~~~~~~~~~~~

- Updated all webpages to conform to Web Application Accessibility Guidelines.
- Upgraded to ``django`` version 2.2.
- ``bokeh`` is now imported in ``base`` template so that the version being used is consistent across all HTML templates.

``jwql`` Repository
~~~~~~~~~~~~~~~~~~~

- The ``jwql`` package is now available on PyPI (https://pypi.org/project/jwql/) and installable via ``pip``.
- Updated Jenkins configuration file to include in-line comments and descriptions.
- Added ``utils`` function to validate the ``config.json`` file during import of ``jwql`` package.
- Added support for monitoring contents of the ``jwql`` central storage area in the filesystem monitor.


Bug Fixes
---------

Web Application
~~~~~~~~~~~~~~~

- Fixed position error of JWQL version display in footer.

``jwql`` Repository
~~~~~~~~~~~~~~~~~~~

- Fixed spelling error in dark monitor database column names.
- Fixed dark monitor to avoid processing files that are not in the filesystem.


0.20.0 (2019-06-05)
===================

Expand Down
117 changes: 86 additions & 31 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,94 @@
// Obtain files from source control system.
// JWQL Jenkinsfile
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//
// Authors:
// --------
// - Matthew Bourque
// - Lauren Chambers
// - Joshua Alexander
// - Sara Ogaz
// - Matt Rendina
//
// Notes:
// ------
// - More info here: https://github.com/spacetelescope/jenkinsfile_ci_examples
// - Syntax defined here: https://github.com/spacetelescope/jenkins_shared_ci_utils
//
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//
// scm_checkout() does the following:
// 1. Disables pipeline execution if [skip ci] or [ci skip] is present in the
// commit message, letting users exclude individual commits from CI
// 2. Clones the Git repository
// 3. Creates a local cache of the repository to avoid commit drift between tasks
// (i.e. Each stage is guaranteed to receive the same source code regardless of
// commits taking place after the pipeline has started.)
if (utils.scm_checkout()) return

matrix_os = ["linux-stable"]
// Establish OS and Python version variables for the matrix
matrix_os = ["linux-stable"] // (Note that Jenkins can only be run with Linux, not MacOSX/Windows)
matrix_python = ["3.5", "3.6"]

// Set up the matrix of builds
matrix = []

withCredentials([string(
credentialsId: 'jwql-codecov',
variable: 'codecov_token')]) {

for (os in matrix_os) {
for (python_ver in matrix_python) {
// Define each build configuration, copying and overriding values as necessary.
env_py = "_python_${python_ver}".replace(".", "_")
bc = new BuildConfig()
bc.nodetype = os
bc.name = "debug-${os}-${env_py}"
bc.conda_packages = ["python=${python_ver}"]
bc.build_cmds = [
"conda env update --file=environment${env_py}.yml",
"pip install codecov pytest-cov",
"python setup.py install"]
bc.test_cmds = [
"pytest -s --junitxml=results.xml --cov=./jwql/ --cov-report=xml:coverage.xml",
"sed -i 's/file=\"[^\"]*\"//g;s/line=\"[^\"]*\"//g;s/skips=\"[^\"]*\"//g' results.xml",
"codecov --token=${codecov_token}",
"mkdir -v reports",
"mv -v coverage.xml reports/coverage.xml"]
matrix += bc
// Define IDs that live on the Jenkins server (here, for CodeCov and PyPI)
withCredentials([
string(credentialsId: 'jwql-codecov', variable: 'codecov_token'),
usernamePassword(credentialsId:'jwql-pypi', usernameVariable: 'pypi_username', passwordVariable: 'pypi_password')])

// Iterate over the above variables to define the build matrix.
{
for (os in matrix_os) {
for (python_ver in matrix_python) {
// Define each build configuration, copying and overriding values as necessary.

// Define a string variable to reflect the python version of this build
env_py = "_python_${python_ver}".replace(".", "_")

// Create a new build configuration
bc = new BuildConfig()

// Define the OS (only "linux-stable" used here)
bc.nodetype = os

// Give the build configuration a name. This string becomes the
// stage header on Jenkins' UI. Keep it short!
bc.name = "debug-${os}-${env_py}"

// (Required) Define what packages to include in the base conda environment.
// This specification also tells Jenkins to spin up a new conda environment for
// your build, rather than using the default environment.
bc.conda_packages = ["python=${python_ver}"]

// Execute a series of commands to set up the build, including
// any packages that have to be installed with pip
bc.build_cmds = [
"conda env update --file=environment${env_py}.yml", // Update env from file
"pip install codecov pytest-cov", // Install additional packages
"python setup.py install", // Install JWQL package
"python setup.py sdist bdist_wheel" // Build JWQL pacakge wheel for PyPI
]

// Execute a series of test commands
bc.test_cmds = [
// Run pytest
"pytest ./jwql/tests/ -s --junitxml=results.xml --cov=./jwql/ --cov-report=xml:coverage.xml",
// Add a truly magical command that makes Jenkins work for Python 3.5
"sed -i 's/file=\"[^\"]*\"//g;s/line=\"[^\"]*\"//g;s/skips=\"[^\"]*\"//g' results.xml",
// Define CodeCov token
"codecov --token=${codecov_token}",
// Move the CodeCov report to a different dir to not confuse Jenkins about results.xml
"mkdir -v reports",
"mv -v coverage.xml reports/coverage.xml",
// Update the package wheel to PYPI
"twine upload -u '${pypi_username}' -p '${pypi_password}' --repository-url https://upload.pypi.org/legacy/ --skip-existing dist/*"]

// Add the build to the matrix
matrix += bc
}
}
}
// bc1 = utils.copy(bc0)
// bc1.build_cmds[0] = "conda install -q -y python=3.5"

// Iterate over configurations that define the (distibuted) build matrix.
// Spawn a host of the given nodetype for each combination and run in parallel.
utils.run(matrix)
// Submit the build configurations and execute them in parallel
utils.run(matrix)
}
37 changes: 28 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,23 @@ Official API documentation can be found on [ReadTheDocs](https://jwql.readthedoc

The `jwql` application is currently under heavy development. The `1.0` release is expected in 2019. Currently, a development version of the web application can be found at [https://dljwql.stsci.edu](https://dljwql.stsci.edu).

## Installation
## Installation for Users

To install `jwql`, simply use `pip`:

```
pip install jwql
```

The section below describes a more detailed installation for users that wish to contribute to the `jwql` repository.

## Installation for Contributors

Getting `jwql` up and running on your own computer requires four steps, detailed below:
1. Cloning the GitHub repository
1. Installing the `conda`environment
1. Installing the python package
1. Setting up the configuration file
2. Installing the `conda`environment
3. Installing the python package
4. Setting up the configuration file

### Prerequisites

Expand Down Expand Up @@ -64,25 +74,31 @@ Following the download of the `jwql` repository, contributors can then install t
conda update conda
```

Next, activate the `base` environment:
Next, activate the `base` or `root` environment (depending on your version of `conda`):

```
source activate base
source activate base/root
```

Lastly, create the `jwql` environment with either Python 3.5 or 3.6, via the `environment_python_3_5.yml` or `environment_python_3_6.yml` file, respectively. We recommend installing with the 3.6 version:

```
conda env create -f environment_python_3_6.yml
conda env create -f environment_python_3_6.yml --name jwql-3.6
```

### Package Installation

Next, you need to install the `jwql` package. While still in the `jwql/` directory, run the following command to set up the package:
Next, you need to install the `jwql` package under development mode. This can be accomplished either by running the `setup.py` script, or `pip install` with the `-e` option:

```
python setup.py develop
```

or

```
pip install -e .
```
The package should now appear if you run `conda list jwql`.

### Configuration File
Expand Down Expand Up @@ -135,11 +151,12 @@ Any questions about the `jwql` project or its software can be directed to `jwql@
- Bryan Hilbert (INS) [@bilhbert4](https://github.com/bhilbert4)
- Graham Kanarek (INS) [@gkanarek](https://github.com/gkanarek)
- Catherine Martlin (INS) [@catherine-martlin](https://github.com/catherine-martlin)
- Sara Ogaz (OED) [@SaOgaz](https://github.com/SaOgaz)
- Johannes Sahlmann (INS) [@Johannes-Sahlmann](https://github.com/johannes-sahlmann)
- Ben Sunnquist (INS) [@bsunnquist](https://github.com/bsunnquist)

## Acknowledgments:
- Faith Abney (DMD)
- Joshua Alexander (DMD) [@obviousrebel](https://github.com/obviousrebel)
- Anastasia Alexov (DMD)
- Sara Anderson (DMD)
- Tracy Beck (INS)
Expand Down Expand Up @@ -171,11 +188,13 @@ Any questions about the `jwql` project or its software can be directed to `jwql@
- Karen Levay (DMD)
- Crystal Mannfolk (SCOPE) [@cmannfolk](https://github.com/cmannfolk)
- Greg Masci (ITSD)
- Jacob Matuskey (DMD) [@jmatuskey](https://github.com/jmatuskey)
- Margaret Meixner (INS)
- Christain Mesh (DMD) [@cam72cam](https://github.com/cam72cam)
- Prem Mishra (ITSD)
- Don Mueller (ITSD)
- Maria Antonia Nieto-Santisteban (SEITO)
- Sara Ogaz (DMD) [@SaOgaz](https://github.com/SaOgaz)
- Brian O'Sullivan (INS)
- Joe Pollizzi (JWSTMO)
- Lee Quick (DMD)
Expand Down
2 changes: 2 additions & 0 deletions environment_python_3_5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
- inflection=0.3.1
- ipython=6.5.0
- jinja2=2.10
- jsonschema>=2.6.0
- jwst=0.13.0
- matplotlib=3.0.0
- numpy=1.15.2
Expand All @@ -27,6 +28,7 @@ dependencies:
- sphinx_rtd_theme=0.1.9
- sqlalchemy=1.2.11
- stsci_rtd_theme=0.0.2
- twine=1.11.0
- pip:
- authlib==0.10
- codecov==2.0.15
Expand Down
17 changes: 10 additions & 7 deletions environment_python_3_6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,32 @@ dependencies:
- astroquery=0.3.9
- bokeh=1.2.0
- crds>=7.2.7
- django=2.1.7
- django=2.2.1
- inflection=0.3.1
- ipython=7.5.0
- ipython=7.6.1
- jinja2=2.10
- jsonschema>=3.0.1
- jwst=0.13.1
- matplotlib=3.0.2
- matplotlib=3.1.0
- numpy=1.16.4
- numpydoc=0.9.0
- pandas=0.24.2
- postgresql=9.6.6
- psycopg2=2.7.5
- python=3.6.4
- python-dateutil=2.7.5
- pytest=4.5.0
- pytest=5.0.1
- pytest-cov=2.6.1
- pytest-html=1.19.0
- sphinx=2.0.1
- sphinx=2.1.0
- sphinx_rtd_theme=0.1.9
- sqlalchemy=1.3.3
- sqlalchemy=1.3.5
- sqlparse=0.3.0
- stsci_rtd_theme=0.0.2
- twine=1.13.0
- pip:
- authlib==0.10
- codecov==2.0.15
- jwedb>=0.0.3
- pysiaf==0.2.5
- pysiaf==0.3.1
- sphinx-automodapi==0.10
Loading

0 comments on commit bd89fe6

Please sign in to comment.