Skip to content

Commit

Permalink
add setup (#280)
Browse files Browse the repository at this point in the history
* 1. add utils.run_check
2. add setup files including setup.py and pyproject.toml

* update frontpage in  docs

* remove rank in set_random_seed

* update setup.py

* update issue hyper-link

* change batch size from 150 to 100 for viv.py
  • Loading branch information
HydrogenSulfate authored May 30, 2023
1 parent 10518a3 commit a62b021
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ PaddleScience 是一个基于深度学习框架 PaddlePaddle 开发的科学计

## 支持

如使用过程中遇到问题或想提出开发建议,欢迎在 [**Issue**](https://github.com/PaddlePaddle/PaddleScience/issues/new) 页面新建 issue。
如使用过程中遇到问题或想提出开发建议,欢迎在 [**Issue**](https://github.com/PaddlePaddle/PaddleScience/issues/new/choose) 页面新建 issue。

## 贡献代码

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PaddleScience 是一个基于深度学习框架 PaddlePaddle 开发的科学计

## 支持

- 如使用过程中遇到问题或想提出开发建议,欢迎在 [**Issue**](https://github.com/PaddlePaddle/PaddleScience/issues/new) 页面新建 issue。
- 如使用过程中遇到问题或想提出开发建议,欢迎在 [**Issue**](https://github.com/PaddlePaddle/PaddleScience/issues/new/choose) 页面新建 issue。

## 贡献代码

Expand Down
2 changes: 1 addition & 1 deletion examples/fsi/viv.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"label_keys": ("eta", "f"),
"weight_dict": {"eta": 100},
},
"batch_size": 150,
"batch_size": 100,
"sampler": {
"name": "BatchSampler",
"drop_last": False,
Expand Down
11 changes: 7 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "paddlesci"
version = "1.0.1"
version = "1.0.0"
description = "A library for scientific machine learning"
readme = "README.md"
license = {text = "Apache-2.0"}
Expand All @@ -13,6 +13,7 @@ authors = [
]
requires-python = ">=3.7"
keywords = [
"Machine learning",
"Deep learning",
"Differential equations",
"AI4Science",
Expand All @@ -33,7 +34,7 @@ classifiers = [
"Topic :: Scientific/Engineering :: Mathematics",
]
dependencies = [
"numpy",
"numpy>=1.20.0",
"scipy",
"sympy",
"matplotlib",
Expand All @@ -43,10 +44,12 @@ dependencies = [
"scipy",
"visualdl",
"pyvista==0.37.0",
"pysdf",
"pyyaml",
"scikit-optimize",
"h5py",
"meshio==5.3.4",
"tqdm",
"imageio",
]

[project.urls]
Expand All @@ -57,4 +60,4 @@ Documentation = "https://paddlescience-docs.readthedocs.io/zh/latest/"

[tool.setuptools.packages.find]
where = ["."]
exclude = ["docs*", "examples*", "jointContribution*", "paddlescience*", "test_tipc*", "tests*", "tools*"]
exclude = ["docs*", "examples*", "jointContribution*", "test_tipc*", "tests*", "tools*"]
67 changes: 67 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
"""
Setup configuration
"""

import setuptools


def readme():
"""README"""
with open("README.md") as f:
return f.read()


if __name__ == "__main__":
setuptools.setup(
name="paddlesci",
version="1.0.0",
author="PaddlePaddle",
url="https://github.com/PaddlePaddle/PaddleScience",
description=(
"PaddleScience is SDK and library for developing AI-driven scientific computing"
" applications based on PaddlePaddle."
),
long_description=readme(),
long_description_content_type="text/markdown",
packages=setuptools.find_packages(
exclude=(
"docs",
"examples",
"jointContribution",
"test_tipc",
"tests",
"tools",
)
),
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Mathematics",
],
install_requires=[
"numpy>=1.20.0",
"scipy",
"sympy",
"matplotlib",
"vtk",
"pyevtk",
"wget",
"scipy",
"visualdl",
"pyvista==0.37.0",
"pyyaml",
"scikit-optimize",
"h5py",
"meshio==5.3.4",
"tqdm",
"imageio",
],
)

0 comments on commit a62b021

Please sign in to comment.