From 8ad7c74906688f7ddb8c4e89f6726b0b4318605d Mon Sep 17 00:00:00 2001 From: Romain Hugonnet Date: Fri, 8 Sep 2023 16:07:06 -0700 Subject: [PATCH] Minor a posteriori fixes on recent PRs (#433) * Remove duplicate all_coregs * Rename master in main * Clarify how to install warning --- HOW_TO_RELEASE.md | 24 ++++++++++++------------ doc/source/how_to_install.md | 2 +- tests/test_coreg/test_base.py | 9 --------- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/HOW_TO_RELEASE.md b/HOW_TO_RELEASE.md index b8b1bdfd..98578b6d 100644 --- a/HOW_TO_RELEASE.md +++ b/HOW_TO_RELEASE.md @@ -21,8 +21,8 @@ An automatic GitHub action will start to push and publish the new release to PyP ### The hard way - 1. Go to your local main repository (not the fork) and ensure your master branch is synced: - git checkout master + 1. Go to your local main repository (not the fork) and ensure your main branch is synced: + git checkout main git pull 2. Look over whats-new.rst and the docs. Make sure "What's New" is complete (check the date!) and add a brief summary note describing the release at the @@ -30,7 +30,7 @@ An automatic GitHub action will start to push and publish the new release to PyP 3. If you have any doubts, run the full test suite one final time! pytest --run-slow --mpl . 4. Increment the version number "FULLVERSION" in setup.py for PyPI and conda. - 5. On the master branch, commit the release in git: + 5. On the main branch, commit the release in git: git commit -a -m 'Release v1.X.Y' 6. Tag the release: git tag -a v1.X.Y -m 'v1.X.Y' @@ -42,22 +42,22 @@ An automatic GitHub action will start to push and publish the new release to PyP twine upload dist/xdem-1.X.Y* You will need to be listed as a package owner at https://pypi.python.org/pypi/xdem for this to work. - 9. Push your changes to master: - git push origin master + 9. Push your changes to main: + git push origin main git push origin --tags - 10. Update the stable branch (used by ReadTheDocs) and switch back to master: + 10. Update the stable branch (used by ReadTheDocs) and switch back to main: git checkout stable - git rebase master + git rebase main git push origin stable - git checkout master + git checkout main It's OK to force push to 'stable' if necessary. We also update the stable branch with `git cherrypick` for documentation only fixes that apply the current released version. 11. Add a section for the next release (v.X.(Y+1)) to doc/whats-new.rst. - 12. Commit your changes and push to master again: + 12. Commit your changes and push to main again: git commit -a -m 'Revert to dev version' - git push origin master - You're done pushing to master! + git push origin main + You're done pushing to main! 13. Issue the release on GitHub. Click on "Draft a new release" at https://github.com/xdem/releases. Type in the version number, but don't bother to describe it -- we maintain that on the docs instead. @@ -102,7 +102,7 @@ Then, follow these steps for `NEW_VERSION` (substitute with the actual version n >>> git add -u && git commit -m "Updated version to NEW_VERSION" # Or whatever you want to tell us :) ->>> git push -u origin master +>>> git push -u origin main ``` An alternative solution to get the sha256sum is to run `sha256sum` on the release file downloaded from GitHub diff --git a/doc/source/how_to_install.md b/doc/source/how_to_install.md index 3b1e9bf4..f55c16f3 100644 --- a/doc/source/how_to_install.md +++ b/doc/source/how_to_install.md @@ -35,7 +35,7 @@ pip install xdem ``` ```{warning} -Updating packages with `pip` (and sometimes `mamba`) can break your installation. If this happens, re-create an environment from scratch fixing directly all your dependencies. +Updating packages with `pip` (and sometimes `mamba`) can break your installation. If this happens, re-create an environment from scratch pinning directly all your other dependencies during initial solve (e.g., `mamba create -n xdem-env -c conda-forge xdem myotherpackage==1.0.0`). ``` ## Installing for contributors diff --git a/tests/test_coreg/test_base.py b/tests/test_coreg/test_base.py index c403b98a..5d75658b 100644 --- a/tests/test_coreg/test_base.py +++ b/tests/test_coreg/test_base.py @@ -486,15 +486,6 @@ def test_pipeline_combinations__nobiasvar(self, coreg1: Coreg, coreg2: Coreg) -> aligned_dem, _ = pipeline.apply(self.tba.data, transform=self.ref.transform, crs=self.ref.crs) assert aligned_dem.shape == self.ref.data.squeeze().shape - all_coregs = [ - coreg.VerticalShift(), - coreg.NuthKaab(), - coreg.ICP(), - coreg.Deramp(), - coreg.TerrainBias(), - coreg.DirectionalBias(), - ] - @pytest.mark.parametrize("coreg1", all_coregs) # type: ignore @pytest.mark.parametrize( "coreg2",