Giter Club home page Giter Club logo

networkdays's Issues

Command line - add funtion to print calendar from command line

like Python calendar function ... but only "networdays"

$>python -m calendar
                                  2020

      January                   February                   March
Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
       1  2  3  4  5                      1  2                         1
 6  7  8  9 10 11 12       3  4  5  6  7  8  9       2  3  4  5  6  7  8
13 14 15 16 17 18 19      10 11 12 13 14 15 16       9 10 11 12 13 14 15
20 21 22 23 24 25 26      17 18 19 20 21 22 23      16 17 18 19 20 21 22
27 28 29 30 31            24 25 26 27 28 29         23 24 25 26 27 28 29
                                                    30 31

It may be easily used on text files ;) .. sphinx, restructuredtext ...

remove file: readme_code.ipynb

The file readme_code.ipynb was used to build the first tests for the docs.
Now we have doc tests ... see #8
this file has no need

Add "codecov" badged

Add code below do the readme

.. image:: https://codecov.io/gh/cadu-leite/networkdays/branch/master/graph/badge.svg
     :target: https://codecov.io/gh/cadu-leite/networkdays

An option to list month days intead datetime

Networkdays return a llist of datetime objects

For some cases, a nested list of month days number list per month would be desirable.

[[<month days 1>],[<month days 2>],....[<month days 12>]]

Actually its a nested list of month days, grouped by month ;)

[
    [3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 24, 25, 26, 27, 28, 31],
    [1, 2, 3, 4, 7, 8, 9, 10, 11, 14, 15, 16, 17, 18, 21, 22, 23, 24, 25, 28],
    [1, 2, 3, 4, 7, 8, 9, 10, 11, 14, 15, 16, 17, 18, 21, 22, 23, 24, 25, 28, 29, 30, 31],
    [1, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 18, 19, 20, 21, 22, 25, 26, 27, 28, 29,] 
    [2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 30, 31],
    [1, 2, 3, 6, 7, 8, 9, 10, 13, 14, 15, 16, 17, 20, 21, 22, 23, 24, 27, 28, 29, 30],
    [1, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 18, 19, 20, 21, 22, 25, 26, 27, 28, 29],
    [1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 15, 16, 17, 18, 19, 22, 23, 24, 25, 26, 29, 30, 31],
    [1, 2, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 26, 27, 28, 29, 30,] 
    [3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 24, 25, 26, 27, 28, 31],
    [1, 2, 3, 4, 7, 8, 9, 10, 11, 14, 15, 16, 17, 18, 21, 22, 23, 24, 25, 28, 29, 30],
    [1, 2, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 26, 27, 28, 29, 30]
]

JobSchedule e networkdays namespace

For a better namespace or "dot path"...
I believe would be a good idea
take both classes of the networkdays file
and put each one in his own file ...
networkdays

├── networkdays
│   ├── __init__.py
│   ├── networkdays.py

to be ...

├── networkdays
│   ├── __init__.py
│   ├── networkdays.py
│   └── jobschedule.py

and expose both on init.py , to have one less level on namespaces.

Incompatibility with mypy

hey cadu, how are u doing?

im starting using ur library and just noticed that the code is not being covered by type hintings.

what do u think about we start adding types for the abstraction we already implemented?

im going to open a PR rn adding those type hints

ModuleNotFoundError: No module named 'networkdays'

I've installed this on my linux machines and it works well but when i trying it on my Mac it doesn't. Even if its already installed it will always return: ModuleNotFoundError: No module named 'networkdays'.

TypeError: unsupported operand type(s) for -: 'NoneType' and 'datetime.date'

Suppose to initiate Networkdays class withou date_end parameter...
Its works but raise exception when call :method:Networkdays.networkdays() method.
trace ...

---> 44         date_diff = self.date_end - self.date_start
     45         dates = {
     46             self.date_start + datetime.timedelta(days=days)

TypeError: unsupported operand type(s) for -: 'NoneType' and 'datetime.date'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.