Merge pull request #7 from ndem0/actions
add github actions, fix readme for pypi
This commit is contained in:
23
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
23
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: bug
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
The piece of code that reproduce the bug.
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Output**
|
||||||
|
The obtained output. Please include the entire error trace.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
||||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: enhancement
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
||||||
14
.github/ISSUE_TEMPLATE/help-wanted.md
vendored
Normal file
14
.github/ISSUE_TEMPLATE/help-wanted.md
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
name: Help wanted
|
||||||
|
about: Ask help for using the package
|
||||||
|
title: ''
|
||||||
|
labels: help wanted
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**The objective**
|
||||||
|
A clear description of the purpose of your application.
|
||||||
|
|
||||||
|
**Already tried tests**
|
||||||
|
The snippet of code you have already tried in order to obtain the wanted outcome.
|
||||||
35
.github/workflows/ci.yml
vendored
Normal file
35
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
name: "Coverage Deploy to Codacy"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test_deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.8
|
||||||
|
|
||||||
|
- name: Install Python dependencies
|
||||||
|
run: |
|
||||||
|
python3 -m pip install --upgrade pip
|
||||||
|
python3 -m pip install .[test]
|
||||||
|
|
||||||
|
- name: Test with pytest
|
||||||
|
env:
|
||||||
|
CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
python3 -m pytest --cov-report term --cov-report xml:cobertura.xml --cov=pina
|
||||||
|
curl -s https://coverage.codacy.com/get.sh -o CodacyCoverageReporter.sh
|
||||||
|
chmod +x CodacyCoverageReporter.sh
|
||||||
|
./CodacyCoverageReporter.sh report -r cobertura.xml -t $CODACY_API_TOKEN
|
||||||
|
|
||||||
31
.github/workflows/pypi-publish.yml
vendored
Normal file
31
.github/workflows/pypi-publish.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
name: "PYPI Publish"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docs:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Python 3.7
|
||||||
|
uses: actions/setup-python@v1
|
||||||
|
with:
|
||||||
|
python-version: 3.7
|
||||||
|
|
||||||
|
- name: Install build
|
||||||
|
run: >-
|
||||||
|
python -m pip install build --user
|
||||||
|
|
||||||
|
- name: Build a binary wheel and a source tarball
|
||||||
|
run: >-
|
||||||
|
python -m build --sdist --wheel --outdir dist/ .
|
||||||
|
|
||||||
|
- name: Publish distribution to PyPI
|
||||||
|
if: startsWith(github.ref, 'refs/tags')
|
||||||
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
|
with:
|
||||||
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
26
.github/workflows/sphinx-build.yml
vendored
Normal file
26
.github/workflows/sphinx-build.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: "Documentation Deploy"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docs:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Create the new documentation
|
||||||
|
uses: ammaraskar/sphinx-action@master
|
||||||
|
with:
|
||||||
|
pre-build-command: "python -m pip .[docs]"
|
||||||
|
docs-folder: "docs/"
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
#deploy_key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
|
||||||
|
publish_dir: ./docs/build/html
|
||||||
|
allow_empty_commit: true
|
||||||
34
.github/workflows/testing_pr.yml
vendored
Normal file
34
.github/workflows/testing_pr.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
name: "Testing Pull Request"
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [windows-latest, macos-latest, ubuntu-latest]
|
||||||
|
python-version: [3.7, 3.8]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
- name: Install Python dependencies
|
||||||
|
run: |
|
||||||
|
python3 -m pip install --upgrade pip
|
||||||
|
python3 -m pip install .[test]
|
||||||
|
|
||||||
|
- name: Test with pytest
|
||||||
|
run: |
|
||||||
|
python3 -m pytest
|
||||||
@@ -18,3 +18,5 @@ __version__ = "0.0.1"
|
|||||||
__mail__ = 'demo.nicola@gmail.com, ' # TODO
|
__mail__ = 'demo.nicola@gmail.com, ' # TODO
|
||||||
__maintainer__ = __author__
|
__maintainer__ = __author__
|
||||||
__status__ = "Alpha"
|
__status__ = "Alpha"
|
||||||
|
__packagename__ = "pina-mathlab"
|
||||||
|
|
||||||
|
|||||||
5
setup.py
5
setup.py
@@ -5,7 +5,8 @@ with open("pina/meta.py") as fp:
|
|||||||
exec(fp.read(), meta)
|
exec(fp.read(), meta)
|
||||||
|
|
||||||
# Package meta-data.
|
# Package meta-data.
|
||||||
NAME = meta['__title__']
|
IMPORTNAME = meta['__title__']
|
||||||
|
PIPNAME = meta['__packagename__']
|
||||||
DESCRIPTION = 'Physic Informed Neural networks for Advance modeling.'
|
DESCRIPTION = 'Physic Informed Neural networks for Advance modeling.'
|
||||||
URL = 'https://github.com/mathLab/PINA'
|
URL = 'https://github.com/mathLab/PINA'
|
||||||
MAIL = meta['__mail__']
|
MAIL = meta['__mail__']
|
||||||
@@ -27,7 +28,7 @@ LDESCRIPTION = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name=NAME,
|
name=PIPNAME,
|
||||||
version=VERSION,
|
version=VERSION,
|
||||||
description=DESCRIPTION,
|
description=DESCRIPTION,
|
||||||
long_description=LDESCRIPTION,
|
long_description=LDESCRIPTION,
|
||||||
|
|||||||
Reference in New Issue
Block a user