Skip to content

Commit

Permalink
Merge branch 'OSGeo:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
a0x8o authored Dec 5, 2023
2 parents da38f23 + 4b6dcb9 commit c765729
Show file tree
Hide file tree
Showing 28 changed files with 2,469 additions and 103 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build_ubuntu-22.04.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ fi
# an old version of configure, which issues compiler warnings and
# errors out. This may be removed with upgraded configure.in file.
makecmd="make"
if [[ "$#" -eq 2 ]]; then
makecmd="make CFLAGS='$CFLAGS $2' CXXFLAGS='$CXXFLAGS $2'"
if [[ "$#" -ge 2 ]]; then
ARGS=("$@")
makecmd="make CFLAGS='$CFLAGS ${ARGS[@]:1}' CXXFLAGS='$CXXFLAGS ${ARGS[@]:1}'"
fi

# non-existent variables as an errors
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,6 @@ jobs:
CFLAGS: -std=${{ matrix.c }} -fPIC -Wall -Wextra
# TODO: -pedantic-errors here won't compile
CXXFLAGS: -std=${{ matrix.cpp }} -fPIC -Wall -Wextra
run: .github/workflows/build_ubuntu-22.04.sh $HOME/install -Werror
run: |
.github/workflows/build_ubuntu-22.04.sh $HOME/install \
-isystem/usr/include/gdal -Wpedantic -Werror
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
channels: conda-forge
miniforge-variant: Mambaforge
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/macos_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ CONFIGURE_FLAGS="\
--with-readline-libs=${CONDA_PREFIX}/lib
"

export CFLAGS="-O2 -pipe -arch ${CONDA_ARCH} -DGL_SILENCE_DEPRECATION -Wall -Wextra"
export CXXFLAGS="-O2 -pipe -stdlib=libc++ -arch ${CONDA_ARCH} -Wall -Wextra"
export CFLAGS="-O2 -pipe -arch ${CONDA_ARCH} -DGL_SILENCE_DEPRECATION -Wall -Wextra -Wpedantic"
export CXXFLAGS="-O2 -pipe -stdlib=libc++ -arch ${CONDA_ARCH} -Wall -Wextra -Wpedantic"
export CPPFLAGS="-isystem${CONDA_PREFIX}/include"

./configure $CONFIGURE_FLAGS

EXEMPT="-Wno-error=deprecated-non-prototype"
EXEMPT="-Wno-error=deprecated-non-prototype -Wno-error=strict-prototypes"
make -j$(sysctl -n hw.ncpu) CFLAGS="$CFLAGS -Werror $EXEMPT" \
CXXFLAGS="$CXXFLAGS -Werror $EXEMPT"

Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/periodic_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Periodic update

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API, or on a schedule.
on:
workflow_dispatch:
schedule:
# At 10:32 on every first Wednesday of the month.
# See https://crontab.guru/#32_10_*/100,1-7_*_WED
- cron: "32 10 */100,1-7 * WED"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
update-configure:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Create URL to the run output
id: vars
run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: "Check that autoconf scripts are up-to-date:"
run: |
rm -f config.guess config.sub
wget http://git.savannah.gnu.org/cgit/config.git/plain/config.guess
wget http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
# Display changes, only to follow along in the logs.
- run: git diff config.guess config.sub
- name: Double check if files are modified
run: git status --ignored
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
with:
commit-message: "config.guess + config.sub: updated from http://git.savannah.gnu.org/cgit/config.git/plain/"
branch: periodic/update-configure
title: "configure: update to latest config.guess and config.sub"
body: |
This updates config.guess and config.sub to their latest versions.
If the two files are deleted in this PR, please check the logs of the workflow here:
[Workflow run summary](${{ steps.vars.outputs.run-url }})
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
- name: Check outputs
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
5 changes: 3 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install non-Python dependencies
run: |
Expand All @@ -49,7 +50,7 @@ jobs:
python -m pip install --upgrade pip
pip install -r .github/workflows/python_requirements.txt
pip install -r .github/workflows/optional_requirements.txt
pip install pytest pytest-timeout pytest-github-actions-annotate-failures
pip install pytest pytest-timeout pytest-github-actions-annotate-failures pytest-xdist
- name: Create installation directory
run: |
Expand All @@ -73,7 +74,7 @@ jobs:
run: |
export PYTHONPATH=`grass --config python_path`:$PYTHONPATH
export LD_LIBRARY_PATH=$HOME/install/grass84/lib:$LD_LIBRARY_PATH
pytest .
pytest --numprocesses auto .
- name: Print installed versions
if: always()
Expand Down
103 changes: 57 additions & 46 deletions doc/howto_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ _Note: Some later steps in this text are to be done by the development coordinat
Update your remotes and switch to branch:

```bash
git fetch --all --prune && git checkout releasebranch_8_4
git fetch --prune upstream && git checkout releasebranch_8_4
```

