Commit Graph

14 Commits

Author SHA1 Message Date
Alex Bezzubov
e6c8cf49c2 ci: fix python on macos
* bump cffi
 * add Go
2024-05-11 20:21:36 +02:00
Alex Bezzubov
314ed3a388 ci: fix python tests on ubuntu 2024-05-11 20:09:12 +02:00
Alex Bezzubov
8b8cc8a17b test: fix Python tests 2023-09-22 14:42:44 +02:00
Ville Laitila
8d83871580 Fix typo in the pip command in README.md 2020-11-14 23:29:53 +02:00
Alexander Bezzubov
328c16f948 py: use readme as pypy description
Signed-off-by: Alexander Bezzubov <alexander.bezzubov@jetbrains.com>
2020-08-12 15:22:55 +02:00
Alexander Bezzubov
7ee65cc9d0 doc: upd build instructions
Signed-off-by: Alexander Bezzubov <alexander.bezzubov@jetbrains.com>
2020-08-12 15:22:50 +02:00
Maxim Vasilev
59f0f17834 Remove unneded todos 2020-08-11 00:29:33 +03:00
Maxim Vasilev
08bc9bca0e Cover the rest of python bindings from shared library, add tests, add docstrings, add setup.py. 2020-08-11 00:12:43 +03:00
Miguel Molina
8ff885a3a8
implement IsGenerated helper to filter out generated files
Closes #17

Implements the IsGenerated helper function to filter out generated
files using the rules and matchers in:
- https://github.com/github/linguist/blob/master/lib/linguist/generated.rb

Since the vast majority of matchers have very different logic, it cannot
be autogenerated directly from linguist like other logics in enry, so it's
translated by hand.

There are three different types of matchers in this implementation:
- By extension, which mark as generated based only in the extension. These
  are the fastest matchers, so they're done first.
- By file name, which matches patterns against the filename. These
  are performed in second place. Unlike linguist, we try to use string
  functions instead of regexps as much as possible.
- Finally, the rest of the matchers, which go into the content and try
  to identify if they're generated or not based on the content. Unlike
  linguist, we try to only read the content we need and not split it
  all unless it's necessary and use byte functions instead of regexps
  as much as possible.

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
2020-05-28 08:55:13 +02:00
Alexander Bezzubov
35575d0a3e
py: expose highest-level enry.language()
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2020-04-24 20:51:46 +02:00
Alexander Bezzubov
6cf5bf2ca4
python: expose is_vendor()
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2019-10-14 19:38:33 +02:00
Alexander Bezzubov
be583cad06
python: add dependencies
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2019-10-14 19:38:33 +02:00
Alexander Bezzubov
cff9c07009
python: expose language_by_filename()
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2019-10-14 19:38:33 +02:00
Alexander Bezzubov
ee7a0f1139
python: initial impl of bindings using cFFI
A PoC that exposes single function
`enry.language_by_extension()` and a small
number of helpers to deal with string
coversion between Go<->C<->Python.

Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2019-10-14 19:38:33 +02:00