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

Issue 985 -- Add Azerbaijani second time frame #1052

Merged
merged 7 commits into from
Oct 22, 2021

Conversation

sania-dsouza
Copy link
Contributor

@sania-dsouza sania-dsouza commented Oct 21, 2021

Pull Request Checklist

Thank you for taking the time to improve Arrow! Before submitting your pull request, please check all appropriate boxes:

  • πŸ§ͺ Added tests for changed code.

  • πŸ› οΈ All tests pass when run locally (run tox or make test to find out!).

  • 🧹 All linting checks pass when run locally (run tox -e lint or make lint to find out!).

  • πŸ“š Updated documentation for changed code.

  • ⏩ Code is up-to-date with the master branch.

If you have any questions about your code changes or any of the points above, please submit your questions along with the pull request and we will try our best to help!

Description of Changes

@sania-dsouza sania-dsouza changed the title Issue 985 Issue 985 -- Add Azerbaijani second time frame Oct 21, 2021
@sania-dsouza
Copy link
Contributor Author

Changes made:

  • 'a second'
  • 'a year' (was missing earlier)
  • 'a week' and 'weeks' (missing as well)

Added corresponding tests borrowing from Turkish.

@jadchaar
Copy link
Member

@sania-dsouza it seems like CI tests are failing:

