-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix more workflow python 3.7 flake8 static typing more badges fix more docs fix fix fix fix more badge add fix more fix fix Fix more try fix fix fix fix fix fix more more fix more tests fix fix fix fix fix
- Loading branch information
Showing
25 changed files
with
653 additions
and
97 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: deploy-docs | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.7] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install sphinx sphinx_rtd_theme matplotlib pillow sphinx-gallery | ||
pip install -r optional_requirements.txt | ||
pip install . | ||
# build docs | ||
- name: Build documents | ||
run: sphinx-build docs build | ||
# try deploying | ||
- name: Set up environments | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo ${{secrets.zasdfgbnm_bot_private_key}} | base64 -d > ~/.ssh/id_rsa | ||
chmod 0600 ~/.ssh/id_rsa | ||
echo ${{secrets.zasdfgbnm_bot_public_key}} > ~/.ssh/id_rsa.pub | ||
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "zasdfgbnm-bot" | ||
- name: Deploy | ||
run: | | ||
git clone [email protected]:aiqm/nnp.git deploy_dir -b gh-pages | ||
rm -rf deploy_dir/* | ||
touch deploy_dir/.nojekyll | ||
cp -r build/* deploy_dir | ||
cd deploy_dir | ||
git add . | ||
git commit -m "update" | ||
git push |
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,27 @@ | ||
name: deploy-pypi | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.7] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Deploy | ||
run: | | ||
python -m pip install --upgrade pip twine wheel | ||
rm -rf dist/* | ||
python setup.py bdist bdist_wheel | ||
twine upload -u zasdfgbnm-bot -p ${{secrets.zasdfgbnm_bot_pypi_password}} dist/* |
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,32 @@ | ||
name: deploy-test-pypi | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.7] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Deploy | ||
run: | | ||
python -m pip install --upgrade pip twine wheel | ||
rm -rf dist/* | ||
git tag $(date +'v%Y.%m.%d.%H.%M.%S') | ||
python setup.py bdist bdist_wheel | ||
twine upload --repository-url https://test.pypi.org/legacy/ -u zasdfgbnm-bot -p ${{secrets.zasdfgbnm_bot_test_pypi_password}} dist/* |
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,53 @@ | ||
name: docs | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.6, 3.7] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install sphinx sphinx_rtd_theme matplotlib pillow sphinx-gallery | ||
pip install -r optional_requirements.txt | ||
pip install . | ||
# build docs | ||
- name: Build documents | ||
run: sphinx-build docs build | ||
# try deploying to aiqm/nnp-test-docs | ||
- name: Set up environments | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo ${{secrets.zasdfgbnm_bot_private_key}} | base64 -d > ~/.ssh/id_rsa | ||
chmod 0600 ~/.ssh/id_rsa | ||
echo ${{secrets.zasdfgbnm_bot_public_key}} > ~/.ssh/id_rsa.pub | ||
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "zasdfgbnm-bot" | ||
- name: Deploy | ||
run: | | ||
git clone [email protected]:aiqm/nnp-test-docs.git deploy_dir -b gh-pages | ||
rm -rf deploy_dir/* | ||
touch deploy_dir/.nojekyll | ||
cp -r build/* deploy_dir | ||
cd deploy_dir | ||
git add . | ||
git commit -m "update" | ||
git push --force || true |
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,30 @@ | ||
name: flake8 | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.6, 3.7] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Lint with flake8 | ||
run: | | ||
pip install --upgrade pip flake8 | ||
pip install . | ||
flake8 . |
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,30 @@ | ||
name: mypy | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.6, 3.7] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Type checking with mypy | ||
run: | | ||
pip install --upgrade pip mypy | ||
pip install . | ||
mypy --ignore-missing-imports . |
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,30 @@ | ||
name: test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.6, 3.7] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run tests | ||
run: | | ||
pip install -r optional_requirements.txt | ||
pip install . | ||
pytest |
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,9 @@ | ||
/dist | ||
/.eggs | ||
/nnp.egg-info | ||
/.mypy_cache | ||
/.vscode | ||
/build | ||
/docs/examples | ||
/docs/code | ||
*.pyc |
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,7 @@ | ||
Copyright 2018- Xiang Gao and other ANI developers | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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,14 @@ | ||
Still WIP | ||
|
||
Status: | ||
|
||
[](https://github.com/aiqm/nnp/actions) | ||
[](https://github.com/aiqm/nnp/actions) | ||
[](https://github.com/aiqm/nnp/actions) | ||
[](https://github.com/aiqm/nnp/actions) | ||
[](https://github.com/aiqm/nnp/actions) | ||
[](https://github.com/aiqm/nnp/actions) | ||
[](https://github.com/aiqm/nnp/actions) | ||
|
||
examples are also tests | ||
library is also docs |
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,6 @@ | ||
.. automodule:: nnp.pbc | ||
:members: | ||
.. automodule:: nnp.md | ||
:members: | ||
.. automodule:: nnp.vib | ||
:members: |
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,59 @@ | ||
import nnp # noqa: F401 | ||
import sphinx_rtd_theme | ||
|
||
project = 'NNP' | ||
copyright = '2019, Xiang Gao' | ||
author = 'Xiang Gao' | ||
|
||
version = nnp.__version__ | ||
release = nnp.__version__ | ||
|
||
extensions = [ | ||
'sphinx.ext.autodoc', | ||
'sphinx.ext.napoleon', | ||
'sphinx.ext.intersphinx', | ||
'sphinx.ext.mathjax', | ||
'sphinx.ext.viewcode', | ||
'sphinx_gallery.gen_gallery', | ||
] | ||
|
||
templates_path = ['_templates'] | ||
html_static_path = [] | ||
|
||
source_suffix = '.rst' | ||
master_doc = 'index' | ||
pygments_style = 'sphinx' | ||
html_theme = 'sphinx_rtd_theme' | ||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] | ||
htmlhelp_basename = 'NNPdoc' | ||
# Temporary fix for bug in HTML5 support in the RTD theme | ||
html4_writer = True | ||
|
||
sphinx_gallery_conf = { | ||
'examples_dirs': ['../tests/', '../nnp/'], | ||
'gallery_dirs': ['examples', 'code'], | ||
'filename_pattern': r'.*\.py' | ||
} | ||
|
||
intersphinx_mapping = { | ||
'python': ('https://docs.python.org/', None), | ||
'numpy': ('http://docs.scipy.org/doc/numpy/', None), | ||
'torch': ('https://pytorch.org/docs/master/', None), | ||
'ase': ('https://wiki.fysik.dtu.dk/ase/', None), | ||
} | ||
|
||
latex_documents = [ | ||
(master_doc, 'NNP.tex', 'NNP Documentation', | ||
'Xiang Gao', 'manual'), | ||
] | ||
|
||
man_pages = [ | ||
(master_doc, 'torchani', 'TorchANI Documentation', | ||
[author], 1) | ||
] | ||
|
||
texinfo_documents = [ | ||
(master_doc, 'TorchANI', 'TorchANI Documentation', | ||
author, 'TorchANI', 'One line description of project.', | ||
'Miscellaneous'), | ||
] |
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,34 @@ | ||
=============================== | ||
Welcome to NNP's documentation! | ||
=============================== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Getting Started | ||
|
||
start | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Examples | ||
|
||
examples/index | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: API | ||
|
||
api | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Implementation Walkthrough | ||
|
||
code/index | ||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
Oops, something went wrong.