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

Change name of project for uploading #1

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ __pycache__/
.ruff_cache/
dumb.py
.vscode
.coverage
.coverage
.env
142 changes: 71 additions & 71 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "pysla"
name = "pyshiftsla"
version = "0.1.0"
description = "Highly customizable SLA and work-shifts Generator, for any time-keeping and days-off policies"
authors = ["Huy Vu Nguyen <huyk25sinh@gmail.com>"]
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions pysla/daily_shifts.py → pyshiftsla/daily_shifts.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from pydantic import AfterValidator, RootModel
from typing import Annotated, List, Literal, Dict, Tuple
from datetime import datetime, time
from pysla.datetime_utilities import (
from pyshiftsla.datetime_utilities import (
Milliseconds,
check_start_end_event,
diff_time,
)
from pysla.shift import Shift, RESOLVED_TWO_SHIFTS
from pyshiftsla.shift import Shift, RESOLVED_TWO_SHIFTS

RESOLVE_SHIFTS_METHOD = Literal[
"overlapped", "outer", "throw-error", "delete-both"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions pysla/shiftrange.py → pyshiftsla/shiftrange.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from typing import Dict, Literal, List
from pydantic import RootModel

from pysla.daily_shifts import DailyShift
from pysla.datetime_utilities import Milliseconds, diff_datetime
from pyshiftsla.daily_shifts import DailyShift
from pyshiftsla.datetime_utilities import Milliseconds, diff_datetime


class ShiftRange(RootModel):
Expand Down
10 changes: 5 additions & 5 deletions pysla/shifts_builder.py → pyshiftsla/shifts_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import numpy.typing as npt
import polars as pl

from pysla.shiftrange import ShiftRange
from pysla.daterange import DateRange
from pysla.daily_shifts import DailyShift
from pysla.datetime_utilities import Milliseconds
from pysla.common_daysoff import (
from pyshiftsla.shiftrange import ShiftRange
from pyshiftsla.daterange import DateRange
from pyshiftsla.daily_shifts import DailyShift
from pyshiftsla.datetime_utilities import Milliseconds
from pyshiftsla.common_daysoff import (
COMMON_WORKDAYS_IN_WEEK,
COMMON_DAILY_SHIFTS,
WEEKDAYS,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_objects/daysoff.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pysla.common_daysoff import COMMON_WORKDAYS_IN_WEEK
from pyshiftsla.common_daysoff import COMMON_WORKDAYS_IN_WEEK
from tests.test_objects.manual import TEST_YEAR
from tests.test_utils import generate_monthly_days_off

Expand Down
2 changes: 1 addition & 1 deletion tests/test_objects/manual.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import date

from pysla.daterange import DateRange
from pyshiftsla.daterange import DateRange


TEST_YEAR = 2024
Expand Down
10 changes: 5 additions & 5 deletions tests/test_objects/shifts.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from datetime import date
from typing import Tuple, List

from pysla.shift import Shift, SHIFT_STRING, COMPARE_TO_ANOTHER_SHIFT
from pysla.shiftrange import ShiftRange
from pysla.shifts_builder import ShiftsBuilder
from pysla.daily_shifts import DailyShift
from pysla.daterange import DateRange
from pyshiftsla.shift import Shift, SHIFT_STRING, COMPARE_TO_ANOTHER_SHIFT
from pyshiftsla.shiftrange import ShiftRange
from pyshiftsla.shifts_builder import ShiftsBuilder
from pyshiftsla.daily_shifts import DailyShift
from pyshiftsla.daterange import DateRange

left_shift_str = "10101110"
RIGHT_SHIFTS_TO_COMPARE_STR: Tuple[
Expand Down
15 changes: 9 additions & 6 deletions tests/test_objects/shifts_builder.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from pysla.common_daysoff import COMMON_DAILY_SHIFTS, COMMON_WORKDAYS_IN_WEEK
from pysla.shifts_builder import ShiftsBuilder
from pysla.shiftrange import ShiftRange
from pysla.daily_shifts import DailyShift
from pysla.daterange import DateRange
from pysla.shift import Shift
from pyshiftsla.common_daysoff import (
COMMON_DAILY_SHIFTS,
COMMON_WORKDAYS_IN_WEEK,
)
from pyshiftsla.shifts_builder import ShiftsBuilder
from pyshiftsla.shiftrange import ShiftRange
from pyshiftsla.daily_shifts import DailyShift
from pyshiftsla.daterange import DateRange
from pyshiftsla.shift import Shift

from tests.test_objects.manual import (
SOLAR_NEW_YEAR,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_shifts.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pysla.shift import Shift
from pysla.common_daysoff import COMMON_DAILY_SHIFTS
from pyshiftsla.shift import Shift
from pyshiftsla.common_daysoff import COMMON_DAILY_SHIFTS
from datetime import time

from .test_objects.shifts import LEFT_SHIFT, RIGHT_SHIFTS_TO_COMPARE
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sla_calculation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pysla.shifts_builder import ShiftsBuilder, DailyShift
from pyshiftsla.shifts_builder import ShiftsBuilder, DailyShift


def test_default_shiftsbuilder():
Expand Down