Confirm that you are on the right branch and have no local changes
Expand All @@ -33,30 +33,33 @@ git diff
git diff --staged
# Should give no output:
git log upstream/releasebranch_8_4..HEAD
# Should give the same as last commits visible on GitHub:
# There should be no commits which are not visible on GitHub:
git log --max-count=5
```

Now you can merge (or rebase) updates from the remote your local branch
and optionally update your own fork:
Now you can rebase updates from the remote your local branch.
Above, you confirmed you have no local commits, so this should happen
without rebasing any local commits, i.e., it should just add the new commits:

```bash
git merge upstream/releasebranch_8_4 && git push origin releasebranch_8_4
git rebase upstream/releasebranch_8_4
```

Verify the result:

```bash
# Should give no output:
git log upstream/releasebranch_8_4..HEAD
# Should give the same as last commits visible on GitHub:
git log HEAD..upstream/releasebranch_8_4
# Should give exactly the same as last commits visible on GitHub:
git log --max-count=5
```

Now or any time later, you can use `git log` and `git show` to see the latest
commits and the last commit including the changes.
Now or any time later, you can use `git status`, `git log`, and `git show`
to see a branch, latest commits and a last commit including the changes.

```bash
git status
git log --max-count=5
git show
```
Expand Down Expand Up @@ -334,13 +337,13 @@ md5sum grass-${VERSION}.tar.gz > grass-${VERSION}.md5sum

### Upload source code tarball to OSGeo servers

Note: servers 'osgeo7-grass' and 'osgeo7-download' only reachable via
Note: servers 'osgeo8-grass' and 'osgeo7-download' only reachable via
jumphost (managed by OSGeo-SAC) - see <https://wiki.osgeo.org/wiki/SAC_Service_Status#grass>

```bash
# Store the source tarball (twice) in (use scp -p FILES grass:):
USER=neteler
SERVER1=osgeo7-grass
SERVER1=osgeo8-grass
SERVER1DIR=/var/www/code_and_data/grass$MAJOR$MINOR/source/
SERVER2=osgeo7-download
SERVER2DIR=/osgeo/download/grass/grass$MAJOR$MINOR/source/
Expand Down Expand Up @@ -371,13 +374,13 @@ For final minor and major releases (not release candidates and micro releases),
update `grass-stable` redirect at `osgeo7-grass`:

```bash
sudo vim /etc/apache2/sites-enabled/000-default.conf`
sudo vim /etc/apache2/sites-enabled/000-default.conf
```

Load the new configuration:

```bash
sudo systemctl reload apache2`
sudo systemctl reload apache2
```

For new branches: Update `grass-devel` using the steps above.
Expand Down Expand Up @@ -421,51 +424,64 @@ Release is done.

## Improve release description

