Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] first version of t.vi #523

Closed
wants to merge 124 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
45bead8
draft version of t.vi
lucadelu May 3, 2021
253de78
run black version 20.8b1
lucadelu May 3, 2021
40821b7
README.md: Markdown standardization (#522)
pesekon2 May 3, 2021
0241a98
t.rast.what.aggr added new options (#511)
lucadelu May 6, 2021
6ba631d
Use open() for opening files, Python 3 update (#521)
nilason May 7, 2021
cfd75f7
i.ann.maskrcnn: specify the required version of TensorFlow
pesekon2 May 10, 2021
8d68f72
r.centroids testsuite (#519)
chaedri May 12, 2021
b5ca85a
i.sentinel.download: try/except tqdm import (#529)
neteler May 14, 2021
a768cd3
Lazy import of pandas for windows build
stevenpawley May 15, 2021
bbcd818
r.green: Python, Makefile and manual fixes (#513)
neteler May 16, 2021
eb16594
i.sentinel.import manual: minor HTML fix
neteler May 25, 2021
4c52a53
r.vol.dem: fix Boolean types (#531)
neteler May 25, 2021
9c51da1
i.segment.uspo: fix typo in option name as reported in #532 (#533)
veroandreo May 27, 2021
b31f632
cronjobs: update to GRASS GIS 8.0.dev in core repo (#534)
neteler May 31, 2021
71820ee
Web site organisation section added
neteler May 31, 2021
bf698a0
Bug fix for lazy import of pandas
stevenpawley Jun 3, 2021
baa7964
CI: fix link creation for GRASS GIS 8 (#538)
neteler Jun 5, 2021
3aa2b16
Update r.exdet.py
Jun 13, 2021
b000962
v.rast.bufferstats: fix buffer around areas, typo and use_label (#544)
ninsbl Jun 13, 2021
f59b09c
cron_job_list_grass: fix log file directory
neteler Jun 13, 2021
99c1c95
cron_job_list_grass: use .txt extension for build.log
neteler Jun 13, 2021
304ecaf
r.colors.out_sld.html: typos fixed an minor cosmetics
neteler Jun 14, 2021
0c7444a
Add g.projpicker (#543)
HuidaeCho Jun 14, 2021
c9d6546
i.modis manual: add missing products (#547)
neteler Jun 15, 2021
9f443a3
g.projpicker: Lazy import projpicker (#551)
HuidaeCho Jun 16, 2021
e91a05c
g.projpicker: CRS => projection (#552)
HuidaeCho Jun 16, 2021
be226b9
Do not try to create a degree vector in a non-degree mapset; Add prog…
HuidaeCho Jun 16, 2021
5ef2bf8
Apply black -l 80 (#554)
HuidaeCho Jun 16, 2021
2d40953
i.modis: switch collection from v006 to v061 (#548)
neteler Jun 16, 2021
81b1242
i.modis.download: more reasonable error handling (#549)
neteler Jun 16, 2021
ed2735c
r.extract: fix AttributeError 'append_random' (#550)
neteler Jun 16, 2021
73930a3
g.projpicker: Typo in the manual (#555)
HuidaeCho Jun 17, 2021
a5af649
g.projpicker: x and y => east and north (#557)
HuidaeCho Jun 17, 2021
6bcda5a
Apply Black (#537)
wenzeslaus Jun 18, 2021
ea20f58
Use requires rules rather than exclu(de|sive) to make intentions clea…
HuidaeCho Jun 18, 2021
713e0c4
g.projpicker: Add error message if projpicker not found on system. (#…
Jun 22, 2021
b72a782
Reapply black without any options (#560)
HuidaeCho Jun 22, 2021
36ca6ad
g.projpicker: Reapply black (#561)
HuidaeCho Jun 23, 2021
6b93622
Add i.gabor (#545)
ocsmit Jun 24, 2021
67a5d3e
Add more explanations about quotes; Tabs to spaces; Add a period in t…
HuidaeCho Jun 24, 2021
fdf8c90
g.projpicker: as a single string from the command line (#563)
HuidaeCho Jun 24, 2021
54010b4
Fix compilation of addon manuals for Windows (#524)
ninsbl Jun 24, 2021
dfc351d
g.projpicker: Typos in the manual; Shapefile => shapefile (#564)
HuidaeCho Jun 25, 2021
26353ab
v.rast.bufferstats: add tests (#556)
ninsbl Jun 25, 2021
1cfc0af
Change to new v7 and v8 structure (#571)
wenzeslaus Jun 28, 2021
050be44
t.rast.patch manual: mention t.merge
neteler Jun 29, 2021
9fbbabe
t.info.iso manual: minimal content added (#570)
neteler Jun 28, 2021
c967a5b
r.stream.*: Avoid comparing floating point numbers using not equal (#…
HuidaeCho Jun 28, 2021
9ac5658
r.basin: g.region using raster to set the correct resolution (#568)
HuidaeCho Jun 28, 2021
516f1d3
added t.vi documentation
lucadelu Jul 5, 2021
9f972ce
r.sim.terrain: bugfix, refactoring, docs (#578)
baharmon Jul 6, 2021
69634b6
Update grass7/temporal/t.vi/t.vi.html
lucadelu Jul 8, 2021
00c7ae4
Update grass7/temporal/t.vi/t.vi.html
lucadelu Jul 8, 2021
76154d3
Update grass7/temporal/t.vi/t.vi.html
lucadelu Jul 8, 2021
cfe51b8
Update grass7/temporal/t.vi/t.vi.py
lucadelu Jul 8, 2021
f38c811
Update grass7/temporal/t.vi/t.vi.py
lucadelu Jul 8, 2021
5ebc034
rename t.vi as t.rast.vi
lucadelu Jul 8, 2021
a243974
fixed output name with the right vegetation index name
lucadelu Jul 8, 2021
ba971fb
running black 20.8b1
lucadelu Jul 8, 2021
761ff2d
g.projpicker: More information about XOR (#582)
HuidaeCho Jul 8, 2021
c030f9c
g.projpicker: tabs to spaces (#583)
HuidaeCho Jul 8, 2021
a42fbe9
g.projpicker: Add one more XOR example (#584)
HuidaeCho Jul 8, 2021
9bc43bc
g.projpicker: multiple geometries in query now handled by ProjPicker …
HuidaeCho Jul 9, 2021
4119fcc
r.suitability.regions: New addon for suitability scores (#576)
Jul 10, 2021
b0e4c7e
r.convergence: fixed typos in manual page
baharmon Jul 12, 2021
9925460
g.download.location: Add path option for compatibility with core modu…
wenzeslaus Jul 13, 2021
485c6a6
g.projpicker: Document geometry variables and multiple items in one l…
HuidaeCho Jul 13, 2021
8ee4e1d
g.projpicker: Now multiple items in a single line are handled by Proj…
HuidaeCho Jul 13, 2021
16e40e8
g.projpicker: Add a GUI image and fix links to the docs (#589)
HuidaeCho Jul 17, 2021
d04c7b7
g.projpicker: Add a GUI image (oops!) (#590)
HuidaeCho Jul 17, 2021
b779073
g.projpicker: Support for GUI without command line queries (#592)
HuidaeCho Jul 18, 2021
68f7373
g.projpicker: Update GUI screenshot (#595)
HuidaeCho Jul 19, 2021
e27518e
CI: Install g.download.location only if needed (#591)
wenzeslaus Jul 19, 2021
038a0fe
r.vif: small fix python 2 left-over code (#594)
Jul 20, 2021
851e9b7
r.suitability.regions: added percentile threshold and compactness opt…
Jul 20, 2021
016c28e
Update r.suitability.regions.html
Jul 25, 2021
4a543dc
Update contributing file to master to grass7 switch (#599)
wenzeslaus Aug 22, 2021
e15af67
Update name of core branch from master to main (#598)
wenzeslaus Aug 22, 2021
f993f2f
Create new addon r.area.createweight (#597)
CharlotteFlasse Aug 23, 2021
a0e4e4e
r.colors.out_sld.html: fix typo in example
juleshaas Aug 23, 2021
8a4bb72
Update v.mrmr.html
Aug 24, 2021
d44c97c
Update r.meb.html
Aug 24, 2021
18fc100
Update r.meb.py
Aug 24, 2021
673e2bf
Update r_area_createweight.html
Aug 25, 2021
7540633
i.sentinel.import: Improved cloud masking (#577)
fkroeber Aug 27, 2021
81f7291
g.projpicker: Update to the latest projpicker version (#603)
HuidaeCho Aug 31, 2021
b8c5275
g.projpicker: Update comment (#604)
HuidaeCho Aug 31, 2021
78e390f
i.landsat.download: add limit option (#605)
griembauer Sep 1, 2021
31cd7ae
add v.greedycolors (#608)
metzm Sep 9, 2021
bff63a4
r.valley.bottom compatibility with r.neighbors for grass8
stevenpawley Sep 19, 2021
34508e3
r.valley.bottom fix black formatting errors
stevenpawley Sep 20, 2021
fb049de
r.valley.bottom black changes
stevenpawley Sep 20, 2021
0e26601
wxGUI/wx.metadata: fix lazy import of GRASS GIS wxPy 'core.gcmd', 'gu…
tmszi Sep 25, 2021
a79f43b
CI: Use only one Flake8 job (#617)
wenzeslaus Oct 3, 2021
702671d
Fixed Typo (#624)
geomatik Oct 6, 2021
87771d7
CI: Add Super-Linter (#618)
wenzeslaus Oct 7, 2021
f7e5005
i.sentinel.download: add support for Sentinel-3 (#609)
ninsbl Oct 15, 2021
69e392c
i.sentinel.download: Download from GCS without settings file (#621)
griembauer Oct 22, 2021
e242ad6
r.area.createweight: Rename Makefile (#626)
ninsbl Oct 25, 2021
1c47ae9
Update r.category.trim.py (#629)
ecodiv Oct 31, 2021
1a9c817
r.futures: v2.2.0 update (#628)
petrasovaa Nov 1, 2021
b7db8e4
manual: Fix typo: v.centroid --> v.centroids
neteler Nov 10, 2021
c015f7c
v.greedycolors: fix if neighboring areas have the same cat (#634)
metzm Nov 12, 2021
2304bec
r.in.usgs: Improve text and placement of messages (#632)
wenzeslaus Nov 13, 2021
5d7d1e2
v.rast.bufferstast manual: minor fixes (#633)
veroandreo Nov 23, 2021
7c25cc8
d.region.grid: Add new tool to display grids (#635)
wenzeslaus Nov 24, 2021
5cc475b
r.in.usgs: Split memory amount, keep extracted files (#631)
wenzeslaus Nov 24, 2021
6f7667e
r.in.usgs: Use system user cache dir (#630)
wenzeslaus Nov 24, 2021
c1d027f
fix addons broken due to GRASS 8 modules API
pesekon2 Dec 6, 2021
17c5eb3
Update to grass8 branch in contributing and readme (#636)
wenzeslaus Dec 7, 2021
aa08858
CI: Test with v8.0 in grass8 branch (#640)
wenzeslaus Dec 7, 2021
17471c6
replace use of deprecated grass.script.array.read api calls (#622)
petrasovaa Dec 8, 2021
d052d00
rebase t.vi branch with grass8
lucadelu Dec 9, 2021
9414081
run black version 20.8b1
lucadelu May 3, 2021
ad3d6ee
added html file
lucadelu Dec 9, 2021
5f3100d
Update grass7/temporal/t.vi/t.vi.html
lucadelu Jul 8, 2021
bc496c7
Update grass7/temporal/t.vi/t.vi.html
lucadelu Jul 8, 2021
58275a6
Update grass7/temporal/t.vi/t.vi.html
lucadelu Jul 8, 2021
3dfb689
Update grass7/temporal/t.vi/t.vi.py
lucadelu Jul 8, 2021
9140577
Update grass7/temporal/t.vi/t.vi.py
lucadelu Jul 8, 2021
0450a7c
renamed t.vi to t.rast.vi
lucadelu Dec 9, 2021
a06e719
fixed output name with the right vegetation index name
lucadelu Jul 8, 2021
6a7cb74
running black 20.8b1
lucadelu Jul 8, 2021
5c82cc2
Merge branch 't.vi' of github.com:lucadelu/grass-addons into t.vi
lucadelu Dec 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
63 changes: 63 additions & 0 deletions .flake8
@@ -0,0 +1,63 @@
[flake8]
ignore =
E203, # whitespace before ':' (Black)
W503, # line break before binary operator (Black)
E265, # block comment should start with '# '
E266, # too many leading '#' for block comment
E402, # module level import not at top of file
E501, # line too long (161 > 150 characters)
E712, # comparison to False should be 'if cond is False:' or 'if not cond:'
E722, # do not use bare 'except'
E741, # ambiguous variable name 'l'
E999, # SyntaxError: invalid syntax
F401, # 'grass.script.core.gisenv' imported but unused
F402, # import 'ant' from line 15 shadowed by loop variable
F403, # 'from ... import *' used; unable to detect undefined names
F405, # '_' may be undefined, or defined from star imports: datetime
F507, # '...' % ... has 5 placeholder(s) but 7 substitution(s)
F509, # '...' % ... has unsupported format character '='
F521, # '...'.format(...) has invalid format string: Single '}' encountered in format string
F522, # '...'.format(...) has unused named argument(s): overwrite
F523, # '...'.format(...) has unused arguments at position(s): 0
F632, # use ==/!= to compare constant literals (str, bytes, int, float, tuple)
F811, # redefinition of unused 'GMessage' from line 35
F811, # redefinition of unused 'grass' from line 67
F811, # redefinition of unused 'test_getpenalty' from line 84
F811, # redefinition of unused 'transform' from line 153
F821, # undefined name '_'
F841, # local variable 'center' is assigned to but never used
W605, # invalid escape sequence '\_'


per-file-ignores =
src/display/d.frame/d.frame.py: E302
src/gui/wxpython/wx.wms/wmsmenu.py: W293
src/gui/wxpython/wx.wms/WMSMapDisplay.py: W29
src/gui/wxpython/wx.wms/parse.py: E101, W191
src/raster/r.landscape.evol.old/r.landscape.evol.old.py: E302
src/raster/r.object.spatialautocor/r.object.spatialautocor.py: E302
src/raster/r.roughness.vector/r.roughness.vector.py: E302
src/raster/r.recode.attr/r.recode.attr.py: E302
src/raster/r.centroids/testsuite/test_r_centroids.py: E302
src/raster/r.euro.ecosystem/r.euro.ecosystem.py: W293
src/raster/r.soillossbare/r.soillossbare.py: E101, W191
src/raster/r.basin/r.basin.py: E302
src/raster/r.denoise/r.denoise.py: E302
src/imagery/i.landsat8.swlst/csv_to_dictionary.py: E302
src/imagery/i.nightlights.intercalibration/i.nightlights.intercalibration.py: E302
src/imagery/i.nightlights.intercalibration/test_intercalibration_models.py: E302
src/imagery/i.landsat/i.landsat.download/i.landsat.download.py: E302
src/hadoop/hd/dependency.py: E211


max-line-length = 88
exclude =
.git,
__pycache__,
.env,
.venv,
env,
venv,
ENV,
env.bak,
venv.bak,
27 changes: 27 additions & 0 deletions .github/workflows/black.yml
@@ -0,0 +1,27 @@
name: Python Black Formatting

on:
- push
- pull_request

jobs:
run-black:
name: Check
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install
run: |
python -m pip install --upgrade pip
pip install black==21.5b1

- name: Run Black
run: |
black --check --diff .
20 changes: 11 additions & 9 deletions .github/workflows/ci.yml
Expand Up @@ -16,11 +16,13 @@ jobs:
strategy:
matrix:
grass-version:
- master
- releasebranch_7_8
- main
- releasebranch_8_0
python-version:
- 3.6
- 3.8
# Test with supported Python versions.
# Test only with every second version to reduce number of jobs.
- "3.8"
- "3.10"
fail-fast: false

steps:
Expand Down Expand Up @@ -75,13 +77,13 @@ jobs:
run: |
echo "$HOME/install/bin" >> $GITHUB_PATH

- name: Make simple grass command available
- name: Make simple grass command available (not needed in G8)
run: |
ln -s $HOME/install/bin/grass* $HOME/install/bin/grass
if [ ! -e $HOME/install/bin/grass ] ; then ln -s $HOME/install/bin/grass* $HOME/install/bin/grass ; fi

- name: Build addons
run: |
cd grass-addons/grass7
cd grass-addons/src
GRASS_INSTALL=$HOME/install/grass*
make MODULE_TOPDIR=$GRASS_INSTALL

Expand All @@ -101,12 +103,12 @@ jobs:

- name: Run tests
run: |
cd grass-addons/grass7
cd grass-addons/src
../.github/workflows/test.sh

- name: Make HTML test report available
uses: actions/upload-artifact@v2
with:
name: testreport-grass-${{ matrix.grass-version }}-python-${{ matrix.python-version }}
path: grass-addons/grass7/testreport
path: grass-addons/src/testreport
retention-days: 3
68 changes: 15 additions & 53 deletions .github/workflows/flake8.yml
@@ -1,64 +1,26 @@
name: Python Flake8 Code Quality

on:
- push
- pull_request
- push
- pull_request

jobs:

flake8-grass7-scripts:
name: ${{ matrix.directory }}
flake8:
runs-on: ubuntu-20.04
strategy:
matrix:
directory:
- grass7/db
- grass7/display
- grass7/general
- grass7/imagery
- grass7/misc
- grass7/raster
- grass7/raster3d
- grass7/temporal
- grass7/tools
- grass7/vector
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install
run: |
python -m pip install --upgrade pip
pip install flake8==3.8.4

- name: Run Flake8 in ${{ matrix.directory }}
run: |
cd ${{ matrix.directory }}
flake8 --config=../.flake8 --count --statistics --show-source --jobs=$(nproc) .
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

flake8-gui-wxgui:
name: grass7/gui
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install
run: |
python -m pip install --upgrade pip
pip install flake8==3.8.4

- name: Install
run: |
python -m pip install --upgrade pip
pip install flake8==3.8.4
- name: Run Flake8
# use own local flake8 settings file
run: |
cd grass7/gui/wxpython/
flake8 --config=./.flake8 --count --statistics --show-source --jobs=$(nproc) .
- name: Run Flake8
run: |
flake8 --count --statistics --show-source --jobs=$(nproc) .
32 changes: 32 additions & 0 deletions .github/workflows/super-linter.yml
@@ -0,0 +1,32 @@
name: General linting

on:
- push
- pull_request

jobs:
super-linter:
name: GitHub Super Linter

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Lint code base
uses: docker://github/super-linter:v2.2.2
env:
# Listed but disabled linters would be nice to have.
# Python (supported using Pylint) and C/C++ (not supported) are
# handled separately due to the complexity of the settings.
# (The rest is simply disabled automatically as of v2.)
VALIDATE_BASH: false
VALIDATE_CSS: false
VALIDATE_DOCKER: false
VALIDATE_JAVASCRIPT_ES: true
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_JSON: true
VALIDATE_MD: false
VALIDATE_PERL: false
VALIDATE_POWERSHELL: true
VALIDATE_XML: false
VALIDATE_YAML: true
9 changes: 6 additions & 3 deletions .github/workflows/test.sh
Expand Up @@ -3,10 +3,13 @@
# fail on non-zero return code from a subprocess
set -e

# Install module from addons if not available (in v7).
if ! grass --tmp-location XY --exec g.download.location --help; then
grass --tmp-location XY --exec \
g.extension g.download.location
fi
grass --tmp-location XY --exec \
g.extension g.download.location
grass --tmp-location XY --exec \
g.download.location url=https://grass.osgeo.org/sampledata/north_carolina/nc_spm_full_v2alpha2.tar.gz dbase=$HOME
g.download.location url=https://grass.osgeo.org/sampledata/north_carolina/nc_spm_full_v2alpha2.tar.gz path=$HOME

grass --tmp-location XY --exec \
python3 -m grass.gunittest.main \
Expand Down
9 changes: 0 additions & 9 deletions .gitignore
@@ -1,13 +1,4 @@
OBJ.*
*.pyc
# grass7/misc/m.eigensystem
*.o
*.tmp.html
grass6/raster/r.inund.fluv/2d_path
grass6/raster/r.inund.fluv/clean_inundation
grass6/raster/r.inund.fluv/correction_from_path
grass6/raster/r.inund.fluv/dati.mod
grass6/raster/r.inund.fluv/dd.mod
grass6/raster/r.inund.fluv/find_main_channel
grass6/raster/r.roughness/r.roughness.window.vector
grass6/vector/v.in.postgis/v.in.postgis
26 changes: 13 additions & 13 deletions CONTRIBUTING.md
Expand Up @@ -15,8 +15,8 @@ on GitHub.

## Changing code and documentation

This guide covers contributing to the main version of GRASS GIS Addons
source code which is stored the master branch.
This guide covers contributing to the latest version of GRASS GIS Addons
source code which is stored in a branch called _grass8_.
It assumes that you have some very basic knowledge of Git and GitHub,
but if you don't just go through some tutorial online or ask on the
GRASS GIS developer mailing list.
Expand Down Expand Up @@ -65,22 +65,22 @@ It is important that "origin" points to your fork.

### Update before creating a feature branch

* Make sure your are using master branch:
* Make sure your are starting with the branch for the latest version, i.e., _grass8_:

```
git checkout master
git checkout grass8
```

* Download updates from all branches from all remotes:
* Download updates from all branches from the _upstream_ remote:

```
git fetch upstream
```

* Update your local master branch to match master in the main repository:
* Update your local branch to match the one in the upstream repository:

```
git rebase upstream/master
git rebase upstream/grass8
```

### Update if you have local branches
Expand All @@ -95,7 +95,7 @@ git stash
* Now you can rebase:

```
git rebase upstream/master
git rebase upstream/grass8
```

* Apply your local changes on top:
Expand All @@ -112,7 +112,7 @@ git stash pop

### Creating a new feature branch

Now you have updated your local master branch, you can create a feature branch
Now you have updated your local branch, you can create a feature branch
based on it.

* Create a new feature branch and switch to it:
Expand Down Expand Up @@ -165,11 +165,11 @@ GRASS GIS maintainers or users will now review your pull request.
If needed, they will work with you to improve your changes.

Once the changes in the pull request are ready to be accepted,
the maintainers will decide if it is more appropriate to:
the maintainers will usually squash all your commits into one commit and merge it
to the _grass8_ branch.

* merge your feature branch,
* squash all commit into one commit, or
* rebase (i.e., replay) all commits on top of the master branch.
Once the pull request is merged, it is a good time to update your
local _grass8_ branch in order to get there the change you just contributed.

### Further notes

Expand Down