-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/softmin/ReHLine-python
- Loading branch information
Showing
52 changed files
with
3,808 additions
and
979 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,28 @@ | ||
name: Build | ||
|
||
on: [push, pull_request] | ||
# on: [push, pull_request] | ||
on: | ||
push: | ||
paths-ignore: | ||
- .gitignore | ||
- README.md | ||
- LICENSE | ||
- doc/ | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, windows-2019] | ||
os: [ubuntu-latest, windows-latest] | ||
|
||
steps: | ||
# Install poetry | ||
- uses: actions/checkout@v4 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
# Used to host poetry | ||
- uses: actions/setup-python@v3 | ||
- name: Lock and install dependencies | ||
run: | | ||
poetry lock | ||
poetry install | ||
- name: Build and build sdist package | ||
run: | | ||
poetry run python setup.py build | ||
poetry run python setup.py sdist | ||
- name: Build wheel package | ||
run: poetry run python setup.py bdist_wheel | ||
|
||
- name: Build wheels for more general OS | ||
run: poetry build --format=wheel | ||
|
||
- uses: pypa/cibuildwheel@v2.16 | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: rehline-wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
path: ./dist | ||
path: ./wheelhouse/*.whl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
{ | ||
"esbonio.sphinx.confDir": "" | ||
"esbonio.sphinx.confDir": "", | ||
"files.associations": { | ||
"random": "cpp", | ||
"type_traits": "cpp", | ||
"tuple": "cpp", | ||
"utility": "cpp" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cmake_minimum_required(VERSION 3.0) | ||
project(rehline LANGUAGES CXX) | ||
|
||
set(PYBIND11_FINDPYTHON ON) | ||
find_package(pybind11 CONFIG REQUIRED) | ||
|
||
pybind11_add_module(rehline MODULE src/rehline.cpp) | ||
|
||
install(TARGETS rehline DESTINATION .) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.summarylabel { | ||
background-color: var(--color-foreground-secondary); | ||
color: var(--color-background-secondary); | ||
font-size: 70%; | ||
padding-left: 2px; | ||
padding-right: 2px; | ||
border-radius: 3px; | ||
vertical-align: 15%; | ||
padding-bottom: 2px; | ||
filter: opacity(40%); | ||
} | ||
|
||
|
||
table.summarytable { | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
API Reference | ||
============= | ||
|
||
This page contains auto-generated API reference documentation. | ||
|
||
.. toctree:: | ||
:titlesonly: | ||
|
||
{% for page in pages %} | ||
{{ page.include_path }} | ||
{% endfor %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{# AutoApiSummary replacement macro #} | ||
{# | ||
The intent of this macro is to replace the autoapisummary directive with the following | ||
improvements: | ||
1) Method signature is generated without typing annotation regardless of the value of | ||
`autodoc_typehints` | ||
2) Properties are treated like attribute (but labelled as properties). | ||
3) Label are added as summary prefix to indicate if the member is a property, class | ||
method, or static method. | ||
|
||
Copyright: Antoine Beyeler, 2022 | ||
License: MIT | ||
#} | ||
|
||
{# Renders an object's name with a proper reference and optional signature. | ||
|
||
The signature is re-generated from obj.obj.args, which is undocumented but is the | ||
only way to have a type-less signature if `autodoc_typehints` is `signature` or | ||
`both`. #} | ||
{% macro _render_item_name(obj, sig=False) -%} | ||
:py:obj:`{{ obj.name }} <{{ obj.id }}>` | ||
{%- if sig -%} | ||
\ ( | ||
{%- for arg in obj.obj.args -%} | ||
{%- if arg[0] %}{{ arg[0]|replace('*', '\*') }}{% endif -%}{{ arg[1] -}} | ||
{%- if not loop.last %}, {% endif -%} | ||
{%- endfor -%} | ||
){%- endif -%} | ||
{%- endmacro %} | ||
|
||
|
||
{# Generates a single object optionally with a signature and a labe. #} | ||
{% macro _item(obj, sig=False, label='') %} | ||
* - {{ _render_item_name(obj, sig) }} | ||
- {% if label %}:summarylabel:`{{ label }}` {% endif %}{% if obj.summary %}{{ obj.summary }}{% else %}\-{% endif +%} | ||
{% endmacro %} | ||
|
||
|
||
|
||
{# Generate an autosummary-like table with the provided members. #} | ||
{% macro auto_summary(objs, title='') -%} | ||
|
||
.. list-table:: {{ title }} | ||
:header-rows: 0 | ||
:widths: auto | ||
:class: summarytable {#- apply CSS class to customize styling +#} | ||
|
||
{% for obj in objs -%} | ||
{#- should the full signature be used? -#} | ||
{%- set sig = (obj.type in ['method', 'function'] and not 'property' in obj.properties) -%} | ||
|
||
{#- compute label -#} | ||
{%- if 'property' in obj.properties -%} | ||
{%- set label = 'prop' -%} | ||
{%- elif 'classmethod' in obj.properties -%} | ||
{%- set label = 'class' -%} | ||
{%- elif 'abstractmethod' in obj.properties -%} | ||
{%- set label = 'abc' -%} | ||
{%- elif 'staticmethod' in obj.properties -%} | ||
{%- set label = 'static' -%} | ||
{%- else -%} | ||
{%- set label = '' -%} | ||
{%- endif -%} | ||
|
||
{{- _item(obj, sig=sig, label=label) -}} | ||
{%- endfor -%} | ||
|
||
{% endmacro %} |
Oops, something went wrong.