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