Skip to content

Commit 898ced7

Browse files
authored
Initial repository configuration (#1)
* Initial repo configuration * Add vanilla CI and change setup * Add version test * Fix code style * Extend .gitignore with IDE extenstions * Fix setup with path error
1 parent f9b2e52 commit 898ced7

File tree

13 files changed

+240
-0
lines changed

13 files changed

+240
-0
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
11+
env:
12+
DEFAULT_PYTHON_VERSION: "3.10"
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Setup Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
25+
26+
- name: Install requirements
27+
run: |
28+
pip install -r requirements.txt
29+
30+
- name: Debug info
31+
run: |
32+
pip freeze
33+
34+
- name: Run tests
35+
run: |
36+
pytest .

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# build artifacts
2+
3+
.eggs/
4+
.mypy_cache
5+
arrayfire.egg-info/
6+
build/
7+
dist/
8+
9+
10+
# dev tools
11+
12+
venv/
13+
.vscode/
14+
15+
16+
# jupyter notebooks
17+
18+
.ipynb_checkpoints
19+
20+
21+
# miscellaneous
22+
23+
.cache/
24+
doc/_build/
25+
*.swp
26+
.DS_Store
27+
28+
29+
# python
30+
31+
*.pyc
32+
*.pyo
33+
__pycache__
34+
35+
36+
# testing and continuous integration
37+
38+
.coverage
39+
.pytest_cache/
40+
41+
# documentation build artifacts
42+
43+
docs/*.md
44+
docs/api
45+
site/
46+
mkdocs.yml

CHANGELOG.md

Whitespace-only changes.

MANIFEST.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include LICENSE
2+
include README.md
3+
recursive-include arrayfire *
4+
global-exclude .DS_Store *.py[cod]
5+
prune **/__pycache__
6+
prune **/.mypy_cache

arrayfire/__init__.py

Whitespace-only changes.

arrayfire/py.typed

Whitespace-only changes.

arrayfire/version.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import os
2+
3+
_MAJOR = "0"
4+
_MINOR = "1"
5+
# On main and in a nightly release the patch should be one ahead of the last
6+
# released build.
7+
_PATCH = "0"
8+
# This is mainly for nightly builds which have the suffix ".dev$DATE". See
9+
# https://semver.org/#is-v123-a-semantic-version for the semantics.
10+
_SUFFIX = os.environ.get("AF_VERSION_SUFFIX", "")
11+
12+
VERSION_SHORT = "{0}.{1}".format(_MAJOR, _MINOR)
13+
VERSION = "{0}.{1}.{2}{3}".format(_MAJOR, _MINOR, _PATCH, _SUFFIX)

examples/__init__.py

Whitespace-only changes.

requirements.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Build requirements
2+
setuptools
3+
wheel
4+
5+
# Development requirements
6+
-e .[dev,test]

setup.cfg

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
[metadata]
2+
name = arrayfire
3+
description = ArrayFire Python Wrapper
4+
licence = BSD
5+
long_description = file: README.md
6+
long_description_content_type = text/markdown
7+
author = ArrayFire
8+
author_email = [email protected]
9+
url = http://arrayfire.com
10+
classifiers =
11+
Intended Audience :: Science/Research
12+
Development Status :: 5 - Production/Stable
13+
License :: OSI Approved :: BSD License
14+
Programming Language :: Python
15+
Programming Language :: Python :: 3
16+
Programming Language :: Python :: 3.10
17+
Topic :: Scientific/Engineering
18+
Topic :: Scientific/Engineering :: Artificial Intelligence
19+
Topic :: Scientific/Engineering :: Information Analysis
20+
Topic :: Scientific/Engineering :: Mathematics
21+
Topic :: Software Development :: Libraries
22+
keywords =
23+
arrayfire parallel computing gpu cpu opencl
24+
25+
[options]
26+
packages = find:
27+
install_requires =
28+
scikit-build
29+
python_requires =
30+
>=3.10.0
31+
32+
[options.packages.find]
33+
include = arrayfire
34+
exclude =
35+
examples
36+
tests
37+
install_requires =
38+
numpy~=1.22.0
39+
40+
[options.extras_require]
41+
dev =
42+
autopep8~=1.6.0
43+
isort~=5.10.1
44+
flake8~=4.0.1
45+
flake8-quotes~=3.2.0
46+
mypy~=1.3.0
47+
test =
48+
pytest~=7.1.2
49+
pytest-cov~=3.0.0
50+
pytest-isort~=3.0.0
51+
pytest-flake8~=1.1.1
52+
pytest-mypy~=0.3.0
53+
54+
[tool:isort]
55+
line_length = 119
56+
multi_line_output = 4
57+
58+
[flake8]
59+
exclude = venv
60+
application-import-names = arrayfire
61+
import-order-style = pep8
62+
inline-quotes = double
63+
max-line-length = 119
64+
65+
[mypy]
66+
exclude = venv
67+
disallow_incomplete_defs = true
68+
disallow_untyped_defs = true
69+
ignore_missing_imports = true
70+
show_error_codes = true
71+
warn_return_any = true

0 commit comments

Comments
 (0)