Skip to content

Commit 02ca06e

Browse files
authored
Merge pull request #38 from praksharma/development
pipy setup
2 parents 2ab4666 + ca3dbf5 commit 02ca06e

File tree

4 files changed

+81
-12
lines changed

4 files changed

+81
-12
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: PyPI release 🐍📦
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types:
7+
- published
8+
9+
jobs:
10+
build-n-publish:
11+
name: Build and publish 🐍 📦 to PyPI
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ["3.9"]
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install pypa/setuptools
24+
run: >-
25+
python -m
26+
pip install wheel
27+
- name: Extract tag name
28+
id: tag
29+
run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3)
30+
- name: Update version in setup.py
31+
run: >-
32+
sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py
33+
- name: Build a binary wheel
34+
run: >-
35+
python setup.py sdist bdist_wheel
36+
- name: Publish distribution 📦 to PyPI
37+
uses: pypa/gh-action-pypi-publish@master
38+
with:
39+
password: ${{ secrets.PYPI_API_TOKEN }}

DeepINN/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0"
1+
__version__ = "1.0.0"

Tutorials/5. FCNN/2. test.ipynb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@
8484
{
8585
"data": {
8686
"text/plain": [
87-
"tensor([[-2.7728],\n",
88-
" [-0.4936],\n",
89-
" [-0.0964]])"
87+
"tensor([[ 0.9173],\n",
88+
" [-0.5839],\n",
89+
" [ 1.2837]])"
9090
]
9191
},
9292
"execution_count": 6,
@@ -107,9 +107,9 @@
107107
{
108108
"data": {
109109
"text/plain": [
110-
"tensor([[0.0000],\n",
111-
" [0.1072],\n",
112-
" [0.1284]], grad_fn=<AddmmBackward0>)"
110+
"tensor([[-0.0178],\n",
111+
" [ 0.0000],\n",
112+
" [-0.0185]], grad_fn=<AddmmBackward0>)"
113113
]
114114
},
115115
"execution_count": 7,
@@ -130,9 +130,9 @@
130130
{
131131
"data": {
132132
"text/plain": [
133-
"tensor([[-0.9922],\n",
134-
" [-0.4571],\n",
135-
" [-0.0961]])"
133+
"tensor([[ 0.7246],\n",
134+
" [-0.5255],\n",
135+
" [ 0.8575]])"
136136
]
137137
},
138138
"execution_count": 8,
@@ -161,7 +161,7 @@
161161
}
162162
],
163163
"source": [
164-
"loss_metric = dp.domain.loss_metric(\"MSE\")\n",
164+
"loss_metric = dp.backend.loss_metric(\"MSE\")\n",
165165
"loss_metric\n"
166166
]
167167
},
@@ -173,7 +173,7 @@
173173
{
174174
"data": {
175175
"text/plain": [
176-
"tensor(2.7000, grad_fn=<MseLossBackward0>)"
176+
"tensor(0.9703, grad_fn=<MseLossBackward0>)"
177177
]
178178
},
179179
"execution_count": 10,

setup.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from setuptools import setup, find_packages
2+
import codecs
3+
import os
4+
5+
# pwd
6+
here = os.path.abspath(os.path.dirname(__file__))
7+
8+
# Long description of the project
9+
with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
10+
long_description = "\\n" + fh.read()
11+
12+
setup(
13+
name="DeepINN",
14+
version='{{VERSION_PLACEHOLDER}}',
15+
author="Prakhar Sharma",
16+
author_email="[email protected]",
17+
description="A Physics-informed neural network (PINN) library.",
18+
url = "https://deepinn.readthedocs.io/en/latest/index.html",
19+
long_description_content_type="text/markdown",
20+
long_description=long_description,
21+
packages=find_packages(),
22+
install_requires=['numpy'],
23+
keywords = ["Differential equations", "Physics-informed neural networks"],
24+
classifiers=[
25+
"Development Status :: 4 - Beta",
26+
"Intended Audience :: Science/Research",
27+
"Programming Language :: Python :: 3",
28+
"Operating System :: Unix",
29+
]
30+
)

0 commit comments

Comments
 (0)