Skip to content

Commit

Permalink
Initial population
Browse files Browse the repository at this point in the history
Co-authored-by: Nihat Engin Toklu <engin@nnaisense.com>
Co-authored-by: Timothy Atkinson <timothy@nnaisense.com>
Co-authored-by: Vojtech Micka <vojtech@nnaisense.com>
Co-authored-by: Rupesh Kumar Srivastava <rupesh@nnaisense.com>
  • Loading branch information
4 people committed Aug 8, 2022
0 parents commit 1691060
Show file tree
Hide file tree
Showing 106 changed files with 26,985 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[run]
omit =
*/evotorch/__init__.py

[report]
exclude_lines =
pragma: no cover
raise AssertionError
raise NotImplementedError
raise TypeError
assert False
@abstractmethod
\.\.\.
if TYPE_CHECKING:
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 120
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
max_line_length = 0

[*.{yaml,yml}]
indent_size = 2

[LICENSE]
insert_final_newline = false

[Makefile]
indent_style = tab
39 changes: 39 additions & 0 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build-docs
on:
push:
branches:
- docs/*
tags:
- "v[0-9]+.*"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout source files
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Python 🐍
uses: actions/setup-python@v2
with:
python-version: 3.9
architecture: x64
cache: 'pip'
cache-dependency-path: 'setup.cfg'

- name: Install Python dependencies
run: pip install .[doc]

- name: Configure Git user
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
- name: Deploy with mike (tag_ 🚀
if: ${{ github.ref_type == 'tag' }}
run: mike deploy --push --rebase --update-aliases ${{ github.ref_name }} latest

- name: Deploy with mike (branch) 🚀
if: ${{ github.ref_type == 'branch' }}
run: mike deploy --push --rebase docs-latest
38 changes: 38 additions & 0 deletions .github/workflows/publish-pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: publish-pypi
on:
push:
tags:
- "v[0-9]+.*"
jobs:
publish:
if: ${{ github.repository == 'nnaisense/evotorch' }}

runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout source files
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false

- name: Set up Python 🐍
uses: actions/setup-python@v2
with:
python-version: 3.9
architecture: x64
cache: 'pip'
cache-dependency-path: 'setup.cfg'

- name: Install Python dependencies
run: pip install --upgrade build

- name: Build package
run: python -m build

- name: Publish package to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
47 changes: 47 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: test

on:
push:
branches:
- master
tags:
- "v[0-9]+.*"

pull_request:
branches:
- master

jobs:
test:

runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout source files
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false

- name: Set up Python 🐍
uses: actions/setup-python@v2
with:
python-version: 3.9
architecture: x64
cache: 'pip'
cache-dependency-path: 'setup.cfg'

- name: Install Python dependencies
run: pip install .[dev]

- name: Run PyTest
run: pytest --cov-report=xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
files: ./coverage.xml
name: codecov-evotorch
verbose: true
154 changes: 154 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# Files generated by setuptools_scm
__version.py

# Examples
examples/docs

# Auto-generated notebook docs
docs/notebooks/*.md

# MacOS
.DS_Store

# Visual Studio Code
.vscode/
*.code-workspace
.history/

# Created by https://www.gitignore.io/api/python
# Edit at https://www.gitignore.io/?templates=python

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# PyCharm
.idea/

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Example data
examples/data

# End of https://www.gitignore.io/api/python
docs/examples/notebooks
46 changes: 46 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
exclude: '^docs/conf.py'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-added-large-files
args: ['--maxkb=2048']
- id: check-ast
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
args: ['--unsafe']
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: mixed-line-ending
args: ['--fix=no']

- repo: https://gitlab.com/pycqa/flake8
rev: '3.9.2'
hooks:
- id: flake8
additional_dependencies:
- flake8-docstrings==1.6.0

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort

- repo: https://github.com/ambv/black
rev: 22.3.0
hooks:
- id: black
args: [--safe]

- repo: https://github.com/kynan/nbstripout
rev: 0.5.0
hooks:
- id: nbstripout
Loading

0 comments on commit 1691060

Please sign in to comment.