GithubHelp home page GithubHelp logo

destag / at-date Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 11.0 230 KB

Simple Python library for at-date string parsing

Home Page: https://destag.github.io/at-date/

License: MIT License

Python 100.00%
datetime hacktoberfest parser python utility

at-date's Introduction

at-date's People

Contributors

andrzej3393 avatar b3g00d avatar dependabot-preview[bot] avatar dependabot[bot] avatar destag avatar pjbollinger avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

at-date's Issues

Parametrize tests

Every test should check if parsing changes day, month and year. What will probably end with massive code duplication.

For this reason, the tests should be refactored and parametrized. I think we can try to do it with pytest parametrization.

Other ideas are welcome.

Add rule to parser to omit word 'now'

Parser now require string in format like now next month.

It would be good if word now would be optional and strings like next month would be parsed like one above.

This change requires adding rule to parser string and probably adding additional methods to api.py.

Add tests

Add more pytest tests into test/test_atdate.py

Add better Readme

Readme should include info about:

  • general info about project
  • how to install package
  • basic usage of package

Add docstrings

It would be good to write some docstrings to describe public methods in api.py file.

Docstrings should be in format:

"""Short description.

Longer description
if needed.

Args:
    param1 (int): The first parameter.
    param2 (str): The second parameter.

Returns:
    int: Sum of param1 and length of param2.

Raises:
    ValueError: If arguments have wrong types.

"""

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.