Skip to content

Commit

Permalink
doc: fix "Duplicate explicit target name" with new version of pywps a…
Browse files Browse the repository at this point in the history
…llowing anonymous links

Warning, treated as error:
/zstore/repos/emu/emu/processes/wps_wordcounter.py:docstring of emu.processes.wps_wordcounter.WordCounter:18:Duplicate explicit target name: "user guide".
Makefile:20: recipe for target 'html' failed
make[1]: *** [html] Error 2
make[1]: Leaving directory '/zstore/repos/emu/docs'
Makefile:165: recipe for target 'docs' failed
make: *** [docs] Error 2

All warnings fixed:

/home/docs/checkouts/readthedocs.org/user_builds/emu/checkouts/test-rtd-build/emu/processes/wps_wordcounter.py:docstring of emu.processes.wps_wordcounter.WordCounter:18: WARNING: Duplicate explicit target name: "user guide".
/home/docs/checkouts/readthedocs.org/user_builds/emu/checkouts/test-rtd-build/emu/processes/wps_ncmeta.py:docstring of emu.processes.wps_ncmeta.NCMeta:20: WARNING: Duplicate explicit target name: "user guide".
/home/docs/checkouts/readthedocs.org/user_builds/emu/checkouts/test-rtd-build/emu/processes/wps_error.py:docstring of emu.processes.wps_error.ShowError:24: WARNING: Duplicate explicit target name: "user guide".
/home/docs/checkouts/readthedocs.org/user_builds/emu/checkouts/test-rtd-build/emu/processes/wps_dry_run.py:docstring of emu.processes.wps_dry_run.SimpleDryRun:16: WARNING: Duplicate explicit target name: "user guide".
/home/docs/checkouts/readthedocs.org/user_builds/emu/checkouts/test-rtd-build/emu/processes/wps_multiple_outputs.py:docstring of emu.processes.wps_multiple_outputs.MultipleOutputs:14: WARNING: Duplicate explicit target name: "user guide".
/home/docs/checkouts/readthedocs.org/user_builds/emu/checkouts/test-rtd-build/emu/processes/wps_inout.py:docstring of emu.processes.wps_inout.InOut:59: WARNING: Duplicate explicit target name: "user guide".
/home/docs/checkouts/readthedocs.org/user_builds/emu/checkouts/test-rtd-build/emu/processes/wps_inout.py:docstring of emu.processes.wps_inout.InOut:59: WARNING: Duplicate explicit target name: "pywps docs".
/home/docs/checkouts/readthedocs.org/user_builds/emu/checkouts/test-rtd-build/emu/processes/wps_inout.py:docstring of emu.processes.wps_inout.InOut:59: WARNING: Duplicate explicit target name: "pywps docs".
  • Loading branch information
tlvu committed Jul 29, 2020
1 parent 909b995 commit cfcaedf
Show file tree
Hide file tree
Showing 16 changed files with 76 additions and 26 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ install:
develop:
@echo "Installing development requirements for tests and docs ..."
@-bash -c 'pip install -e ".[dev]"'
@-bash -c 'pip install git+https://github.com/Ouranosinc/pywps@2a55b6e95f51c648dc94bf3c89db7370b56c1c9c#egg=pywps --upgrade'

.PHONY: start
start:
Expand Down
5 changes: 4 additions & 1 deletion emu/processes/wps_bbox.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pywps.app.Common import Metadata
from pywps.ext_autodoc import MetadataUrl

__author__ = 'Jachym'

Expand Down Expand Up @@ -30,7 +31,9 @@ def __init__(self):
abstract='Give bounding box, return the same',
metadata=[
Metadata('Birdhouse', 'http://bird-house.github.io/'),
Metadata('User Guide', 'http://emu.readthedocs.io/en/latest/')],
MetadataUrl('User Guide',
'http://emu.readthedocs.io/en/latest/',
anonymous=True)],
inputs=inputs,
outputs=outputs,
store_supported=True,
Expand Down
5 changes: 4 additions & 1 deletion emu/processes/wps_binaryoperator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from pywps import Process, LiteralInput, LiteralOutput
from pywps.app.Common import Metadata
from pywps.ext_autodoc import MetadataUrl

