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

Sync workalendar 7 0 0 #10

Merged
merged 24 commits into from
Nov 8, 2019
Merged

Sync workalendar 7 0 0 #10

merged 24 commits into from
Nov 8, 2019

Conversation

ShaheedHaque
Copy link
Collaborator

@ShaheedHaque ShaheedHaque commented Nov 8, 2019

As requested, here is a NOT-READY-TO-MERGE pull request for a sync with upstream Workalendar v7.0.0.

I have reviewed the deltas, and have not seen anything of note. However, it is not ready to merge because I have been unable to do any testing as tox fails to run in some obscure way on my system:

$ tox
python create: /main/srhaque/.../calendra/.tox/python
Python 2.7.16
________________________________________________________________________________________ summary _________________________________________________________________________________________
  python: commands succeeded
  congratulations :)
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/tox/__main__.py", line 4, in <module>
    tox.cmdline()
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/tox/session/__init__.py", line 44, in cmdline
    main(args)
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/tox/session/__init__.py", line 68, in main
    exit_code = session.runcommand()
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/tox/session/__init__.py", line 192, in runcommand
    return self.subcommand_test()
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/tox/session/__init__.py", line 220, in subcommand_test
    run_sequential(self.config, self.venv_dict)
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/tox/session/commands/run/sequential.py", line 9, in run_sequential
    if venv.setupenv():
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/tox/venv.py", line 594, in setupenv
    status = self.update(action=action)
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/tox/venv.py", line 252, in update
    self.hook.tox_testenv_create(action=action, venv=self)
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/pluggy/manager.py", line 92, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/pluggy/manager.py", line 86, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/tox_pip_version/hooks.py", line 50, in tox_testenv_create
    _testenv_create(venv, action)
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/tox_pip_version/hooks.py", line 24, in _testenv_create
    finished = tox_testenv_create(venv, action)
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/tox_venv/hooks.py", line 92, in tox_testenv_create
    real_executable = real_python3(config_interpreter, version_dict)
  File "/main/srhaque/kdedev/calendra/.tox/.tox/lib/python3.7/site-packages/tox_venv/hooks.py", line 67, in real_python3
    assert v1 == v2, 'Expected versions to match (%s != %s).' % (v1, v2)
AssertionError: Expected versions to match (b'Python 3.7.3\n' != b'').

Possibly some Python2 versus Python3 thing?

brunobord and others added 23 commits July 7, 2019 22:29
Fix Romania, mixin order matters when mixing in OrthodoxMixin
Global registry now returns plain built-in dicts instead of OrderedDict's
This Mixin was barely a mixin at all: none of its method was using ``self``.

it refers to workalendar#302, but not essentially. The goal of this refactoring is to simplify classes hierarchy, and it might also simplify the swap between `ephem` and `skyfield`.
…tions

Removed ``EphemMixin`` in favor of astronomical functions
…ar#394)

Fix duration calculation with starting day included or not

This patch adds a ``include_start`` argument in the ``get_working_days_delta`` methods to include the starting date in the delta count (or not)

closes workalendar#393
refs workalendar#302, workalendar#348
closes workalendar#398

Many thanks to @GammaSagittarii for the tremendous help on finding the right way to compute Chinese Solar Terms.
…ield

Drop (py)ephem dependency in favor of Skyfield
@ShaheedHaque
Copy link
Collaborator Author

I still don't have tox working, but pytest locally and Travis CI seems clean. Please review and consider merging.

@jaraco jaraco merged commit 671a4b2 into jaraco:master Nov 8, 2019
@jaraco
Copy link
Owner

jaraco commented Nov 8, 2019

Awesome. Thanks so much for this. Not sure what's up with tox, but it runs great for me locally (and in CI). Maybe consider tox -r to rebuild the environment (or rm -r .tox).

@ShaheedHaque
Copy link
Collaborator Author

ShaheedHaque commented Nov 9, 2019 via email

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.

None yet

4 participants