Repository: joke2k/faker
Pull request #1283 (2020-10-01 09:46:47)

Implement color provider for ``sk_SK`` locale
### What does this changes

This PR implements color provider for ``sk_SK`` locale




malefice: @fcurella this looks OK.
fcurella: Can we add some tests?
pipozzz: I added test there, btw something is wrong with appveyor, it's still in pending state.
fcurella: @pipozzz unfortunately appveyor is VERY slow, so we'll have to patient. I'd love to port the windows tests to GitHub Actions, but I can't find a way to run the same matrix (specifically, python 3.6 on x32).

Patch:
diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 5a8c398d..0dc59e02 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 4.1.6
+current_version = 4.1.8
 files = VERSION faker/__init__.py docs/conf.py
 commit = True
 tag = True
diff --git a/.github/workflows/autobump.yml b/.github/workflows/autobump.yml
index da0a80d8..93c7e27a 100644
--- a/.github/workflows/autobump.yml
+++ b/.github/workflows/autobump.yml
@@ -14,7 +14,7 @@ jobs:
         id: waitforstatuschecks
         uses: "fcurella/gh-status-check@main"
         with:
-          ignoreContexts: coverage/coveralls
+          ignoreContexts: coverage/coveralls,continuous-integration/appveyor/branch
           ignoreActions: waitforstatuschecks
           checkInterval: 12
           githubToken: ${{ secrets.GITHUB_TOKEN }}
@@ -28,6 +28,9 @@ jobs:
           defaultPart: "patch"
           githubToken: ${{ secrets.GITHUB_TOKEN }}
       - uses: actions/checkout@v2
+        with:
+          persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
+          fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
       - name: Get Next Version
         uses: "fcurella/gh-action-next-version@main"
         id: nextversion
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 4c689250..f4aeb2cb 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,15 @@
 Changelog
 =========
 
+`4.1.8 - 2020-10-02 <https://github.com/joke2k/faker/compare/v4.1.7...v4.1.8>`_
+-------------------------------------------------------------------------------
+
+* Fix ``hu_HU`` color provider inheritance. Thanks @n1ngu.
+
+`4.1.7 - 2020-10-02 <https://github.com/joke2k/faker/compare/v4.1.6...v4.1.7>`_
+-------------------------------------------------------------------------------
+* Bigger zipcode ranges for VA, TX and MD in ``en_US``. Thanks @Antetokounpo.
+
 `4.1.6 - 2020-10-01 <https://github.com/joke2k/faker/compare/v4.1.5...v4.1.6>`_
 -------------------------------------------------------------------------------
 * Add new style ``pt_PT`` automotive plates. Thanks @gplgps.
diff --git a/VERSION b/VERSION
index 561ad334..a7c00da3 100644
--- a/VERSION
+++ b/VERSION
@@ -1,1 +1,1 @@
-4.1.6
+4.1.8
diff --git a/docs/conf.py b/docs/conf.py
index fbe7404c..b94e6a10 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -51,9 +51,9 @@ copyright = '2014, Daniele Faraglia'
 # built documents.
 #
 # The short X.Y version.
-version = '4.1.6'
+version = '4.1.8'
 # The full version, including alpha/beta/rc tags.
-release = '4.1.6'
+release = '4.1.8'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/faker/__init__.py b/faker/__init__.py
index 6b962f93..b184d27d 100644
--- a/faker/__init__.py
+++ b/faker/__init__.py
@@ -2,4 +2,4 @@ from faker.factory import Factory  # noqa F401
 from faker.generator import Generator  # noqa F401
 from faker.proxy import Faker  # noqa F401
 
-VERSION = '4.1.6'
+VERSION = '4.1.8'
diff --git a/faker/providers/color/hu_HU/__init__.py b/faker/providers/color/hu_HU/__init__.py
index abea2a05..b6b51dd3 100644
--- a/faker/providers/color/hu_HU/__init__.py
+++ b/faker/providers/color/hu_HU/__init__.py
@@ -1,7 +1,7 @@
-from faker.providers import BaseProvider
+from .. import Provider as ColorProvider
 
 
-class Provider(BaseProvider):
+class Provider(ColorProvider):
     """Implement color provider for ``hu_HU`` locale."""
 
     safe_colors = (
diff --git a/faker/providers/color/sk_SK/__init__.py b/faker/providers/color/sk_SK/__init__.py
new file mode 100644
index 00000000..64cf79d2
--- /dev/null
+++ b/faker/providers/color/sk_SK/__init__.py
@@ -0,0 +1,11 @@
+from .. import Provider as ColorProvider
+
+
+class Provider(ColorProvider):
+    """Implement color provider for ``sk_SK`` locale."""
+
+    safe_colors = (
+        'čierna', 'gaštanová', 'zelená', 'námornícka', 'olivová',
+        'fialová', 'zelenomodrá', 'limetková', 'modrá', 'strieborná',
+        'sivá', 'žltá', 'fuchsiová', 'aquamarinová', 'biela',
+    )


Test patch:
diff --git a/tests/providers/test_color.py b/tests/providers/test_color.py
index fd65d6a2..0d1e8c4a 100644
--- a/tests/providers/test_color.py
+++ b/tests/providers/test_color.py
@@ -8,6 +8,7 @@ from faker.providers.color import RandomColor
 from faker.providers.color.es_ES import Provider as EsEsColorProvider
 from faker.providers.color.fa_IR import Provider as FaIrColorProvider
 from faker.providers.color.hy_AM import Provider as HyAmColorProvider
+from faker.providers.color.sk_SK import Provider as SkSkColorProvider
 
 
 class TestColorProvider:
@@ -290,3 +291,13 @@ class TestEsEs:
             safe_color_name = faker.safe_color_name()
             assert isinstance(safe_color_name, str)
             assert safe_color_name in EsEsColorProvider.safe_colors
+
+
+class TestSkSk:
+    """Test sk_SK color provider methods"""
+
+    def test_safe_color_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            safe_color_name = faker.safe_color_name()
+            assert isinstance(safe_color_name, str)
+            assert safe_color_name in SkSkColorProvider.safe_colors