From eb797c7a7f18b2db80e94c29197e104ae527f9df Mon Sep 17 00:00:00 2001 From: Zach Burnett Date: Mon, 23 Sep 2024 12:44:25 -0400 Subject: [PATCH 1/6] use `towncrier` to handle changelog entries (#8671) --- .github/pull_request_template.md | 82 ++++++- .github/workflows/changelog.yml | 29 ++- .readthedocs.yaml | 2 + CHANGES.rst | 1 - changes/.gitkeep | 0 changes/8671.docs.rst | 1 + docs/rtd_environment.yaml | 1 + pyproject.toml | 364 ++++++++++++++++++++++++++++++- 8 files changed, 469 insertions(+), 11 deletions(-) create mode 100644 changes/.gitkeep create mode 100644 changes/8671.docs.rst diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9da3b0c69f..a7f4eabf61 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -12,11 +12,89 @@ 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/..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) + +
news fragment change types... + + - ``changes/.general.rst``: infrastructure or miscellaneous change + - ``changes/.docs.rst`` + - ``changes/.stpipe.rst`` + - ``changes/.datamodels.rst`` + - ``changes/.scripts.rst`` + - ``changes/.fits_generator.rst`` + - ``changes/.set_telescope_pointing.rst`` + + ## stage 1 + - ``changes/.group_scale.rst`` + - ``changes/.dq_init.rst`` + - ``changes/.emicorr.rst`` + - ``changes/.saturation.rst`` + - ``changes/.ipc.rst`` + - ``changes/.firstframe.rst`` + - ``changes/.lastframe.rst`` + - ``changes/.reset.rst`` + - ``changes/.superbias.rst`` + - ``changes/.refpix.rst`` + - ``changes/.linearity.rst`` + - ``changes/.rscd.rst`` + - ``changes/.persistence.rst`` + - ``changes/.dark_current.rst`` + - ``changes/.charge_migration.rst`` + - ``changes/.jump.rst`` + - ``changes/.ramp_fitting.rst`` + - ``changes/.gain_scale.rst`` + + ## stage 2 + - ``changes/.assign_wcs.rst`` + - ``changes/.msaflagopen.rst`` + - ``changes/.nsclean.rst`` + - ``changes/.imprint.rst`` + - ``changes/.background.rst`` + - ``changes/.extract_2d.rst`` + - ``changes/.master_background.rst`` + - ``changes/.wavecorr.rst`` + - ``changes/.srctype.rst`` + - ``changes/.straylight.rst`` + - ``changes/.wfss_contam.rst`` + - ``changes/.flatfield.rst`` + - ``changes/.fringe.rst`` + - ``changes/.pathloss.rst`` + - ``changes/.barshadow.rst`` + - ``changes/.photom.rst`` + - ``changes/.pixel_replace.rst`` + - ``changes/.resample_spec.rst`` + - ``changes/.residual_fringe.rst`` + - ``changes/.cube_build.rst`` + - ``changes/.extract_1d.rst`` + - ``changes/.resample.rst`` + + ## stage 3 + - ``changes/.assign_mtwcs.rst`` + - ``changes/.mrs_imatch.rst`` + - ``changes/.tweakreg.rst`` + - ``changes/.skymatch.rst`` + - ``changes/.exp_to_source.rst`` + - ``changes/.outlier_detection.rst`` + - ``changes/.tso_photometry.rst`` + - ``changes/.stack_refs.rst`` + - ``changes/.align_refs.rst`` + - ``changes/.klip.rst`` + - ``changes/.spectral_leak.rst`` + - ``changes/.source_catalog.rst`` + - ``changes/.combine_1d.rst`` + - ``changes/.ami.rst`` + + ## other + - ``changes/.wfs_combine.rst`` + - ``changes/.white_light.rst`` + - ``changes/.cube_skymatch.rst`` + - ``changes/.engdb_tools.rst`` + - ``changes/.guider_cds.rst`` +
diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 0ef4a043b0..a6889ab407 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -1,16 +1,31 @@ -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 }}' + diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 6dff1248d4..107815b26e 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -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 diff --git a/CHANGES.rst b/CHANGES.rst index 63bb799b99..7500ad652f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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) =================== diff --git a/changes/.gitkeep b/changes/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/changes/8671.docs.rst b/changes/8671.docs.rst new file mode 100644 index 0000000000..724817599d --- /dev/null +++ b/changes/8671.docs.rst @@ -0,0 +1 @@ +use ``towncrier`` to handle change log entries diff --git a/docs/rtd_environment.yaml b/docs/rtd_environment.yaml index aeebc4dff6..f6818e66e9 100644 --- a/docs/rtd_environment.yaml +++ b/docs/rtd_environment.yaml @@ -7,3 +7,4 @@ dependencies: - pip - graphviz - sphinx_rtd_theme>1.2.0 + - towncrier diff --git a/pyproject.toml b/pyproject.toml index dd65909821..def298ae11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -193,7 +193,6 @@ minversion = "6.0" norecursedirs = [ "docs/_build", "docs/exts", - "jwst/timeconversion", "jwst/associations/tests/data", "scripts", ".tox", @@ -286,3 +285,366 @@ lint.ignore = [ "jwst/ramp_fitting/tests/*" = [ "E402", # module-level import not at top of file ] + +[tool.towncrier] +filename = "CHANGES.rst" +directory = "changes" +package = "jwst" +title_format = "{version} ({project_date})" +ignore = [".gitkeep"] +wrap = true +issue_format = "`#{issue} `_" + +[[tool.towncrier.type]] +directory = "general" +name = "General" +showcontent = true + +[[tool.towncrier.type]] +directory = "docs" +name = "Documentation" +showcontent = true + +[[tool.towncrier.type]] +directory = "stpipe" +name = '``stpipe``' +showcontent = true + +[[tool.towncrier.type]] +directory = "datamodels" +name = "Data Models" +showcontent = true + +[[tool.towncrier.type]] +directory = "associations" +name = "Associations" +showcontent = true + +[[tool.towncrier.type]] +directory = "scripts" +name = "Scripts" +showcontent = true + +[[tool.towncrier.type]] +directory = "fits_generator" +name = "``fits_generator``" +showcontent = true + +[[tool.towncrier.type]] +directory = "set_telescope_pointing" +name = '``set_telescope_pointing``' +showcontent = true + +# pipeline + +[[tool.towncrier.type]] +directory = "pipeline" +name = 'Pipeline' +showcontent = true + +# steps + +[[tool.towncrier.type]] +directory = "align_refs" +name = 'align_refs (coron3)' +showcontent = true + +[[tool.towncrier.type]] +directory = "ami" +name = 'ami_analyze / ami_normalize / ami_average (ami3)' +showcontent = true + +[[tool.towncrier.type]] +directory = "assign_mtwcs" +name = 'assign_mtwcs (image3, spec3)' +showcontent = true + +[[tool.towncrier.type]] +directory = "assign_wcs" +name = 'assign_wcs (image2, spec2)' +showcontent = true + +[[tool.towncrier.type]] +directory = "background" +name = 'background (image2, spec2)' +showcontent = true + +[[tool.towncrier.type]] +directory = "badpix_selfcal" +name = 'badpix_selfcal (spec2)' +showcontent = true + +[[tool.towncrier.type]] +directory = "barshadow" +name = 'barshadow (spec2 MOS)' +showcontent = true + +[[tool.towncrier.type]] +directory = "charge_migration" +name = "charge_migration (detector1 NIR)" +showcontent = true + +[[tool.towncrier.type]] +directory = "clean_flicker_noise" +name = "clean_flicker_noise (detector1)" +showcontent = true + +[[tool.towncrier.type]] +directory = "combine_1d" +name = 'combine_1d (spec3)' +showcontent = true + +[[tool.towncrier.type]] +directory = "cube_build" +name = 'cube_build (spec2 IFU, spec3)' +showcontent = true + +[[tool.towncrier.type]] +directory = "cube_skymatch" +name = 'cube_skymatch' +showcontent = true + +[[tool.towncrier.type]] +directory = "dark_current" +name = 'dark_current (detector1 NIR)' +showcontent = true + +[[tool.towncrier.type]] +directory = "dq_init" +name = 'dq_init (detector1)' +showcontent = true + +[[tool.towncrier.type]] +directory = "emicorr" +name = 'emicorr (detector1 MIR)' +showcontent = true + +[[tool.towncrier.type]] +directory = "engdb_tools" +name = 'engdb_tools' +showcontent = true + +[[tool.towncrier.type]] +directory = "exp_to_source" +name = 'exp_to_source (spec3)' +showcontent = true + +[[tool.towncrier.type]] +directory = "extract_1d" +name = 'extract_1d (spec2, spec3)' +showcontent = true + +[[tool.towncrier.type]] +directory = "extract_2d" +name = 'extract_2d (spec2 MOS)' +showcontent = true + +[[tool.towncrier.type]] +directory = "firstframe" +name = 'firstframe (detector1 MIR)' +showcontent = true + +[[tool.towncrier.type]] +directory = "flatfield" +name = 'flatfield (image2, spec2)' +showcontent = true + +[[tool.towncrier.type]] +directory = "fringe" +name = 'fringe (spec2 IFU)' +showcontent = true + +[[tool.towncrier.type]] +directory = "gain_scale" +name = 'gain_scale (detector1 NIR)' +showcontent = true + +[[tool.towncrier.type]] +directory = "group_scale" +name = 'group_scale (detector1 NIR)' +showcontent = true + +[[tool.towncrier.type]] +directory = "guider_cds" +name = 'guider_cds (FGS)' +showcontent = true + +[[tool.towncrier.type]] +directory = "imprint" +name = 'imprint (spec2 IFU, spec2 MOS)' +showcontent = true + +[[tool.towncrier.type]] +directory = "ipc" +name = 'ipc (detector1)' +showcontent = true + +[[tool.towncrier.type]] +directory = "jump" +name = 'jump (detector1)' +showcontent = true + +[[tool.towncrier.type]] +directory = "klip" +name = "klip (coron3)" +showcontent = true + +[[tool.towncrier.type]] +directory = "lastframe" +name = 'lastframe (detector1 MIR)' +showcontent = true + +[[tool.towncrier.type]] +directory = "linearity" +name = 'linearity (detector1)' +showcontent = true + +[[tool.towncrier.type]] +directory = "master_background" +name = 'master_background (spec2 MOS, spec3)' +showcontent = true + +[[tool.towncrier.type]] +directory = "mrs_imatch" +name = 'mrs_imatch (spec3)' +showcontent = true + +[[tool.towncrier.type]] +directory = "msaflagopen" +name = 'msaflagopen (spec2 IFU, spec2 MOS)' +showcontent = true + +[[tool.towncrier.type]] +directory = "nsclean" +name = "nsclean (spec2 IFU, spec2 MOS)" +showcontent = true + +[[tool.towncrier.type]] +directory = "outlier_detection" +name = 'outlier_detection (image3, tso3, spec3, coron3)' +showcontent = true + +[[tool.towncrier.type]] +directory = "pathloss" +name = 'pathloss (spec2 IFU, spec2 MOS)' +showcontent = true + +[[tool.towncrier.type]] +directory = "persistence" +name = 'persistence (detector1 NIR)' +showcontent = true + +[[tool.towncrier.type]] +directory = "photom" +name = 'photom (image2, spec2)' +showcontent = true + +[[tool.towncrier.type]] +directory = "pixel_replace" +name = 'pixel_replace (spec2 MOS)' +showcontent = true + +[[tool.towncrier.type]] +directory = "ramp_fitting" +name = 'ramp_fitting (detector1)' +showcontent = true + +[[tool.towncrier.type]] +directory = "refpix" +name = 'refpix (detector1)' +showcontent = true + +[[tool.towncrier.type]] +directory = "resample" +name = 'resample (image2, image3, coron3)' +showcontent = true + +[[tool.towncrier.type]] +directory = "resample_spec" +name = 'resample_spec (spec2 MOS, spec3)' +showcontent = true + +[[tool.towncrier.type]] +directory = "reset" +name = 'reset (detector1 MIR)' +showcontent = true + +[[tool.towncrier.type]] +directory = "residual_fringe" +name = 'residual_fringe (spec2 IFU)' +showcontent = true + +[[tool.towncrier.type]] +directory = "rscd" +name = 'rscd (detector1 MIR)' +showcontent = true + +[[tool.towncrier.type]] +directory = "saturation" +name = 'saturation (detector1)' +showcontent = true + +[[tool.towncrier.type]] +directory = "skymatch" +name = 'skymatch (image3)' +showcontent = true + +[[tool.towncrier.type]] +directory = "source_catalog" +name = 'source_catalog (image3)' +showcontent = true + +[[tool.towncrier.type]] +directory = "spectral_leak" +name = "spectral_leak (spec3)" +showcontent = true + +[[tool.towncrier.type]] +directory = "srctype" +name = 'srctype (spec2)' +showcontent = true + +[[tool.towncrier.type]] +directory = "stack_refs" +name = "stack_refs (coron3)" +showcontent = true + +[[tool.towncrier.type]] +directory = "straylight" +name = 'straylight (spec2 IFU)' +showcontent = true + +[[tool.towncrier.type]] +directory = "superbias" +name = 'superbias (detector1 NIR)' +showcontent = true + +[[tool.towncrier.type]] +directory = "tso_photometry" +name = 'tso_photometry (tso3)' +showcontent = true + +[[tool.towncrier.type]] +directory = "tweakreg" +name = 'tweakreg (image3)' +showcontent = true + +[[tool.towncrier.type]] +directory = "wavecorr" +name = 'wavecorr (spec2 MOS)' +showcontent = true + +[[tool.towncrier.type]] +directory = "wfs_combine" +name = 'wfs_combine' +showcontent = true + +[[tool.towncrier.type]] +directory = "wfss_contam" +name = 'wfss_contam (spec2 WFSS)' +showcontent = true + +[[tool.towncrier.type]] +directory = "white_light" +name = 'white_light' +showcontent = true From b8cb30779586891a9709f727c6266831823c52ae Mon Sep 17 00:00:00 2001 From: Brett Graham Date: Mon, 23 Sep 2024 14:02:59 -0400 Subject: [PATCH 2/6] switch default branch name to main in docs/ci (#8210) --- .github/dependabot.yml | 4 ++-- .github/workflows/ci.yml | 4 ++-- .github/workflows/tests_devdeps.yml | 4 ++-- CONTRIBUTING.md | 26 +++++++++++++------------- JenkinsfileRT | 2 +- JenkinsfileRT_dev | 2 +- README.md | 8 ++++---- changes/8210.general.rst | 1 + docs/getting_started/contributing.rst | 2 +- docs/getting_started/install.rst | 4 ++-- docs/jwst/stpipe/cfg_deprecation.rst | 2 +- 11 files changed, 30 insertions(+), 29 deletions(-) create mode 100644 changes/8210.general.rst diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 03b4fe324e..1b061aa0a4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -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: @@ -13,7 +13,7 @@ updates: # Maintain dependencies for pip - package-ecosystem: "pip" directory: "/" - target-branch: "master" + target-branch: "main" schedule: interval: "weekly" reviewers: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b1f54cc37..45ab163eed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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" diff --git a/.github/workflows/tests_devdeps.yml b/.github/workflows/tests_devdeps.yml index 6e0aef5081..2daf8941d5 100644 --- a/.github/workflows/tests_devdeps.yml +++ b/.github/workflows/tests_devdeps.yml @@ -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" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 23fd25e57e..b085d74a1e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. @@ -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 @@ -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 @@ -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 @@ -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 @@ -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. @@ -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: diff --git a/JenkinsfileRT b/JenkinsfileRT index e155c83ab1..4fcea13477 100644 --- a/JenkinsfileRT +++ b/JenkinsfileRT @@ -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" diff --git a/JenkinsfileRT_dev b/JenkinsfileRT_dev index 2f88a1d81a..a3d7db5893 100644 --- a/JenkinsfileRT_dev +++ b/JenkinsfileRT_dev @@ -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" diff --git a/README.md b/README.md index 6d213ccd27..b1bd23db8b 100644 --- a/README.md +++ b/README.md @@ -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/) @@ -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 python=3.11 conda activate @@ -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/ diff --git a/changes/8210.general.rst b/changes/8210.general.rst new file mode 100644 index 0000000000..b923267b54 --- /dev/null +++ b/changes/8210.general.rst @@ -0,0 +1 @@ +Rename default branch to main. diff --git a/docs/getting_started/contributing.rst b/docs/getting_started/contributing.rst index 8d93493ac2..b1f7ae42e8 100644 --- a/docs/getting_started/contributing.rst +++ b/docs/getting_started/contributing.rst @@ -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 `_. \ No newline at end of file +please see the `the Github Contribution Guide `_. diff --git a/docs/getting_started/install.rst b/docs/getting_started/install.rst index c978378641..410daa02ed 100644 --- a/docs/getting_started/install.rst +++ b/docs/getting_started/install.rst @@ -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 python=3.11 | >> conda activate @@ -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 diff --git a/docs/jwst/stpipe/cfg_deprecation.rst b/docs/jwst/stpipe/cfg_deprecation.rst index 6b3fbe35b5..78bef68d93 100644 --- a/docs/jwst/stpipe/cfg_deprecation.rst +++ b/docs/jwst/stpipe/cfg_deprecation.rst @@ -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. From 6e28b95f17066e660b1a6fd99f620e3ba13c1003 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Mon, 23 Sep 2024 14:10:19 -0400 Subject: [PATCH 3/6] clear SDP requirements --- requirements-sdp.txt | 77 -------------------------------------------- 1 file changed, 77 deletions(-) diff --git a/requirements-sdp.txt b/requirements-sdp.txt index 794f475a21..a110a4b011 100644 --- a/requirements-sdp.txt +++ b/requirements-sdp.txt @@ -14,80 +14,3 @@ # conda activate sdp # pip install -e .[test,sdp] # pip freeze | grep -v jwst >> requirements-sdp.txt -asdf==3.4.0 -asdf-astropy==0.6.1 -asdf_coordinates_schemas==0.3.0 -asdf_standard==1.1.1 -asdf_transform_schemas==0.5.0 -asdf_wcs_schemas==0.4.0 -astropy==6.1.3 -astropy-iers-data==0.2024.9.16.0.32.21 -attrs==24.2.0 -BayesicFitting==3.2.1 -certifi==2024.8.30 -charset-normalizer==3.3.2 -ci_watson==0.7.0 -colorama==0.4.6 -contourpy==1.3.0 -coverage==7.6.1 -crds==11.18.4 -cycler==0.12.1 -drizzle==1.15.3 -et-xmlfile==1.1.0 -filelock==3.16.1 -fonttools==4.53.1 -future==1.0.0 -gwcs==0.21.0 -idna==3.10 -imageio==2.35.1 -importlib_metadata==8.5.0 -iniconfig==2.0.0 -jmespath==1.0.1 -jplephem==2.22 -jsonschema==4.23.0 -jsonschema-specifications==2023.12.1 -kiwisolver==1.4.7 -lazy_loader==0.4 -lxml==5.3.0 -matplotlib==3.9.2 -networkx==3.3 -numpy==1.26.4 -opencv-python-headless==4.10.0.84 -openpyxl==3.1.5 -packaging==24.1 -Parsley==1.3 -photutils==1.13.0 -pillow==10.4.0 -pluggy==1.5.0 -poppy==1.1.1 -psutil==6.0.0 -pyerfa==2.0.1.4 -pyparsing==3.1.4 -pysiaf==0.23.3 -pytest==8.3.3 -pytest-cov==5.0.0 -pytest-doctestplus==1.2.1 -python-dateutil==2.9.0.post0 -PyYAML==6.0.2 -readchar==4.2.0 -referencing==0.35.1 -requests==2.32.3 -requests-mock==1.12.1 -rpds-py==0.20.0 -ruff==0.6.6 -scikit-image==0.24.0 -scipy==1.14.1 -semantic-version==2.10.0 -six==1.16.0 -spherical_geometry==1.3.2 -stcal==1.9.0 -stdatamodels==2.1.0 -stpipe==0.7.0 -stsci.imagestats==1.8.3 -stsci.stimage==0.2.9 -synphot==1.4.0 -tifffile==2024.9.20 -tweakwcs==0.8.8 -urllib3==2.2.3 -wiimatch==0.3.2 -zipp==3.20.2 From 56328cf07b82aece6d4ebb3eda62bb8870e7fb0c Mon Sep 17 00:00:00 2001 From: Zach Burnett Date: Tue, 24 Sep 2024 09:01:29 -0400 Subject: [PATCH 4/6] [docs] add new steps to pull request checklist as change fragment types (#8824) --- .github/pull_request_template.md | 143 ++++++++++++++++--------------- 1 file changed, 73 insertions(+), 70 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a7f4eabf61..67aaee60b1 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -23,78 +23,81 @@ This PR addresses ...
news fragment change types... - - ``changes/.general.rst``: infrastructure or miscellaneous change - - ``changes/.docs.rst`` - - ``changes/.stpipe.rst`` - - ``changes/.datamodels.rst`` - - ``changes/.scripts.rst`` - - ``changes/.fits_generator.rst`` - - ``changes/.set_telescope_pointing.rst`` +- ``changes/.general.rst``: infrastructure or miscellaneous change +- ``changes/.docs.rst`` +- ``changes/.stpipe.rst`` +- ``changes/.datamodels.rst`` +- ``changes/.scripts.rst`` +- ``changes/.fits_generator.rst`` +- ``changes/.set_telescope_pointing.rst`` +- ``changes/.pipeline.rst`` - ## stage 1 - - ``changes/.group_scale.rst`` - - ``changes/.dq_init.rst`` - - ``changes/.emicorr.rst`` - - ``changes/.saturation.rst`` - - ``changes/.ipc.rst`` - - ``changes/.firstframe.rst`` - - ``changes/.lastframe.rst`` - - ``changes/.reset.rst`` - - ``changes/.superbias.rst`` - - ``changes/.refpix.rst`` - - ``changes/.linearity.rst`` - - ``changes/.rscd.rst`` - - ``changes/.persistence.rst`` - - ``changes/.dark_current.rst`` - - ``changes/.charge_migration.rst`` - - ``changes/.jump.rst`` - - ``changes/.ramp_fitting.rst`` - - ``changes/.gain_scale.rst`` +## stage 1 +- ``changes/.group_scale.rst`` +- ``changes/.dq_init.rst`` +- ``changes/.emicorr.rst`` +- ``changes/.saturation.rst`` +- ``changes/.ipc.rst`` +- ``changes/.firstframe.rst`` +- ``changes/.lastframe.rst`` +- ``changes/.reset.rst`` +- ``changes/.superbias.rst`` +- ``changes/.refpix.rst`` +- ``changes/.linearity.rst`` +- ``changes/.rscd.rst`` +- ``changes/.persistence.rst`` +- ``changes/.dark_current.rst`` +- ``changes/.charge_migration.rst`` +- ``changes/.jump.rst`` +- ``changes/.clean_flicker_noise.rst`` +- ``changes/.ramp_fitting.rst`` +- ``changes/.gain_scale.rst`` - ## stage 2 - - ``changes/.assign_wcs.rst`` - - ``changes/.msaflagopen.rst`` - - ``changes/.nsclean.rst`` - - ``changes/.imprint.rst`` - - ``changes/.background.rst`` - - ``changes/.extract_2d.rst`` - - ``changes/.master_background.rst`` - - ``changes/.wavecorr.rst`` - - ``changes/.srctype.rst`` - - ``changes/.straylight.rst`` - - ``changes/.wfss_contam.rst`` - - ``changes/.flatfield.rst`` - - ``changes/.fringe.rst`` - - ``changes/.pathloss.rst`` - - ``changes/.barshadow.rst`` - - ``changes/.photom.rst`` - - ``changes/.pixel_replace.rst`` - - ``changes/.resample_spec.rst`` - - ``changes/.residual_fringe.rst`` - - ``changes/.cube_build.rst`` - - ``changes/.extract_1d.rst`` - - ``changes/.resample.rst`` +## stage 2 +- ``changes/.assign_wcs.rst`` +- ``changes/.badpix_selfcal.rst`` +- ``changes/.msaflagopen.rst`` +- ``changes/.nsclean.rst`` +- ``changes/.imprint.rst`` +- ``changes/.background.rst`` +- ``changes/.extract_2d.rst`` +- ``changes/.master_background.rst`` +- ``changes/.wavecorr.rst`` +- ``changes/.srctype.rst`` +- ``changes/.straylight.rst`` +- ``changes/.wfss_contam.rst`` +- ``changes/.flatfield.rst`` +- ``changes/.fringe.rst`` +- ``changes/.pathloss.rst`` +- ``changes/.barshadow.rst`` +- ``changes/.photom.rst`` +- ``changes/.pixel_replace.rst`` +- ``changes/.resample_spec.rst`` +- ``changes/.residual_fringe.rst`` +- ``changes/.cube_build.rst`` +- ``changes/.extract_1d.rst`` +- ``changes/.resample.rst`` - ## stage 3 - - ``changes/.assign_mtwcs.rst`` - - ``changes/.mrs_imatch.rst`` - - ``changes/.tweakreg.rst`` - - ``changes/.skymatch.rst`` - - ``changes/.exp_to_source.rst`` - - ``changes/.outlier_detection.rst`` - - ``changes/.tso_photometry.rst`` - - ``changes/.stack_refs.rst`` - - ``changes/.align_refs.rst`` - - ``changes/.klip.rst`` - - ``changes/.spectral_leak.rst`` - - ``changes/.source_catalog.rst`` - - ``changes/.combine_1d.rst`` - - ``changes/.ami.rst`` +## stage 3 +- ``changes/.assign_mtwcs.rst`` +- ``changes/.mrs_imatch.rst`` +- ``changes/.tweakreg.rst`` +- ``changes/.skymatch.rst`` +- ``changes/.exp_to_source.rst`` +- ``changes/.outlier_detection.rst`` +- ``changes/.tso_photometry.rst`` +- ``changes/.stack_refs.rst`` +- ``changes/.align_refs.rst`` +- ``changes/.klip.rst`` +- ``changes/.spectral_leak.rst`` +- ``changes/.source_catalog.rst`` +- ``changes/.combine_1d.rst`` +- ``changes/.ami.rst`` - ## other - - ``changes/.wfs_combine.rst`` - - ``changes/.white_light.rst`` - - ``changes/.cube_skymatch.rst`` - - ``changes/.engdb_tools.rst`` - - ``changes/.guider_cds.rst`` +## other +- ``changes/.wfs_combine.rst`` +- ``changes/.white_light.rst`` +- ``changes/.cube_skymatch.rst`` +- ``changes/.engdb_tools.rst`` +- ``changes/.guider_cds.rst``
From 8f3eccf48c8a4b76533986a96a9dc429c78898f2 Mon Sep 17 00:00:00 2001 From: Zach Burnett Date: Tue, 24 Sep 2024 09:24:26 -0400 Subject: [PATCH 5/6] add CI check that `CHANGES.rst` is not modified (#8827) --- .github/workflows/changelog.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index a6889ab407..508e6e295a 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -28,4 +28,13 @@ jobs: - 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 From 8091a35891e13feb7023e9317441632b3d3b5fb5 Mon Sep 17 00:00:00 2001 From: Tyler Pauly Date: Tue, 24 Sep 2024 14:04:34 -0400 Subject: [PATCH 6/6] Remove unnecessary test after pastasoss inclusion (#8825) --- jwst/regtest/test_niriss_soss.py | 33 -------------------------------- 1 file changed, 33 deletions(-) diff --git a/jwst/regtest/test_niriss_soss.py b/jwst/regtest/test_niriss_soss.py index ef9796d4fa..451b15adf7 100644 --- a/jwst/regtest/test_niriss_soss.py +++ b/jwst/regtest/test_niriss_soss.py @@ -126,24 +126,6 @@ def test_niriss_soss_extras(rtdata_module, run_atoca_extras, fitsdiff_default_kw assert diff.identical, diff.report() -@pytest.fixture(scope='module') -def run_extract1d_spsolve_failure(rtdata_module): - """ - Test coverage for fix to error thrown when spsolve fails to find - a good solution in ATOCA and needs to be replaced with a least- - squares solver. Note this failure is architecture-dependent - and also only trips for specific values of the transform parameters. - Pin tikfac for faster runtime. - """ - rtdata = rtdata_module - rtdata.get_data("niriss/soss/jw04098007001_04101_00001-seg003_nis_int01.fits") - args = ["extract_1d", rtdata.input, - "--soss_tikfac=3.1881637371089252e-15", - "--soss_transform=-0.00038201755227297866, -0.24237455427848956, 0.5404013401742825", - ] - Step.from_cmdline(args) - - @pytest.fixture(scope='module') def run_extract1d_null_order2(rtdata_module): """ @@ -156,25 +138,10 @@ def run_extract1d_null_order2(rtdata_module): rtdata.get_data("niriss/soss/jw01201008001_04101_00001-seg003_nis_int72.fits") args = ["extract_1d", rtdata.input, "--soss_tikfac=4.290665733550672e-17", - "--soss_transform=0.0794900761418923, -1.3197790951056494, -0.796875809148081", ] Step.from_cmdline(args) -@pytest.mark.bigdata -def test_extract1d_spsolve_failure(rtdata_module, run_extract1d_spsolve_failure, fitsdiff_default_kwargs): - - rtdata = rtdata_module - - output = "jw04098007001_04101_00001-seg003_nis_int01_extract1dstep.fits" - rtdata.output = output - - rtdata.get_truth(f"truth/test_niriss_soss_stages/{output}") - - diff = FITSDiff(rtdata.output, rtdata.truth, **fitsdiff_default_kwargs) - assert diff.identical, diff.report() - - @pytest.mark.bigdata def test_extract1d_null_order2(rtdata_module, run_extract1d_null_order2, fitsdiff_default_kwargs):