vacanza / holidays

Generate and work with holidays in Python
https://pypi.org/project/holidays
MIT License
1.45k stars 460 forks source link

postponed days for Russian holidays in 2024 #1760

Closed summicron502 closed 4 months ago

summicron502 commented 5 months ago

Proposed change

Added postponed days for Russian holidays in 2024

Added days and translations

Type of change

Checklist

coveralls commented 5 months ago

Pull Request Test Coverage Report for Build 8664950383

Details


Totals Coverage Status
Change from base Build 8655235045: 0.0%
Covered Lines: 11007
Relevant Lines: 11007

💛 - Coveralls
summicron502 commented 5 months ago

Changes accepted

arkid15r commented 5 months ago

It's just a friendly reminder to address the CI/CD issues before we could merge this PR.

Thank you!

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

PPsyrius commented 5 months ago

@summicron502 Other changes (I've put them as subcomments so they may have been overlooked before):

holidays/countries/russia.py Line 115-137 (class RussiaStaticHolidays section)

class RussiaStaticHolidays:
    # Date format (see strftime() Format Codes).
    substituted_date_format = tr("%d.%m.%Y")
    # Postpone of %s.
    substituted_label = tr("Перенос %s")

    special_public_holidays = {
        # Postponed Days 2023
        # src: https://www.consultant.ru/document/cons_doc_LAW_425407/
        2023: (
            (FEB, 24, JAN, 1),
            (MAY, 8, JAN, 8),
        ),
        # Postponed Days 2024
        # src: https://www.consultant.ru/document/cons_doc_LAW_455140/
        2024: (
            (APR, 29, APR, 27),
            (APR, 30, FEB, 11),
            (MAY, 10, JUN, 1),
            (DEC, 30, DEC, 28),
            (DEC, 31, JAN, 7),
        ),
    }

tests/countries/test_russia.py Line 30-40 (def test_special_holidays(self) section)

    def test_special_holidays(self):
        self.assertHoliday(
            # Postponed Holidays.
            "2023-02-24",
            "2023-05-08",
            "2024-04-29",
            "2024-04-30",
            "2024-05-10",
            "2024-12-30",
            "2024-12-31",
        )

Please include these parts manually since GitHub doesn't allow code reviewers to suggest sections that the original PR contributor doesn't touch. (These are already tested with make test locally)

image

summicron502 commented 5 months ago

@summicron502 Other changes (I've put them as subcomments so they may have been overlooked before): holidays/countries/russia.py Line 115-137 (class RussiaStaticHolidays section)

class RussiaStaticHolidays:
    # Date format (see strftime() Format Codes).
    substituted_date_format = tr("%d.%m.%Y")
    # Postpone of %s.
    substituted_label = tr("Перенос %s")

    special_public_holidays = {
        # Postponed Days 2023
        # src: https://www.consultant.ru/document/cons_doc_LAW_425407/
        2023: (
            (FEB, 24, JAN, 1),
            (MAY, 8, JAN, 8),
        ),
        # Postponed Days 2024
        # src: https://www.consultant.ru/document/cons_doc_LAW_455140/
        2024: (
            (APR, 29, APR, 27),
            (APR, 30, FEB, 11),
            (MAY, 10, JUN, 1),
            (DEC, 30, DEC, 28),
            (DEC, 31, JAN, 7),
        ),
    }

tests/countries/test_russia.py Line 30-40 (def test_special_holidays(self) section)

    def test_special_holidays(self):
        self.assertHoliday(
            # Postponed Holidays.
            "2023-02-24",
            "2023-05-08",
            "2024-04-29",
            "2024-04-30",
            "2024-05-10",
            "2024-12-30",
            "2024-12-31",
        )

Please include these parts manually since GitHub doesn't allow code reviewers to suggest sections that the original PR contributor doesn't touch. (These are already tested with make test locally)

image

For some reason l10n started to fail

from lingva.extract import main as create_pot_file ModuleNotFoundError: No module named 'lingva'

Is it known problem or that's my fault?

arkid15r commented 5 months ago

For some reason l10n started to fail

from lingva.extract import main as create_pot_file ModuleNotFoundError: No module named 'lingva'

Is it known problem or that's my fault?

try running make setup or pip install -U lingva

arkid15r commented 5 months ago

@summicron502 did you have a chance to work on addressing the issues/comments?