diff --git a/.bumpversion.cfg b/.bumpversion.cfg index f701b3c319..17dcf7410d 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 4.1.2 +current_version = 4.1.3 files = VERSION faker/__init__.py docs/conf.py commit = True tag = True diff --git a/.github/workflows/autodeploy.yml b/.github/workflows/autodeploy.yml new file mode 100644 index 0000000000..5cd6734a52 --- /dev/null +++ b/.github/workflows/autodeploy.yml @@ -0,0 +1,24 @@ +name: Auto Deploy +on: + push: + branches: + - master +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: 'Wait for status checks' + id: waitforstatuschecks + uses: "fcurella/github-action-wait-for-status@ignore-contexts" + with: + ignoreActions: release + ignoreContexts: coverage/coveralls + checkInterval: 12 + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + - name: 'placeholder' + run: "echo hurray" + if: steps.waitforstatuschecks.outputs.status == 'success' + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + LABELS: release diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6677edf797..591aeafbf3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,7 +1,17 @@ Changelog ========= -`4.1.2 - 1&-August-2020 `__ +`4.1.3 - 14-September-2020 `__ +--------------------------------------------------------------------------------------- + +* Add ``es_ES`` autonomous communities (Spanish regions). Thanks @mondeja. +* Add JSON and Fixed Width argument group and parser support. Thanks @johnbrandborg. +* Update ``zh_CN`` ssn provider to support gender. Thanks @mapoor. +* Fix typo in ``de_DE`` job provider. Thanks @datadominik. +* ``or_IN`` Odia person's name added. Thanks @soumendrak. +* Remove ``datetime_safe`` shim subclass in favor of native Python ``datetime.datetime``. Thanks @samcrang. + +`4.1.2 - 17-August-2020 `__ ------------------------------------------------------------------------------------ * Extend Person Provider to support non-binary suffixes and prefixes. Thank you @crd. diff --git a/VERSION b/VERSION index 4d0dcda01c..de197cc337 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.1.2 +4.1.3 diff --git a/docs/conf.py b/docs/conf.py index 36b84f6fa2..82d2241330 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -50,9 +50,9 @@ # built documents. # # The short X.Y version. -version = '4.1.2' +version = '4.1.3' # The full version, including alpha/beta/rc tags. -release = '4.1.2' +release = '4.1.3' # 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 619709392a..ea1eef9196 100644 --- a/faker/__init__.py +++ b/faker/__init__.py @@ -2,4 +2,4 @@ from faker.generator import Generator # noqa F401 from faker.proxy import Faker # noqa F401 -VERSION = '4.1.2' +VERSION = '4.1.3' diff --git a/faker/providers/company/__init__.py b/faker/providers/company/__init__.py index 5d539990b5..ecf2fc36fe 100644 --- a/faker/providers/company/__init__.py +++ b/faker/providers/company/__init__.py @@ -413,7 +413,6 @@ class Provider(BaseProvider): 'web-enabled', 'interactive', 'dot-com', - 'sexy', 'back-end', 'real-time', 'efficient', diff --git a/tests/providers/test_address.py b/tests/providers/test_address.py index f33240393f..0494ccec8a 100644 --- a/tests/providers/test_address.py +++ b/tests/providers/test_address.py @@ -1271,6 +1271,11 @@ def test_floor_unit_number(self, faker, num_samples): assert 2 <= int(number[:-2]) <= 99 assert 1 <= int(number[-2:]) <= 40 + def test_ordinal_floor_number(self, faker, num_samples): + for _ in range(num_samples): + floor_number = faker.ordinal_floor_number() + assert floor_number[-2:] in ['th', 'st', 'nd', 'rd'] + def test_address(self, faker, num_samples): for _ in range(num_samples): address = faker.address() diff --git a/tests/providers/test_ssn.py b/tests/providers/test_ssn.py index f8f120f572..13999dd97b 100644 --- a/tests/providers/test_ssn.py +++ b/tests/providers/test_ssn.py @@ -614,6 +614,24 @@ def test_ssn(self): assert re.search(r'^\d{11}$', value) assert value.endswith('0') + @freezegun.freeze_time('2002-01-01') + def test_ssn_2000(self): + self.fake.random = random2.Random() + + self.fake.seed_instance(0) + value = self.fake.ssn(min_age=0, max_age=1) + assert re.search(r'^\d{11}$', value) + assert value[0] in ('5', '6') + + @freezegun.freeze_time('2101-01-01') + def test_ssn_2100(self): + self.fake.random = random2.Random() + + self.fake.seed_instance(0) + value = self.fake.ssn(min_age=0, max_age=1) + assert re.search(r'^\d{11}$', value) + assert value[0] in ('7', '8') + def test_vat_id(self): for _ in range(100): assert re.search(r'^EE\d{9}$', self.fake.vat_id())