Skip to content

Commit

Permalink
Merge branch 'main' into fix_cfn_test
Browse files Browse the repository at this point in the history
  • Loading branch information
melanieclarke authored Sep 24, 2024
2 parents 947d48b + 8091a35 commit eab0532
Show file tree
Hide file tree
Showing 21 changed files with 511 additions and 150 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "master"
target-branch: "main"
schedule:
interval: "weekly"
reviewers:
Expand All @@ -13,7 +13,7 @@ updates:
# Maintain dependencies for pip
- package-ecosystem: "pip"
directory: "/"
target-branch: "master"
target-branch: "main"
schedule:
interval: "weekly"
reviewers:
Expand Down
85 changes: 83 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,92 @@ This PR addresses ...
## Tasks
- [ ] **request a review from someone specific**, to avoid making the maintainers review every PR
- [ ] add a build milestone, i.e. `Build 11.3` (use the [latest build](https://github.com/spacetelescope/jwst/milestones) if not sure)
- [ ] Does this PR change user-facing code / API?
- [ ] add an entry to `CHANGES.rst` within the relevant release section (otherwise add the `no-changelog-entry-needed` label to this PR)
- [ ] Does this PR change user-facing code / API? (if not, label with `no-changelog-entry-needed`)
- [ ] write news fragment(s) in `changes/`: `echo "changed something" > changes/<PR#>.<changetype>.rst` (see below for change types)
- [ ] update or add relevant tests
- [ ] update relevant docstrings and / or `docs/` page
- [ ] [start a regression test](https://github.com/spacetelescope/RegressionTests/actions/workflows/jwst.yml) and include a link to the running job ([click here for instructions](https://github.com/spacetelescope/RegressionTests/blob/main/docs/running_regression_tests.md))
- [ ] Do truth files need to be updated ("okified")?
- [ ] **after the reviewer has approved these changes**, run `okify_regtests` to update the truth files
- [ ] if a JIRA ticket exists, [make sure it is resolved properly](https://github.com/spacetelescope/jwst/wiki/How-to-resolve-JIRA-issues)

<details><summary>news fragment change types...</summary>

- ``changes/<PR#>.general.rst``: infrastructure or miscellaneous change
- ``changes/<PR#>.docs.rst``
- ``changes/<PR#>.stpipe.rst``
- ``changes/<PR#>.datamodels.rst``
- ``changes/<PR#>.scripts.rst``
- ``changes/<PR#>.fits_generator.rst``
- ``changes/<PR#>.set_telescope_pointing.rst``
- ``changes/<PR#>.pipeline.rst``

## stage 1
- ``changes/<PR#>.group_scale.rst``
- ``changes/<PR#>.dq_init.rst``
- ``changes/<PR#>.emicorr.rst``
- ``changes/<PR#>.saturation.rst``
- ``changes/<PR#>.ipc.rst``
- ``changes/<PR#>.firstframe.rst``
- ``changes/<PR#>.lastframe.rst``
- ``changes/<PR#>.reset.rst``
- ``changes/<PR#>.superbias.rst``
- ``changes/<PR#>.refpix.rst``
- ``changes/<PR#>.linearity.rst``
- ``changes/<PR#>.rscd.rst``
- ``changes/<PR#>.persistence.rst``
- ``changes/<PR#>.dark_current.rst``
- ``changes/<PR#>.charge_migration.rst``
- ``changes/<PR#>.jump.rst``
- ``changes/<PR#>.clean_flicker_noise.rst``
- ``changes/<PR#>.ramp_fitting.rst``
- ``changes/<PR#>.gain_scale.rst``

## stage 2
- ``changes/<PR#>.assign_wcs.rst``
- ``changes/<PR#>.badpix_selfcal.rst``
- ``changes/<PR#>.msaflagopen.rst``
- ``changes/<PR#>.nsclean.rst``
- ``changes/<PR#>.imprint.rst``
- ``changes/<PR#>.background.rst``
- ``changes/<PR#>.extract_2d.rst``
- ``changes/<PR#>.master_background.rst``
- ``changes/<PR#>.wavecorr.rst``
- ``changes/<PR#>.srctype.rst``
- ``changes/<PR#>.straylight.rst``
- ``changes/<PR#>.wfss_contam.rst``
- ``changes/<PR#>.flatfield.rst``
- ``changes/<PR#>.fringe.rst``
- ``changes/<PR#>.pathloss.rst``
- ``changes/<PR#>.barshadow.rst``
- ``changes/<PR#>.photom.rst``
- ``changes/<PR#>.pixel_replace.rst``
- ``changes/<PR#>.resample_spec.rst``
- ``changes/<PR#>.residual_fringe.rst``
- ``changes/<PR#>.cube_build.rst``
- ``changes/<PR#>.extract_1d.rst``
- ``changes/<PR#>.resample.rst``

## stage 3
- ``changes/<PR#>.assign_mtwcs.rst``
- ``changes/<PR#>.mrs_imatch.rst``
- ``changes/<PR#>.tweakreg.rst``
- ``changes/<PR#>.skymatch.rst``
- ``changes/<PR#>.exp_to_source.rst``
- ``changes/<PR#>.outlier_detection.rst``
- ``changes/<PR#>.tso_photometry.rst``
- ``changes/<PR#>.stack_refs.rst``
- ``changes/<PR#>.align_refs.rst``
- ``changes/<PR#>.klip.rst``
- ``changes/<PR#>.spectral_leak.rst``
- ``changes/<PR#>.source_catalog.rst``
- ``changes/<PR#>.combine_1d.rst``
- ``changes/<PR#>.ami.rst``

## other
- ``changes/<PR#>.wfs_combine.rst``
- ``changes/<PR#>.white_light.rst``
- ``changes/<PR#>.cube_skymatch.rst``
- ``changes/<PR#>.engdb_tools.rst``
- ``changes/<PR#>.guider_cds.rst``
</details>
38 changes: 31 additions & 7 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,40 @@
name: Ensure changelog
name: changelog

on:
pull_request:
types: [labeled, unlabeled, opened, synchronize, reopened]
types:
- labeled
- unlabeled
- opened
- synchronize
- reopened

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

jobs:
ensure_changelog:
name: Verify that a changelog entry exists for this pull request
check:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog-entry-needed') }}
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
with:
python-version: 3
- uses: actions/checkout@v4
with:
submodules: true
- run: grep -P '\[[^\]]*#${{github.event.number}}[,\]]' CHANGES.rst
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog-entry-needed') }}
fetch-depth: 0
- run: pip install .
- run: pip install towncrier
- run: towncrier check
- run: towncrier build --draft | grep -P '#${{ github.event.number }}'
prevent_manually_editing_changlog:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'allow-manual-changelog-edit') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: prevent direct changes to `CHANGES.rst`
run: git diff HEAD ${{ github.event.pull_request.base.sha }} --no-patch --exit-code CHANGES.rst

4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: test
on:
push:
branches:
- master
- main
- '*x'
tags:
- '*'
pull_request:
branches:
- master
- main
schedule:
# Weekly Monday 9AM build
- cron: "0 9 * * 1"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_devdeps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: test with development versions
on:
push:
branches:
- master
- main
- '*x'
tags:
- '*'
pull_request:
branches:
- master
- main
schedule:
# Weekly Monday 9AM build
- cron: "0 9 * * 1"
Expand Down
2 changes: 2 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ build:
- git fetch --all --tags || true
pre_install:
- git update-index --assume-unchanged docs/rtd_environment.yaml docs/conf.py
post_install:
- towncrier build --keep

conda:
environment: docs/rtd_environment.yaml
Expand Down
1 change: 0 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ tweakreg
- Step now uses `ModelLibrary` to handle accessing models consistently
whether they are in memory or on disk. [#8683]


1.15.1 (2024-07-08)
===================

Expand Down
26 changes: 13 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ opening a new [issue](https://github.com/spacetelescope/jwst/issues).
## Contributing code

If you would like to contribute code, this is done by submitting a [pull request](https://github.com/spacetelescope/jwst/pulls)
to the "master" branch of `spacetelescope/jwst`. To do this, we recommend the
to the "main" branch of `spacetelescope/jwst`. To do this, we recommend the
following workflow (which assumes you already have a Github account / command line tools).
If you are also new to git, please refer to the [git reference manual](https://git-scm.com/docs)
for an overview of git basics.
Expand All @@ -33,7 +33,7 @@ First, to clarify some terms that will be commonly used here:
The first step is to create your own 'remote' (online) and 'local' (on your machine)
clones of the central `spacetelescope/jwst` repository. You will make code changes
on your machine to your 'local' clone, push these to 'origin' (your online fork),
and finally, open a pull request to the ''master'' branch of `spacetelescope/jwst`.
and finally, open a pull request to the ''main'' branch of `spacetelescope/jwst`.

1. On the 'spacetelescope/jwst' Github repository page, 'fork' the JWST repository
to your own account space by clicking the appropriate button on the upper right-hand
Expand Down Expand Up @@ -77,16 +77,16 @@ If you ever want to reset these URLs, add references to other remote forks of

### Step 2: Creating a branch for your changes

It is a standard practice in git to create a new 'branch' (off `upstream/master`)
It is a standard practice in git to create a new 'branch' (off `upstream/main`)
for each new feature or bug fix. You can call this branch whatever you like - in
this example, we'll call it 'my_feature'. First, make sure you
have all recent changes to upstream by 'fetching' them:

>> git fetch upstream

The following will create a new branch off local/master called 'my_feature', and automatically switch you over to your new branch.
The following will create a new branch off local/main called 'my_feature', and automatically switch you over to your new branch.

>> git checkout -b my_feature upstream/master
>> git checkout -b my_feature upstream/main

### Step 3: Installing `jwst` for development

Expand Down Expand Up @@ -149,14 +149,14 @@ you open a pull request, add the corresponding PR number.

### Step 4: Opening a pull request

Now, you can open a pull request on the master branch of the upstream `jwst` repository.
Now, you can open a pull request on the main branch of the upstream `jwst` repository.

1. On the `spacetelescope/jwst` web page, after you push your changes you should
see a large green banner appear at the top prompting you to open a pull request
with your recently pushed changes. You can also open a pull request from the
[pull request tab](https://github.com/spacetelescope/jwst/pulls) on that page.
Select your fork and your 'my_feature' branch, and open a pull request against
the 'master' branch.
the 'main' branch.

2. There is now a checklist of items that need to be done before your PR can be merged.
* The continuous integration (CI) tests must complete and pass. The CI
Expand All @@ -177,16 +177,16 @@ the 'master' branch.
## Keeping your development branch current - rebasing

As `jwst` is constantly evolving, you will often encounter the situation where you've
made changes to your branch off 'master', but in the time its taken you to make those
changes, 'upstream/master' has evolved with new commits from other developers. In this
made changes to your branch off 'main', but in the time its taken you to make those
changes, 'upstream/main' has evolved with new commits from other developers. In this
situation, you will want to make sure you incorporate these changes into your branch.
Rebasing allows you to do two things - 1. apply others changes on top of yours, and 2.
squash your commits, even if there aren't new changes to apply.

Periodically, while writing code, to keep your branch up to date you will want to
do an interactive rebase against upstream/master to apply any new changes on top of yours:
do an interactive rebase against upstream/main to apply any new changes on top of yours:

>> git rebase -i upstream/master
>> git rebase -i upstream/main

This will then prompt you to select commits and commit messages - if you select
just the top commit, this will 'squash' the others and combine them into one. You
Expand All @@ -204,7 +204,7 @@ commits into a single one, which is also done with `git rebase`
`jwst` uses [sphinx](https://docs.readthedocs.io/en/stable/intro/getting-started-with-sphinx.html) to generate documentation, which is then hosted online on [readthedocs](https://readthedocs.org/).

You can access two versions of the documentation on the [JWST readthedocs website](https://readthedocs.org/projects/jwst-pipeline/)
- the 'latest' version is whatever is currently on the master branch, and the 'stable'
- the 'latest' version is whatever is currently on the main branch, and the 'stable'
version is the last released version. If you successfully merge a PR with documentation
changes, they will only appear on 'latest' until the next JWST release.

Expand Down Expand Up @@ -329,7 +329,7 @@ last released version of `stcal`, and stcal points to the last version of `jwst`
issue becomes circular. What you will need to do is modify the `pyproject.toml` files in both
packages to point to the other to demonstrate that CI tests pass (and make a comment
noting this in your PR), and then change it back before the PR is merge so that changes
to `pyproject.toml` are not merged into master/main. In your `jwst` branch, to point to your
to `pyproject.toml` are not merged into main. In your `jwst` branch, to point to your
branch in the dependent package (in this example `stcal`), change the required `stcal`
version in `pyproject.toml` to:

Expand Down
2 changes: 1 addition & 1 deletion JenkinsfileRT
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ withCredentials([string(
jobconfig = new JobConfig()
jobconfig.enable_env_publication = true
jobconfig.publish_env_on_success_only = true
jobconfig.publish_env_filter = "spacetelescope/master"
jobconfig.publish_env_filter = "spacetelescope/main"

// Define python version for conda
python_version = "3.11"
Expand Down
2 changes: 1 addition & 1 deletion JenkinsfileRT_dev
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ withCredentials([string(
jobconfig = new JobConfig()
jobconfig.enable_env_publication = false
jobconfig.publish_env_on_success_only = true
jobconfig.publish_env_filter = "spacetelescope/master"
jobconfig.publish_env_filter = "spacetelescope/main"

// Define python version for conda
python_version = "3.11"
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# JWST Calibration Pipeline

[![Build Status](https://github.com/spacetelescope/jwst/workflows/CI/badge.svg?branch=master)](https://github.com/spacetelescope/jwst/actions)
[![codecov](https://codecov.io/gh/spacetelescope/jwst/branch/master/graph/badge.svg?token=Utf5Zs9g7z)](https://codecov.io/gh/spacetelescope/jwst)
[![Build Status](https://github.com/spacetelescope/jwst/workflows/CI/badge.svg)](https://github.com/spacetelescope/jwst/actions)
[![codecov](https://codecov.io/gh/spacetelescope/jwst/branch/main/graph/badge.svg?token=Utf5Zs9g7z)](https://codecov.io/gh/spacetelescope/jwst)
[![Documentation Status](https://readthedocs.org/projects/jwst-pipeline/badge/?version=latest)](http://jwst-pipeline.readthedocs.io/en/latest/?badge=latest)
[![Powered by STScI Badge](https://img.shields.io/badge/powered%20by-STScI-blue.svg?colorA=707170&colorB=3e8ddd&style=flat)](http://www.stsci.edu)
[![Powered by Astropy Badge](http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat)](http://www.astropy.org/)
Expand Down Expand Up @@ -64,7 +64,7 @@ You can also install a specific version:
### Installing the development version from Github

You can install the latest development version (not as well tested) from the
Github master branch:
Github main branch:

conda create -n <env_name> python=3.11
conda activate <env_name>
Expand Down Expand Up @@ -178,7 +178,7 @@ environment variable:

## Documentation

Documentation (built daily from the Github `master` branch) is available at:
Documentation (built daily from the Github `main` branch) is available at:

https://jwst-pipeline.readthedocs.io/en/latest/

Expand Down
Empty file added changes/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions changes/8210.general.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename default branch to main.
1 change: 1 addition & 0 deletions changes/8671.docs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use ``towncrier`` to handle change log entries
2 changes: 1 addition & 1 deletion docs/getting_started/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Contributing and Reporting Issues
=================================

`jwst` is open source - if you would like to contribute code or file an issue,
please see the `the Github Contribution Guide <https://github.com/spacetelescope/jwst/blob/master/CONTRIBUTING.md>`_.
please see the `the Github Contribution Guide <https://github.com/spacetelescope/jwst/blob/main/CONTRIBUTING.md>`_.
4 changes: 2 additions & 2 deletions docs/getting_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Installing the Development Version from Github
----------------------------------------------

You can install the latest development version (not as well tested) from the
Github master branch:
Github main branch:

| >> conda create -n <env_name> python=3.11
| >> conda activate <env_name>
Expand All @@ -93,7 +93,7 @@ environment of choice and then reinstall:
This will ensure that all dependency packages are also upgraded. This also
applies when using the development version of jwst - to upgrade and grab recent
changes, uninstall and re-install the master branch from Github:
changes, uninstall and re-install the main branch from Github:

| >> pip uninstall jwst
| >> pip install git+https://github.com/spacetelescope/jwst
Expand Down
2 changes: 1 addition & 1 deletion docs/jwst/stpipe/cfg_deprecation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CFG Usage Deprecation Notice
============================

As of March 18, 2021, a significant change to how JWST pipelines operate was
completed and pushed to the JWST master branch on github. Theoretically the
completed and pushed to the JWST main branch on github. Theoretically the
change should be transparent. However, we are all familiar with the difference
between theory and practice and hence we want to alert all users.

Expand Down
1 change: 1 addition & 0 deletions docs/rtd_environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ dependencies:
- pip
- graphviz
- sphinx_rtd_theme>1.2.0
- towncrier
Loading

0 comments on commit eab0532

Please sign in to comment.