For final releases only, go to Zenodo.org a get a Markdown badge for the release
which Zenodo creates with a DOI for the published release.
For final releases only, go to [Zenodo](https://doi.org/10.5281/zenodo.5176030)
and get a Markdown badge for the release which Zenodo creates with a DOI
for the published release.

For all releases, click the Binder badge to get Binder to build. Use it to test
it and to cache the built image. Add more links to (or badges for) more notebooks
if there are any which show well specific features added or updated in the release.

## Create entries for the new release

### Trac Wiki release page entry
## Create various entries for the new release

Add entry in <https://trac.osgeo.org/grass/wiki/Release>
### Cron jobs

### Update Hugo web site and other pages to show the new version
Only in case of major releases:

For a (final) release (not release candidate), write announcement and publish it:
- update '[cronjob(s)](https://github.com/OSGeo/grass-addons/tree/grass8/utils/cronjobs_osgeo_lxd/)'
on grass.osgeo.org to next but one release tag for the differences

- News section, <https://github.com/OSGeo/grass-website/tree/master/content/news>
### Update Hugo web site

Increment the GRASS GIS version in
Update website only for final releases (not release candidates). Submit the changes
in a single PR.

- <https://github.com/OSGeo/grass-website/blob/master/data/grass.json>
- <https://github.com/OSGeo/grass-website/blob/master/content/about/history/releases.md>

Update the version in the Wiki page: <https://grasswiki.osgeo.org/wiki/GRASS-Wiki>

Subsequently, verify the software pages:
Software pages:

- Linux: <https://github.com/OSGeo/grass-website/blob/master/content/download/linux.en.md>
- Windows: <https://github.com/OSGeo/grass-website/blob/master/content/download/windows.en.md>
- Mac: <https://github.com/OSGeo/grass-website/blob/master/content/download/mac.en.md>
- Releases: <https://github.com/OSGeo/grass-website/blob/master/content/about/history/releases.md>
- Website variables: <https://github.com/OSGeo/grass-website/blob/master/data/grass.json>

### Only in case of new major release
Write announcement and publish it:

- update '[cronjob(s)](https://github.com/OSGeo/grass-addons/tree/grass8/utils/cronjobs_osgeo_lxd/)'
on grass.osgeo.org to next but one release tag for the differences
- wiki updates, only when new major release:
- News section: <https://github.com/OSGeo/grass-website/tree/master/content/news>

### GRASS Wiki

For final releases (not release candidates), update the last version
on the main page:

- Wiki: <https://grasswiki.osgeo.org/wiki/GRASS-Wiki>

- For major release only:
- {{cmd|xxxx}} macro: <https://grasswiki.osgeo.org/wiki/Template:Cmd>
- update last version on main page

### Trac wiki

For all releases:

- Add link to GitHub release page to <https://trac.osgeo.org/grass/wiki/Release>

For major and minor releases:

- Add trac Wiki Macro definitions for manual pages G8X:modulename
- Edit: <https://trac.osgeo.org/grass/wiki/InterMapTxt>

## Packaging notes
## WinGRASS notes

### WinGRASS notes
For new branches and final releases (see additional instructions in the repo):

- Go to <https://github.com/landam/wingrass-maintenance-scripts/>
- Update grass_packager_release.bat, eg.
Expand All @@ -488,11 +504,6 @@ Subsequently, verify the software pages:
copy_addon 840RC1 8.4.0RC1
```

### Ubuntu Launchpad notes

- Create milestone and release: <https://launchpad.net/grass/+series>
- Upload tarball for created release

### Update grass.osgeo.org

These updates are for final releases only.
Expand All @@ -517,21 +528,21 @@ Add release to history page:

## Tell others about release

- If release candidate (send just a short invitation to test):
- <grass-announce@lists.osgeo.org>
- If release candidate (just a short invitation to test):
- <grass-dev@lists.osgeo.org>
- <grass-user@lists.osgeo.org>

If final release, send out an announcement (press release) which is a shortened
version of release desciption and website news item (under `/announces/`).
If final release, send out an announcement (press release)
which is a shortened version of release desciption and website news item.
Note: Do not use relative links.

- Our main mailing lists:
- <https://lists.osgeo.org/mailman/listinfo/grass-announce> | <grass-announce@lists.osgeo.org>
(ask a development coordinator to be added)
- <https://lists.osgeo.org/mailman/listinfo/grass-dev> | <grass-dev@lists.osgeo.org>
- <https://lists.osgeo.org/mailman/listinfo/grass-user> | <grass-user@lists.osgeo.org>
- OSGeo.org: <news_item@osgeo.org>, <info@osgeo.org> (send an email, then it
will be approved)
- OSGeo.org: <news_item@osgeo.org>, <info@osgeo.org>
(send an email, then it will be approved)

Via web and social media:

Expand Down
3 changes: 2 additions & 1 deletion gui/wxpython/lmgr/layertree.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ def __init__(
# when some layers are not visible in layer tree
# self.SetAutoLayout(True)
self.SetGradientStyle(1)
self.EnableSelectionGradient(True)
if sys.platform != "darwin":
self.EnableSelectionGradient(True)
self._setGradient()

# init associated map display
Expand Down
14 changes: 14 additions & 0 deletions gui/wxpython/main_window/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ def show_menu_errors(messages):

self._show_demo_map()

def _repaintLayersPaneMapDisplayToolbar(self):
"""Repaint Layers pane map display toolbar widget on the wxMac"""
if sys.platform == "darwin":
wx.CallLater(100, self.notebookLayers.Refresh)

def _setTitle(self):
"""Set frame title"""
gisenv = grass.gisenv()
Expand Down Expand Up @@ -338,6 +343,7 @@ def _createDisplay(self, parent):
# bindings
self.notebookLayers.Bind(FN.EVT_FLATNOTEBOOK_PAGE_CHANGED, self.OnCBPageChanged)
self.notebookLayers.Bind(FN.EVT_FLATNOTEBOOK_PAGE_CLOSING, self.OnCBPageClosing)
self.notebookLayers.Bind(FN.EVT_FLATNOTEBOOK_PAGE_CLOSED, self.OnCBPageClosed)

def _createSearchModule(self, parent):
"""Initialize Search module widget"""
Expand Down Expand Up @@ -480,6 +486,8 @@ def CreateNewMapDisplay(giface, layertree):
cb_boxsizer.Fit(self.GetLayerTree())
self.currentPage.Layout()
self.GetLayerTree().Layout()
# Repaint Layers pane map display toolbar widget on the wxMac
self._repaintLayersPaneMapDisplayToolbar()

self.displayIndex += 1

Expand Down Expand Up @@ -955,6 +963,12 @@ def OnCBPageChanged(self, event):

event.Skip()

def OnCBPageClosed(self, event):
"""Page of notebook has been closed from the Layers pane via x
button or via closing map display notebook page"""
# Repaint Layers pane map display toolbar widget on the wxMac
self._repaintLayersPaneMapDisplayToolbar()

def OnCBPageClosing(self, event):
"""Page of notebook is being closed
from Layer Manager (x button next to arrows)
Expand Down
Loading

0 comments on commit c765729

Please sign in to comment.