import logging
logger = logging.getLogger("PYWPS")
Expand Down Expand Up @@ -30,7 +31,9 @@ def __init__(self):
'This example process is taken from Climate4Impact.',
metadata=[
Metadata('Birdhouse', 'http://bird-house.github.io/'),
Metadata('User Guide', 'http://emu.readthedocs.io/en/latest/'),
MetadataUrl('User Guide',
'http://emu.readthedocs.io/en/latest/',
anonymous=True),
Metadata('Climate4Impact', 'https://dev.climate4impact.eu')],
version='1.0',
inputs=inputs,
Expand Down
6 changes: 4 additions & 2 deletions emu/processes/wps_dry_run.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pywps import Process, LiteralInput, LiteralOutput
from pywps.inout.literaltypes import AllowedValue
from pywps.app.Common import Metadata
from pywps.ext_autodoc import MetadataUrl
from pywps.validator.mode import MODE

from emu.exceptions import DryRunWarning, StorageLimitExceeded
Expand Down Expand Up @@ -32,7 +32,9 @@ def __init__(self):
title='Simple Dry Run',
abstract='A dummy download as simple dry-run example.',
metadata=[
Metadata('User Guide', 'https://emu.readthedocs.io/en/latest/processes.html'), # noqa
MetadataUrl('User Guide',
'https://emu.readthedocs.io/en/latest/processes.html',
anonymous=True),
],
version='1.0',
inputs=inputs,
Expand Down
6 changes: 5 additions & 1 deletion emu/processes/wps_error.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from pywps import Process, LiteralInput
from pywps.app.Common import Metadata
from pywps.ext_autodoc import MetadataUrl
from pywps.app.exceptions import ProcessError

import logging
Expand Down Expand Up @@ -37,7 +38,10 @@ def __init__(self):
metadata=[
Metadata('PyWPS', 'https://pywps.org/'),
Metadata('Birdhouse', 'http://bird-house.github.io/'),
Metadata('User Guide', 'http://emu.readthedocs.io/en/latest/')],
MetadataUrl('User Guide',
'http://emu.readthedocs.io/en/latest/',
anonymous=True),
],
version='1.0',
inputs=inputs,
# outputs=outputs,
Expand Down
5 changes: 4 additions & 1 deletion emu/processes/wps_esgf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pywps import ComplexInput
from pywps import Format
from pywps.app.Common import Metadata
from pywps.ext_autodoc import MetadataUrl

