-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,125 additions
and
5 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
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
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,58 @@ | ||
nlwpy | ||
============== | ||
|
||
An example project built with [pybind11](/~https://github.com/pybind/pybind11). | ||
This requires Python 3.7+; for older versions of Python, check the commit | ||
history. | ||
|
||
Installation | ||
------------ | ||
|
||
- clone this repository | ||
- `pip install ./nlwpy [--prefix=.]` | ||
|
||
CI Examples | ||
----------- | ||
|
||
There are examples for CI in `.github/workflows`. A simple way to produces | ||
binary "wheels" for all platforms is illustrated in the "wheels.yml" file, | ||
using [`cibuildwheel`][]. You can also see a basic recipe for building and | ||
testing in `pip.yml`, and `conda.yml` has an example of a conda recipe build. | ||
|
||
|
||
Building the documentation | ||
-------------------------- | ||
|
||
Documentation for the example project is generated using Sphinx. Sphinx has the | ||
ability to automatically inspect the signatures and documentation strings in | ||
the extension module to generate beautiful documentation in a variety formats. | ||
The following command generates HTML-based reference documentation; for other | ||
formats please refer to the Sphinx manual: | ||
|
||
- `cd python_example/docs` | ||
- `make html` | ||
|
||
License | ||
------- | ||
|
||
pybind11 is provided under a BSD-style license that can be found in the LICENSE | ||
file. By using, distributing, or contributing to this project, you agree to the | ||
terms and conditions of this license. | ||
|
||
Test call | ||
--------- | ||
|
||
Inline: | ||
|
||
```python | ||
import nlwpy as m | ||
m.add(1, 2) | ||
``` | ||
|
||
Use tests: | ||
|
||
```bash | ||
[PYTHONPATH=./<installation path++>] python test.py | ||
``` | ||
|
||
[`cibuildwheel`]: https://cibuildwheel.readthedocs.io |
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,35 @@ | ||
package: | ||
name: python_example | ||
version: 0.0.1 | ||
|
||
source: | ||
path: .. | ||
|
||
build: | ||
number: 0 | ||
script: {{ PYTHON }} -m pip install . -vvv | ||
|
||
requirements: | ||
build: | ||
- {{ compiler('cxx') }} | ||
|
||
host: | ||
- python | ||
- pip | ||
- pybind11 >=2.10.0 | ||
|
||
run: | ||
- python | ||
|
||
|
||
test: | ||
imports: | ||
- python_example | ||
source_files: | ||
- tests | ||
commands: | ||
- python tests/test.py | ||
|
||
about: | ||
summary: An example project built with pybind11. | ||
license_file: LICENSE |
Oops, something went wrong.