2021-10-21T05:08:39.1850683Z =================================== FAILURES ===================================
2021-10-21T05:08:39.1851390Z ____________________ TestAzerbaijaniLocale.test_singles_mk _____________________
2021-10-21T05:08:39.1851874Z 
2021-10-21T05:08:39.1852555Z self = <tests.test_locales.TestAzerbaijaniLocale object at 0x7f5a247c5cc0>
2021-10-21T05:08:39.1853145Z 
2021-10-21T05:08:39.1853516Z     def test_singles_mk(self):
2021-10-21T05:08:39.1855257Z         assert self.locale._format_timeframe("second", 1) == "bir saniyΙ™"
2021-10-21T05:08:39.1856058Z         assert self.locale._format_timeframe("minute", 1) == "bir dΙ™qiqΙ™"
2021-10-21T05:08:39.1856705Z         assert self.locale._format_timeframe("hour", 1) == "bir saat"
2021-10-21T05:08:39.1857460Z         assert self.locale._format_timeframe("day", 1) == "bir gΓΌn"
2021-10-21T05:08:39.1858226Z         assert self.locale._format_timeframe("week", 1) == "bir hΙ™ftΙ™"
2021-10-21T05:08:39.1858836Z         assert self.locale._format_timeframe("month", 1) == "bir ay"
2021-10-21T05:08:39.1859431Z >       assert self.locale._format_timeframe("year", 1) == "bir il"
2021-10-21T05:08:39.1860157Z E       AssertionError: assert 'il' == 'bir il'
2021-10-21T05:08:39.1860667Z E         - bir il
2021-10-21T05:08:39.1860952Z E         + il
2021-10-21T05:08:39.1861409Z 
2021-10-21T05:08:39.1861821Z tests/test_locales.py:780: AssertionError
2021-10-21T05:08:39.1862464Z ____________________ TestAzerbaijaniLocale.test_describe_mk ____________________
2021-10-21T05:08:39.1862897Z 
2021-10-21T05:08:39.1863495Z self = <tests.test_locales.TestAzerbaijaniLocale object at 0x7f5a237817f0>
2021-10-21T05:08:39.1864007Z 
2021-10-21T05:08:39.1864346Z     def test_describe_mk(self):
2021-10-21T05:08:39.1865117Z         assert self.locale.describe("second", only_distance=True) == "bir saniyΙ™"
2021-10-21T05:08:39.1866069Z         assert self.locale.describe("second", only_distance=False) == "bir saniyΙ™ sonra"
2021-10-21T05:08:39.1867015Z         assert self.locale.describe("minute", only_distance=True) == "bir dΙ™qiqΙ™"
2021-10-21T05:08:39.1868066Z         assert self.locale.describe("minute", only_distance=False) == "bir dΙ™qiqΙ™ sonra"
2021-10-21T05:08:39.1868837Z         assert self.locale.describe("hour", only_distance=True) == "bir saat"
2021-10-21T05:08:39.1869596Z         assert self.locale.describe("hour", only_distance=False) == "bir saat sonra"
2021-10-21T05:08:39.1870506Z         assert self.locale.describe("day", only_distance=True) == "bir gΓΌn"
2021-10-21T05:08:39.1871412Z         assert self.locale.describe("day", only_distance=False) == "bir gΓΌn sonra"
2021-10-21T05:08:39.1879177Z         assert self.locale.describe("week", only_distance=True) == "bir hΙ™ftΙ™"
2021-10-21T05:08:39.1880414Z         assert self.locale.describe("week", only_distance=False) == "bir hΙ™ftΙ™ sonra"
2021-10-21T05:08:39.1881180Z         assert self.locale.describe("month", only_distance=True) == "bir ay"
2021-10-21T05:08:39.1881914Z         assert self.locale.describe("month", only_distance=False) == "bir ay sonra"
2021-10-21T05:08:39.1882655Z >       assert self.locale.describe("year", only_distance=True) == "bir il"
2021-10-21T05:08:39.1883449Z E       AssertionError: assert 'il' == 'bir il'
2021-10-21T05:08:39.1883955Z E         - bir il
2021-10-21T05:08:39.1884237Z E         + il
2021-10-21T05:08:39.1884458Z 
2021-10-21T05:08:39.1884864Z tests/test_locales.py:795: AssertionError
2021-10-21T05:08:39.1885523Z ____________________ TestAzerbaijaniLocale.test_plurals_mk _____________________
2021-10-21T05:08:39.1885941Z 
2021-10-21T05:08:39.1886548Z self = <tests.test_locales.TestAzerbaijaniLocale object at 0x7f5a24398dd8>
2021-10-21T05:08:39.1887063Z 
2021-10-21T05:08:39.1887400Z     def test_plurals_mk(self):
2021-10-21T05:08:39.1887887Z         assert self.locale._format_timeframe("now", 0) == "indi"
2021-10-21T05:08:39.1888671Z         assert self.locale._format_timeframe("second", 1) == "bir saniyΙ™"
2021-10-21T05:08:39.1889448Z         assert self.locale._format_timeframe("seconds", 30) == "30 saniyΙ™"
2021-10-21T05:08:39.1890218Z         assert self.locale._format_timeframe("minute", 1) == "bir dΙ™qiqΙ™"
2021-10-21T05:08:39.1890979Z         assert self.locale._format_timeframe("minutes", 40) == "40 dΙ™qiqΙ™"
2021-10-21T05:08:39.1891594Z         assert self.locale._format_timeframe("hour", 1) == "bir saat"
2021-10-21T05:08:39.1892208Z         assert self.locale._format_timeframe("hours", 23) == "23 saat"
2021-10-21T05:08:39.1892949Z         assert self.locale._format_timeframe("day", 1) == "bir gΓΌn"
2021-10-21T05:08:39.1893831Z         assert self.locale._format_timeframe("days", 12) == "12 gΓΌn"
2021-10-21T05:08:39.1894584Z         assert self.locale._format_timeframe("week", 1) == "bir hΙ™ftΙ™"
2021-10-21T05:08:39.1895327Z         assert self.locale._format_timeframe("weeks", 38) == "38 hΙ™ftΙ™"
2021-10-21T05:08:39.1895918Z         assert self.locale._format_timeframe("month", 1) == "bir ay"
2021-10-21T05:08:39.1896519Z         assert self.locale._format_timeframe("months", 11) == "11 ay"
2021-10-21T05:08:39.1897108Z >       assert self.locale._format_timeframe("year", 1) == "bir il"
2021-10-21T05:08:39.1897797Z E       AssertionError: assert 'il' == 'bir il'
2021-10-21T05:08:39.1898289Z E         - bir il
2021-10-21T05:08:39.1898588Z E         + il
2021-10-21T05:08:39.1898787Z 
2021-10-21T05:08:39.1899426Z tests/test_locales.py:837: AssertionError
2021-10-21T05:08:39.1899733Z 
2021-10-21T05:08:39.1900350Z ---------- coverage: platform linux, python 3.6.15-final-0 -----------
2021-10-21T05:08:39.1900936Z Name                 Stmts   Miss Branch BrPart  Cover   Missing
2021-10-21T05:08:39.1901601Z ----------------------------------------------------------------
2021-10-21T05:08:39.1902047Z arrow/__init__.py        7      0      0      0   100%
2021-10-21T05:08:39.1902452Z arrow/_version.py        1      0      0      0   100%
2021-10-21T05:08:39.1902894Z arrow/api.py            30      0      0      0   100%
2021-10-21T05:08:39.1903275Z arrow/arrow.py         554      0    243      0   100%
2021-10-21T05:08:39.1903695Z arrow/constants.py      11      0      0      0   100%
2021-10-21T05:08:39.1904124Z arrow/factory.py        89      0     50      0   100%
2021-10-21T05:08:39.1904645Z arrow/formatter.py     102      0     72      0   100%
2021-10-21T05:08:39.1905073Z arrow/locales.py      1064      0    166      0   100%
2021-10-21T05:08:39.1905501Z arrow/parser.py        315      0    144      0   100%
2021-10-21T05:08:39.1905916Z arrow/util.py           45      0     22      0   100%
2021-10-21T05:08:39.1906512Z ----------------------------------------------------------------
2021-10-21T05:08:39.1906954Z TOTAL                 2218      0    697      0   100%
2021-10-21T05:08:39.1907392Z Coverage XML written to file coverage.xml
2021-10-21T05:08:39.1907710Z 
2021-10-21T05:08:39.1908129Z Required test coverage of 99% reached. Total coverage: 100.00%
2021-10-21T05:08:39.1908655Z =========================== short test summary info ============================
2021-10-21T05:08:39.1909695Z FAILED tests/test_locales.py::TestAzerbaijaniLocale::test_singles_mk - Assert...
2021-10-21T05:08:39.1910828Z FAILED tests/test_locales.py::TestAzerbaijaniLocale::test_describe_mk - Asser...
2021-10-21T05:08:39.1911929Z FAILED tests/test_locales.py::TestAzerbaijaniLocale::test_plurals_mk - Assert...
2021-10-21T05:08:39.1912610Z ================== 3 failed, 1758 passed, 2 xpassed in 11.52s ==================

