Skip to content

Commit

Permalink
Add catalog to spell_check
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ authored and 3nids committed Jul 2, 2017
1 parent e6a8e36 commit 338b4c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/plugins/MetaSearch/dialogs/maindialog.py
Expand Up @@ -47,7 +47,7 @@
QgsProviderRegistry, QgsSettings)
from qgis.gui import QgsRubberBand

from owslib.csw import CatalogueServiceWeb
from owslib.csw import CatalogueServiceWeb # spellok
from owslib.fes import BBox, PropertyIsLike
from owslib.ows import ExceptionReport

Expand Down Expand Up @@ -821,7 +821,7 @@ def show_metadata(self):

try:
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
cat = CatalogueServiceWeb(self.catalog_url, timeout=self.timeout,
cat = CatalogueServiceWeb(self.catalog_url, timeout=self.timeout, # spellok
username=self.catalog_username,
password=self.catalog_password)
cat.getrecordbyid(
Expand Down Expand Up @@ -899,12 +899,12 @@ def reject(self):
self.rubber_band.reset()

def _get_csw(self):
"""convenience function to init owslib.csw.CatalogueServiceWeb"""
"""convenience function to init owslib.csw.CatalogueServiceWeb""" # spellok

# connect to the server
try:
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
self.catalog = CatalogueServiceWeb(self.catalog_url,
self.catalog = CatalogueServiceWeb(self.catalog_url, # spellok
timeout=self.timeout,
username=self.catalog_username,
password=self.catalog_password)
Expand Down
1 change: 1 addition & 0 deletions scripts/spell_check/.agignore
Expand Up @@ -40,6 +40,7 @@ images/themes/default/propertyicons/diagram.svg
images/themes/default/propertyicons/general.svg
images/themes/default/svgbase/hammer.svg
LexerR.py
python/plugins/MetaSearch/resources/connections-default.xml
python/plugins/processing/algs/grass7/description/i.landsat.toar.txt
python/plugins/processing/gui/algnames.txt
python/plugins/processing/tests/testdata/expected/orthagonal_lines.gfs
Expand Down
1 change: 1 addition & 0 deletions scripts/spell_check/spelling.dat
Expand Up @@ -1137,6 +1137,7 @@ casues:causes
casuing:causing
casulaties:casualties
casulaty:casualty
catalogue:catalog
catagories:categories
catagorized:categorized
catagory:category
Expand Down

5 comments on commit 338b4c0

@3nids
Copy link
Member

@3nids 3nids commented on 338b4c0 Jul 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DelazJ you missed some Catalogue fixes. Can you run ./scripts/spell_check/check_spelling.sh to fix these?

@DelazJ
Copy link
Contributor Author

@DelazJ DelazJ commented on 338b4c0 Jul 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@3nids I do not have a git infrastructure right now so I'm afraid it would only be in the evening.
Question: Isn't that run in the prepare-commit script (I set it to automatically run before each commit)?

@3nids
Copy link
Member

@3nids 3nids commented on 338b4c0 Jul 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, but only on modified files (otherwise it would take too much time).
If you run the script directly (without argument), it runs on the whole source code.

@DelazJ
Copy link
Contributor Author

@DelazJ DelazJ commented on 338b4c0 Jul 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmmm... It makes sense.
So it will replace all occurrences except in the agignored files and #spellok lines, right?
I had checked the behavior of thoses tools but the files I found were written in a programmatic (hence mainly cryptic for me) language so I had to guess and wait for reviewers comments and improvements. Unless I miss it, worth mention in QGIS Dev Guide?

@3nids
Copy link
Member

@3nids 3nids commented on 338b4c0 Jul 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it will replace all occurrences except in the agignored files and #spellok lines, right?

correct!

worth mention in QGIS Dev Guide?

yep, adding a small paragraph could be added next to indentation

Please sign in to comment.