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

style: Define import grass.temporal as tgis as an import convention #4839

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ ignore = [
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
# Declare a custom aliases, checked with rule ICN001
"grass.script" = "gs"
"grass.temporal" = "tgis"

[tool.pytest.ini_options]
minversion = "6.0"
Expand Down
53 changes: 24 additions & 29 deletions python/grass/temporal/testsuite/test_temporal_doctests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
import grass.gunittest.case
import grass.gunittest.main
import grass.gunittest.utils

import grass.temporal
import grass.temporal as tgis

doctest.DocFileCase = type(
"DocFileCase", (grass.gunittest.case.TestCase,), dict(doctest.DocFileCase.__dict__)
Expand All @@ -23,35 +22,31 @@

def load_tests(loader, tests, ignore):
grass.gunittest.utils.do_doctest_gettext_workaround()
tests.addTests(doctest.DocTestSuite(grass.temporal.abstract_dataset))
tests.addTests(doctest.DocTestSuite(grass.temporal.abstract_map_dataset))
tests.addTests(doctest.DocTestSuite(grass.temporal.abstract_space_time_dataset))
tests.addTests(doctest.DocTestSuite(grass.temporal.base))
tests.addTests(doctest.DocTestSuite(grass.temporal.core))
tests.addTests(doctest.DocTestSuite(grass.temporal.datetime_math))
tests.addTests(doctest.DocTestSuite(tgis.abstract_dataset))
tests.addTests(doctest.DocTestSuite(tgis.abstract_map_dataset))
tests.addTests(doctest.DocTestSuite(tgis.abstract_space_time_dataset))
tests.addTests(doctest.DocTestSuite(tgis.base))
tests.addTests(doctest.DocTestSuite(tgis.core))
tests.addTests(doctest.DocTestSuite(tgis.datetime_math))
# Unexpected error here
# tests.addTests(doctest.DocTestSuite(grass.temporal.list_stds))
tests.addTests(doctest.DocTestSuite(grass.temporal.metadata))
tests.addTests(doctest.DocTestSuite(grass.temporal.register))
tests.addTests(doctest.DocTestSuite(grass.temporal.space_time_datasets))
tests.addTests(doctest.DocTestSuite(grass.temporal.spatial_extent))
tests.addTests(
doctest.DocTestSuite(grass.temporal.spatial_topology_dataset_connector)
)
tests.addTests(doctest.DocTestSuite(grass.temporal.spatio_temporal_relationships))
tests.addTests(doctest.DocTestSuite(grass.temporal.temporal_extent))
tests.addTests(doctest.DocTestSuite(grass.temporal.temporal_granularity))
tests.addTests(
doctest.DocTestSuite(grass.temporal.temporal_topology_dataset_connector)
)
# tests.addTests(doctest.DocTestSuite(tgis.list_stds))
tests.addTests(doctest.DocTestSuite(tgis.metadata))
tests.addTests(doctest.DocTestSuite(tgis.register))
tests.addTests(doctest.DocTestSuite(tgis.space_time_datasets))
tests.addTests(doctest.DocTestSuite(tgis.spatial_extent))
tests.addTests(doctest.DocTestSuite(tgis.spatial_topology_dataset_connector))
tests.addTests(doctest.DocTestSuite(tgis.spatio_temporal_relationships))
tests.addTests(doctest.DocTestSuite(tgis.temporal_extent))
tests.addTests(doctest.DocTestSuite(tgis.temporal_granularity))
tests.addTests(doctest.DocTestSuite(tgis.temporal_topology_dataset_connector))
# Algebra is still very experimental
tests.addTests(doctest.DocTestSuite(grass.temporal.temporal_algebra))
tests.addTests(doctest.DocTestSuite(grass.temporal.temporal_raster3d_algebra))
tests.addTests(doctest.DocTestSuite(grass.temporal.temporal_raster_algebra))
tests.addTests(doctest.DocTestSuite(grass.temporal.temporal_raster_base_algebra))
tests.addTests(doctest.DocTestSuite(grass.temporal.temporal_operator))
tests.addTests(doctest.DocTestSuite(grass.temporal.temporal_vector_algebra))
tests.addTests(doctest.DocTestSuite(grass.temporal.c_libraries_interface))
tests.addTests(doctest.DocTestSuite(tgis.temporal_algebra))
tests.addTests(doctest.DocTestSuite(tgis.temporal_raster3d_algebra))
tests.addTests(doctest.DocTestSuite(tgis.temporal_raster_algebra))
tests.addTests(doctest.DocTestSuite(tgis.temporal_raster_base_algebra))
tests.addTests(doctest.DocTestSuite(tgis.temporal_operator))
tests.addTests(doctest.DocTestSuite(tgis.temporal_vector_algebra))
tests.addTests(doctest.DocTestSuite(tgis.c_libraries_interface))
return tests


Expand Down
Loading