@sania-dsouza
Copy link
Contributor Author

hey @jadchaar , I pushed a change but the CI tests haven't kicked off for hours now.

@jadchaar
Copy link
Member

jadchaar commented Oct 21, 2021

hey @jadchaar , I pushed a change but the CI tests haven't kicked off for hours now.

It is due to a new restriction by GitHub that prevents new contributors to a repo from starting GitHub action runs. I just kicked it off for you :)

@sania-dsouza
Copy link
Contributor Author

I think I am super nervous with all my typos today. I will need you to kick it off again please. :)

@codecov
Copy link

codecov bot commented Oct 21, 2021

Codecov Report

Merging #1052 (46fa675) into master (2ee879f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1052   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines         2218      2218           
  Branches       348       348           
=========================================
  Hits          2218      2218           
Impacted Files Coverage Ξ”
arrow/locales.py 100.00% <ΓΈ> (ΓΈ)

Continue to review full report at Codecov.

Legend - Click here to learn more
Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data
Powered by Codecov. Last update 2ee879f...46fa675. Read the comment docs.

@anishnya
Copy link
Member

I think I am super nervous with all my typos today. I will need you to kick it off again please. :)

I just kicked it off. Also, no need to be nervous, even us maintainers make mistakes quite often. Thank you for the contribution and please feel free to ask questions or for help at any time!

@jadchaar
Copy link
Member

Like Anish said, no need to be nervous we appreciate all contributions :)! Thanks for helping out @sania-dsouza! I just updated your branch with the latest master and will merge it in once CI passes!

Copy link
Member

@jadchaar jadchaar left a comment

Choose a reason for hiding this comment

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

LGTM

@jadchaar jadchaar merged commit 4d1aa4f into arrow-py:master Oct 22, 2021
@sania-dsouza sania-dsouza deleted the issue-985 branch October 24, 2021 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants