Giter Club home page Giter Club logo

normal-form's Introduction

Hi there ๐Ÿ‘‹

You have reached the GitHub page of Vaibhav Karve. He is a Senior Data Scientist at the SimSpace Corporation. He used to be a grad student at the UofI, till he graduated with a PhD in Mathematics in 2021. You can get more information (on publications, CV, teaching, talks, and random projects) by visiting his website at vaibhavkarve.github.io.

Technologies โšก

  • Python, Lean theorem prover, SageMath, Octave, Coq, Haskell, ELisp, bash, make
  • LaTeX, plain TeX, CoCalc, XPPaut, Docker, Emacs, git, GitHub/GitLab
  • Computational graph theory, Data science, Mathematical modelling, High-dimensional data, Machine learning and neural networks, Formal verification, Computational complexity, Algorithms
  • Currently learning: Julia, Scheme

normal-form's People

Contributors

dependabot[bot] avatar vaibhavkarve avatar

Watchers

 avatar

normal-form's Issues

Make CI/CD pipeline faster

Currently, each run of the pipeline takes 6+ minutes. This needs to be
faster for smoother testing.

Slowest step is dependency installation which takes 5+ minutes. This
can be mitigated by using poetry cache and setting it up correctly.

Also check if using some other base (other than Ubuntu) is faster?

Possible solutions to the resolution of this task would be:

  1. Read up on github actions, workflows and caching between runs.
  2. Ask online for someone to review my CI/CD pipeline.

Fix all issues reported by the linter

The liter errors can be listed by running the just lint command.

poetry run pylint -vvv normal_form/ tests/
Using config file /home/vaibhav/projects/normal-form/pyproject.toml
************* Module normal_form.cnf
normal_form/cnf.py:28:0: C0115: Missing class docstring (missing-class-docstring)
normal_form/cnf.py:51:0: C0115: Missing class docstring (missing-class-docstring)
normal_form/cnf.py:55:22: E1101: Instance of 'Lit' has no 'value' member (no-member)
normal_form/cnf.py:101:0: C0116: Missing function or method docstring (missing-function-docstring)
normal_form/cnf.py:300:0: C0116: Missing function or method docstring (missing-function-docstring)
normal_form/cnf.py:419:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module tests.test_sxpr
tests/test_sxpr.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/test_sxpr.py:8:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_sxpr.py:14:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module tests.test_prop
tests/test_prop.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/test_prop.py:22:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_prop.py:38:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_prop.py:59:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_prop.py:73:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_prop.py:90:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_prop.py:110:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_prop.py:114:38: W1114: Positional arguments appear to be out of order (arguments-out-of-order)
tests/test_prop.py:124:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_prop.py:140:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_prop.py:161:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_prop.py:175:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_prop.py:193:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_prop.py:213:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_prop.py:229:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_prop.py:231:4: W0106: Expression "cnf_and_cnf(cnf1, cnf_or_cnf(cnf2, cnf3)) == cnf_or_cnf(cnf_and_cnf(cnf1, cnf2), cnf_and_cnf(cnf1, cnf3))" is assigned to nothing (expression-not-assigned)
tests/test_prop.py:234:4: W0106: Expression "cnf_or_cnf(cnf1, cnf_or_cnf(cnf2, cnf3)) == cnf_and_cnf(cnf_or_cnf(cnf1, cnf2), cnf_or_cnf(cnf1, cnf3))" is assigned to nothing (expression-not-assigned)
tests/test_prop.py:240:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_prop.py:248:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module tests.test_cnf_simplify
tests/test_cnf_simplify.py:14:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf_simplify.py:23:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf_simplify.py:29:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf_simplify.py:35:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf_simplify.py:41:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module tests.test_normal_form
tests/test_normal_form.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/test_normal_form.py:5:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module tests.test_cnf
tests/test_cnf.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/test_cnf.py:18:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:34:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:54:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:63:8: E1101: Instance of 'Lit' has no 'value' member (no-member)
tests/test_cnf.py:68:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:84:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:93:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:108:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:116:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:137:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:144:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:151:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:166:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:178:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:184:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:198:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:205:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:212:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:248:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:255:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:265:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:283:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:294:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:307:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:318:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:328:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:345:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_cnf.py:353:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module tests.test_sat
tests/test_sat.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/test_sat.py:11:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_sat.py:28:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_sat.py:43:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_sat.py:58:0: C0116: Missing function or method docstring (missing-function-docstring)

------------------------------------------------------------------
Your code has been rated at 8.84/10 (previous run: 8.84/10, +0.00)

poetry run pycodestyle --max-line-length=95 normal_form/ tests/
poetry run pydocstyle normal_form/ tests/
normal_form/sxpr.py:38 in public class `SatSxpr`:
        D204: 1 blank line required after class docstring (found 0)
normal_form/sxpr.py:48 in public method `__init__`:
        D107: Missing docstring in __init__
normal_form/cnf_simplify.py:58 in public function `reduce_distance_one_clauses`:
        D400: First line should end with a period (not 'e')
normal_form/cnf.py:28 in public class `Bool`:
        D101: Missing docstring in public class
normal_form/cnf.py:32 in public method `__lt__`:
        D105: Missing docstring in magic method
normal_form/cnf.py:39 in public method `__eq__`:
        D105: Missing docstring in magic method
normal_form/cnf.py:46 in public method `__hash__`:
        D105: Missing docstring in magic method
normal_form/cnf.py:51 in public class `Lit`:
        D101: Missing docstring in public class
normal_form/cnf.py:54 in public method `__repr__`:
        D105: Missing docstring in magic method
normal_form/cnf.py:59 in public class `Clause`:
        D204: 1 blank line required after class docstring (found 0)
normal_form/cnf.py:60 in public method `__repr__`:
        D105: Missing docstring in magic method
normal_form/cnf.py:101 in public function `lit`:
        D103: Missing docstring in public function
normal_form/cnf.py:300 in public function `tauto_reduce`:
        D103: Missing docstring in public function
normal_form/cnf.py:419 in public function `int_repr`:
        D103: Missing docstring in public function
tests/__init__.py:1 at module level:
        D104: Missing docstring in public package

Compilation finished at Wed Sep  7 08:04:29

Failing test: test_SatSxpr

Full failure message --

____________ test_SatSxpr _____________________________________________

    def test_SatSxpr() -> None:
        # empty arguments
>       assert SatSxpr(op.__and__, ()).reduce()

tests/test_sxpr.py:16:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <[AttributeError("'SatSxpr' object has no attribute 'op'") raised in repr()] SatSxpr object at 0x7fb060502080>, op = <built-in function and_>, terms = ()

    def __init__(self, op: Callable[[bool, Src], bool], terms: Tuple[Src, ...]):
        init: bool
        if op.__name__ == 'sat_and':
            init = True
        elif op.__name__ == 'sat_or':
            init = False
        else:
>           raise ValueError(f'Unknown operation {op} encountered')
E           ValueError: Unknown operation <built-in function and_> encountered

normal_form/sxpr.py:55: ValueError

---------- coverage: platform linux, python 3.10.4-final-0 -----------
Name                          Stmts   Miss  Cover   Missing
-----------------------------------------------------------
normal_form/__init__.py           2      0   100%
normal_form/cnf.py              140      0   100%
normal_form/cnf_simplify.py      29      0   100%
normal_form/prop.py              32      1    97%   90
normal_form/sat.py               60      0   100%
normal_form/sxpr.py              24      3    88%   51, 53, 56
-----------------------------------------------------------
TOTAL                           287      4    99%

Continue ... adding status badges to repo readme from #11

List of badges:

  • Python versions supported
  • License badge
  • CI/CD passing
  • Test coverage
  • Documentation coverage (interrogate)
  • Website (docs) build process success
  • Package build process success (if I implement this)
  • Link to PYPI
  • DOI (once i get a new one for this project)

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.