import logging
LOGGER = logging.getLogger("PYWPS")
Expand Down Expand Up @@ -38,7 +39,9 @@ def __init__(self):
title='ESGF Demo',
abstract='Shows how to use WPS metadata for processes using ESGF data.',
metadata=[
Metadata('User Guide', 'https://emu.readthedocs.io/en/latest/processes.html'), # noqa
MetadataUrl('User Guide',
'https://emu.readthedocs.io/en/latest/processes.html',
anonymous=True),
Metadata('ESGF Constraints',
role='https://www.earthsystemcog.org/spec/esgf_search/4.12.0/def/constraints', # noqa
href='http://esgf-data.dkrz.de/esg-search/search?project=CMIP5&time_frequency=mon&variable=tas,tasmax,tasmin&experiment=historical'), # noqa
Expand Down
21 changes: 15 additions & 6 deletions emu/processes/wps_inout.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from pywps import Format, FORMATS
from pywps.validator.mode import MODE
from pywps.app.Common import Metadata
from pywps.ext_autodoc import MetadataUrl


import logging
Expand Down Expand Up @@ -67,8 +68,10 @@ def __init__(self):
LiteralInput('int_range', 'Integer Range',
abstract='Choose number from range: 1-10 (step 1), 100-200 (step 10)',
metadata=[
Metadata('PyWPS Docs', 'https://pywps.readthedocs.io/en/master/api.html#pywps.inout.literaltypes.AllowedValue'), # noqa
Metadata('AllowedValue Example', 'http://docs.opengeospatial.org/is/14-065/14-065.html#98'), # noqa
MetadataUrl('PyWPS Docs',
'https://pywps.readthedocs.io/en/master/api.html#pywps.inout.literaltypes.AllowedValue', # noqa
anonymous=True),
Metadata('AllowedValue Example', 'http://docs.opengeospatial.org/is/14-065/14-065.html#98'), # noqa
],
data_type='integer',
default='1',
Expand All @@ -80,15 +83,19 @@ def __init__(self):
LiteralInput('any_value', 'Any Value',
abstract='Enter any value.',
metadata=[
Metadata('PyWPS Docs', 'https://pywps.readthedocs.io/en/master/api.html#pywps.inout.literaltypes.AnyValue'), # noqa
MetadataUrl('PyWPS Docs',
'https://pywps.readthedocs.io/en/master/api.html#pywps.inout.literaltypes.AnyValue', # noqa
anonymous=True),
],
allowed_values=AnyValue(),
default='any value',
mode=MODE.SIMPLE,),
LiteralInput('ref_value', 'Referenced Value',
abstract='Choose a referenced value',
metadata=[
Metadata('PyWPS Docs', 'https://pywps.readthedocs.io/en/master/_modules/pywps/inout/literaltypes.html'), # noqa
MetadataUrl('PyWPS Docs',
'https://pywps.readthedocs.io/en/master/_modules/pywps/inout/literaltypes.html', # noqa
anonymous=True),
],
data_type='string',
allowed_values=ValuesReference(
Expand Down Expand Up @@ -155,8 +162,10 @@ def __init__(self):
# profile=['birdhouse'],
metadata=[
Metadata('Birdhouse', 'http://bird-house.github.io/'),
Metadata('User Guide', 'http://emu.readthedocs.io/en/latest/',
role='http://www.opengis.net/spec/wps/2.0/def/process/description/documentation')],
MetadataUrl('User Guide', 'http://emu.readthedocs.io/en/latest/',
role='http://www.opengis.net/spec/wps/2.0/def/process/description/documentation',
anonymous=True),
],
inputs=inputs,
outputs=outputs,
status_supported=True,
Expand Down
6 changes: 4 additions & 2 deletions emu/processes/wps_multiple_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from pywps import Process, LiteralInput, ComplexOutput
from pywps import FORMATS
from pywps.inout.literaltypes import AllowedValue
from pywps.app.Common import Metadata
from pywps.ext_autodoc import MetadataUrl
from pywps.inout.outputs import MetaLink, MetaLink4, MetaFile
import json

Expand Down Expand Up @@ -36,7 +36,9 @@ def __init__(self):
abstract='Produces multiple files and returns a document'
' with references to these files.',
metadata=[
Metadata('User Guide', 'https://emu.readthedocs.io/en/latest/processes.html'), # noqa
MetadataUrl('User Guide',
'https://emu.readthedocs.io/en/latest/processes.html',
anonymous=True),
],
version='1.1',
inputs=inputs,
Expand Down
6 changes: 5 additions & 1 deletion emu/processes/wps_nap.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from pywps import Process, LiteralInput, LiteralOutput
from pywps.app.Common import Metadata
from pywps.ext_autodoc import MetadataUrl


class Nap(Process):
Expand All @@ -23,7 +24,10 @@ def __init__(self):
profile='',
metadata=[
Metadata('Birdhouse', 'http://bird-house.github.io/'),
Metadata('User Guide', 'http://emu.readthedocs.io/en/latest/')],
MetadataUrl('User Guide',
'http://emu.readthedocs.io/en/latest/',
anonymous=True),
],
inputs=inputs,
outputs=outputs,
store_supported=False,
Expand Down
6 changes: 4 additions & 2 deletions emu/processes/wps_nc_to_dap.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pywps import Process
from pywps import ComplexInput, ComplexOutput, FORMATS
from pywps.app.Common import Metadata
from pywps.ext_autodoc import MetadataUrl
from pywps import configuration
import logging

Expand Down Expand Up @@ -33,7 +33,9 @@ def __init__(self):
abstract="Return Data Access Protocol link to a netCDF or NcML file.",
version="1",
metadata=[
Metadata('User Guide', 'http://emu.readthedocs.io/en/latest/'),
MetadataUrl('User Guide',
'http://emu.readthedocs.io/en/latest/',
anonymous=True),
],
inputs=inputs,
outputs=outputs,
Expand Down
6 changes: 4 additions & 2 deletions emu/processes/wps_ncmeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pywps import ComplexInput, ComplexOutput, FORMATS, Format
from pywps.inout.basic import SOURCE_TYPE
from pywps.validator.mode import MODE
from pywps.app.Common import Metadata
from pywps.ext_autodoc import MetadataUrl

from netCDF4 import Dataset

Expand Down Expand Up @@ -51,7 +51,9 @@ def __init__(self):
abstract="Return metadata from a netCDF dataset, either on file or an OpenDAP service.",
version='4',
metadata=[
Metadata('User Guide', 'http://emu.readthedocs.io/en/latest/'),
MetadataUrl('User Guide',
'http://emu.readthedocs.io/en/latest/',
anonymous=True),
],
inputs=inputs,
outputs=outputs,
Expand Down
6 changes: 4 additions & 2 deletions emu/processes/wps_ncml.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import xarray.tests.test_dataset as td
from pywps import Process
from pywps import ComplexOutput, FORMATS
from pywps.app.Common import Metadata
from pywps.ext_autodoc import MetadataUrl
import logging


Expand Down Expand Up @@ -31,7 +31,9 @@ def __init__(self):
abstract="Return links to an NcML file aggregating netCDF files with moving time units.",
version="1",
metadata=[
Metadata('User Guide', 'http://emu.readthedocs.io/en/latest/'),
MetadataUrl('User Guide',
'http://emu.readthedocs.io/en/latest/',
anonymous=True),
],
inputs=inputs,
outputs=outputs,
Expand Down
5 changes: 4 additions & 1 deletion emu/processes/wps_say_hello.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from pywps import Process, LiteralInput, LiteralOutput, UOM
from pywps.app.Common import Metadata
from pywps.ext_autodoc import MetadataUrl

import logging
LOGGER = logging.getLogger("PYWPS")
Expand Down Expand Up @@ -27,7 +28,9 @@ def __init__(self):
'Returns a literal string output with Hello plus the inputed name.',
keywords=['hello', 'demo'],
metadata=[
Metadata('User Guide', 'https://emu.readthedocs.io/en/latest/processes.html'), # noqa
MetadataUrl('User Guide',
'https://emu.readthedocs.io/en/latest/processes.html',
anonymous=True), # noqa
Metadata('PyWPS Demo', 'https://pywps-demo.readthedocs.io/en/latest/'),
],
version='1.5',
Expand Down
5 changes: 4 additions & 1 deletion emu/processes/wps_sleep.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from pywps import Process, LiteralInput, LiteralOutput
from pywps.app.Common import Metadata
from pywps.ext_autodoc import MetadataUrl


class Sleep(Process):
Expand All @@ -22,7 +23,9 @@ def __init__(self):
'This process will sleep for a given delay or 10 seconds if not a valid value.',
profile='',
metadata=[
Metadata('User Guide', 'https://emu.readthedocs.io/en/latest/processes.html'), # noqa
MetadataUrl('User Guide',
'https://emu.readthedocs.io/en/latest/processes.html',
anonymous=True), # noqa
Metadata('PyWPS Demo', 'https://pywps-demo.readthedocs.io/en/latest/'),
],
inputs=inputs,
Expand Down
6 changes: 4 additions & 2 deletions emu/processes/wps_wordcounter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from pywps import Process
from pywps import ComplexInput, ComplexOutput, FORMATS
from pywps.app.Common import Metadata
from pywps.ext_autodoc import MetadataUrl

import logging
LOGGER = logging.getLogger("PYWPS")
Expand Down Expand Up @@ -35,7 +35,9 @@ def __init__(self):
abstract="Counts words in a given text.",
version='1.0',
metadata=[
Metadata('User Guide', 'http://emu.readthedocs.io/en/latest/'),
MetadataUrl('User Guide',
'http://emu.readthedocs.io/en/latest/',
anonymous=True),
],
inputs=inputs,
outputs=outputs,
Expand Down
7 changes: 6 additions & 1 deletion environment-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ channels:
- conda-forge
- defaults
dependencies:
- pywps>=4.2
# restore once an official pywps release contain the fix
#- pywps>=4.2
- sphinx
- nbsphinx
- ipython
- pip
- pip:
# delete once an official pywps release contain this fix, also delete in Makefile
- https://github.com/Ouranosinc/pywps/archive/2a55b6e95f51c648dc94bf3c89db7370b56c1c9c.zip

0 comments on commit cfcaedf

Please sign in to comment.