-
-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v.colors.out: Add JSON support (#4964)
- Loading branch information
1 parent
0b33438
commit fbabf32
Showing
6 changed files
with
315 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""Fixture for v.colors.out test""" | ||
|
||
import os | ||
import pytest | ||
import grass.script as gs | ||
|
||
|
||
@pytest.fixture | ||
def vector_color_dataset(tmp_path): | ||
"""Set up a GRASS session and create test vector with color rules.""" | ||
project = tmp_path / "vector_color_project" | ||
gs.create_project(project) | ||
with gs.setup.init(project, env=os.environ.copy()) as session: | ||
gs.run_command( | ||
"g.region", | ||
n=90, | ||
s=-90, | ||
e=180, | ||
w=-180, | ||
res=10, | ||
env=session.env, | ||
) | ||
gs.run_command( | ||
"v.mkgrid", map="a", grid=[10, 10], type="point", env=session.env | ||
) | ||
gs.run_command("v.colors", map="a", color="elevation", env=session.env) | ||
yield session |
Oops, something went wrong.