Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
d8c7ee00
Unverified
Commit
d8c7ee00
authored
Jul 20, 2020
by
Henry Schreiner
Committed by
GitHub
Jul 20, 2020
Browse files
ci: GHA basic format & pre-commit (#2309)
parent
e2488698
Changes
60
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
76 additions
and
21 deletions
+76
-21
.github/workflows/format.yml
.github/workflows/format.yml
+19
-0
.pre-commit-config.yaml
.pre-commit-config.yaml
+28
-0
CONTRIBUTING.md
CONTRIBUTING.md
+7
-2
docs/advanced/cast/index.rst
docs/advanced/cast/index.rst
+0
-1
docs/advanced/classes.rst
docs/advanced/classes.rst
+2
-2
docs/advanced/misc.rst
docs/advanced/misc.rst
+5
-5
docs/advanced/pycpp/object.rst
docs/advanced/pycpp/object.rst
+4
-4
docs/benchmark.py
docs/benchmark.py
+1
-0
docs/benchmark.rst
docs/benchmark.rst
+0
-2
docs/conf.py
docs/conf.py
+2
-2
docs/limitations.rst
docs/limitations.rst
+0
-1
pybind11/__init__.py
pybind11/__init__.py
+1
-0
pybind11/__main__.py
pybind11/__main__.py
+1
-0
pybind11/_version.py
pybind11/_version.py
+1
-0
setup.py
setup.py
+1
-0
tests/conftest.py
tests/conftest.py
+1
-0
tests/constructor_stats.h
tests/constructor_stats.h
+0
-1
tests/test_async.py
tests/test_async.py
+1
-0
tests/test_buffers.py
tests/test_buffers.py
+1
-0
tests/test_builtin_casters.py
tests/test_builtin_casters.py
+1
-1
No files found.
.github/workflows/format.yml
0 → 100644
View file @
d8c7ee00
name
:
Format
on
:
workflow_dispatch
:
pull_request
:
push
:
branches
:
-
master
-
stable
-
"
v*"
jobs
:
pre-commit
:
name
:
Format
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v2
-
uses
:
actions/setup-python@v2
-
uses
:
pre-commit/action@v2.0.0
.pre-commit-config.yaml
0 → 100644
View file @
d8c7ee00
repos
:
-
repo
:
https://github.com/pre-commit/pre-commit-hooks
rev
:
v3.1.0
hooks
:
-
id
:
check-added-large-files
-
id
:
check-case-conflict
-
id
:
check-merge-conflict
-
id
:
check-symlinks
-
id
:
check-yaml
-
id
:
debug-statements
-
id
:
end-of-file-fixer
-
id
:
mixed-line-ending
-
id
:
requirements-txt-fixer
-
id
:
trailing-whitespace
-
id
:
fix-encoding-pragma
-
repo
:
https://github.com/Lucas-C/pre-commit-hooks
rev
:
v1.1.7
hooks
:
-
id
:
remove-tabs
exclude
:
(Makefile|debian/rules|.gitmodules)(\.in)?$
-
repo
:
https://gitlab.com/pycqa/flake8
rev
:
3.8.2
hooks
:
-
id
:
flake8
additional_dependencies
:
[
flake8-bugbear
]
exclude
:
^(docs/.*|tools/.*)$
CONTRIBUTING.md
View file @
d8c7ee00
...
@@ -27,11 +27,16 @@ adhere to the following rules to make the process as smooth as possible:
...
@@ -27,11 +27,16 @@ adhere to the following rules to make the process as smooth as possible:
do add value by themselves.
do add value by themselves.
*
Add tests for any new functionality and run the test suite (
``make pytest``
)
*
Add tests for any new functionality and run the test suite (
``make pytest``
)
to ensure that no existing features break.
to ensure that no existing features break.
*
Please run
``flake8``
and
``tools/check-style.sh``
to check your code matches
*
Please run
[
``pre-commit``
][
pre-commit
]
and
``tools/check-style.sh``
to check
the project style. (Note that
``check-style.sh``
requires
``gawk``
.)
your code matches the project style. (Note that
``check-style.sh``
requires
``gawk``
.) Use
`pre-commit run --all-files`
before committing (or use
installed-mode, check pre-commit docs) to verify your code passes before
pushing to save time.
*
This project has a strong focus on providing general solutions using a
*
This project has a strong focus on providing general solutions using a
minimal amount of code, thus small pull requests are greatly preferred.
minimal amount of code, thus small pull requests are greatly preferred.
[
pre-commit
]:
https://pre-commit.com
### Licensing of contributions
### Licensing of contributions
pybind11 is provided under a BSD-style license that can be found in the
pybind11 is provided under a BSD-style license that can be found in the
...
...
docs/advanced/cast/index.rst
View file @
d8c7ee00
...
@@ -39,4 +39,3 @@ the last case of the above list.
...
@@ -39,4 +39,3 @@ the last case of the above list.
chrono
chrono
eigen
eigen
custom
custom
docs/advanced/classes.rst
View file @
d8c7ee00
docs/advanced/misc.rst
View file @
d8c7ee00
docs/advanced/pycpp/object.rst
View file @
d8c7ee00
docs/benchmark.py
View file @
d8c7ee00
# -*- coding: utf-8 -*-
import
random
import
random
import
os
import
os
import
time
import
time
...
...
docs/benchmark.rst
View file @
d8c7ee00
...
@@ -93,5 +93,3 @@ favor.
...
@@ -93,5 +93,3 @@ favor.
.. only:: latex
.. only:: latex
.. image:: pybind11_vs_boost_python2.png
.. image:: pybind11_vs_boost_python2.png
docs/conf.py
View file @
d8c7ee00
docs/limitations.rst
View file @
d8c7ee00
...
@@ -17,4 +17,3 @@ These features could be implemented but would lead to a significant increase in
...
@@ -17,4 +17,3 @@ These features could be implemented but would lead to a significant increase in
complexity. I've decided to draw the line here to keep this project simple and
complexity. I've decided to draw the line here to keep this project simple and
compact. Users who absolutely require these features are encouraged to fork
compact. Users who absolutely require these features are encouraged to fork
pybind11.
pybind11.
pybind11/__init__.py
View file @
d8c7ee00
# -*- coding: utf-8 -*-
from
._version
import
version_info
,
__version__
# noqa: F401 imported but unused
from
._version
import
version_info
,
__version__
# noqa: F401 imported but unused
...
...
pybind11/__main__.py
View file @
d8c7ee00
# -*- coding: utf-8 -*-
from
__future__
import
print_function
from
__future__
import
print_function
import
argparse
import
argparse
...
...
pybind11/_version.py
View file @
d8c7ee00
# -*- coding: utf-8 -*-
version_info
=
(
2
,
5
,
'dev1'
)
version_info
=
(
2
,
5
,
'dev1'
)
__version__
=
'.'
.
join
(
map
(
str
,
version_info
))
__version__
=
'.'
.
join
(
map
(
str
,
version_info
))
setup.py
View file @
d8c7ee00
#!/usr/bin/env python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Setup script for PyPI; use CMakeFile.txt to build extension modules
# Setup script for PyPI; use CMakeFile.txt to build extension modules
...
...
tests/conftest.py
View file @
d8c7ee00
# -*- coding: utf-8 -*-
"""pytest configuration
"""pytest configuration
Extends output capture as needed by pybind11: ignore constructors, optional unordered lines.
Extends output capture as needed by pybind11: ignore constructors, optional unordered lines.
...
...
tests/constructor_stats.h
View file @
d8c7ee00
...
@@ -273,4 +273,3 @@ template <class T, typename... Values> void print_values(T *inst, Values &&...va
...
@@ -273,4 +273,3 @@ template <class T, typename... Values> void print_values(T *inst, Values &&...va
print_constr_details
(
inst
,
":"
,
values
...);
print_constr_details
(
inst
,
":"
,
values
...);
track_values
(
inst
,
values
...);
track_values
(
inst
,
values
...);
}
}
tests/test_async.py
View file @
d8c7ee00
# -*- coding: utf-8 -*-
import
asyncio
import
asyncio
import
pytest
import
pytest
from
pybind11_tests
import
async_module
as
m
from
pybind11_tests
import
async_module
as
m
...
...
tests/test_buffers.py
View file @
d8c7ee00
# -*- coding: utf-8 -*-
import
io
import
io
import
struct
import
struct
import
sys
import
sys
...
...
tests/test_builtin_casters.py
View file @
d8c7ee00
#
Python < 3 needs this:
coding
=
utf-8
#
-*-
coding
:
utf-8
-*-
import
pytest
import
pytest
from
pybind11_tests
import
builtin_casters
as
m
from
pybind11_tests
import
builtin_casters
as
m
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment