Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/doctest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: doc tests

on:
pull_request:

jobs:
test:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install dependencies
run: |
pip install --upgrade pip
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install -e ".[dev]"

- name: Run doctests
run: pytest --doctest-modules codegen.py type_checker.py utils/ -v --tb=short
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: unit tests

on:
pull_request:

jobs:
test:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install dependencies
run: |
pip install --upgrade pip
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install -e ".[dev]"

- name: Run pytest
run: pytest tests/ -v --tb=short
19 changes: 19 additions & 0 deletions physika.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Metadata-Version: 2.4
Name: physika
Version: 0.1.0
Home-page: https://github.com/deepforestsci/physika
License: MIT
Project-URL: Source, https://github.com/deepforestsci/physika
Requires-Python: >=3.9
License-File: LICENSE
Requires-Dist: torch
Requires-Dist: ply
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
46 changes: 46 additions & 0 deletions physika.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
LICENSE
README.md
pyproject.toml
setup.py
examples/ast/example_arrays.py
examples/ast/example_matrices.py
examples/ast/example_tensors.py
examples/ast/factorial.py
examples/ast/fft.py
examples/ast/for.py
examples/ast/harmonic_oscillator.py
examples/ast/hnn.py
examples/ast/networks.py
examples/ast/pendulum_rk4.py
examples/ast/spring_pendulum_rk4.py
examples/ast/train_fully_connected.py
examples/torch_code/example_arrays.py
examples/torch_code/example_matrices.py
examples/torch_code/example_tensors.py
examples/torch_code/factorial.py
examples/torch_code/fft.py
examples/torch_code/for.py
examples/torch_code/harmonic_oscillator.py
examples/torch_code/hnn.py
examples/torch_code/networks.py
examples/torch_code/pendulum_rk4.py
examples/torch_code/spring_pendulum_rk4.py
examples/torch_code/train_fully_connected.py
physika.egg-info/PKG-INFO
physika.egg-info/SOURCES.txt
physika.egg-info/dependency_links.txt
physika.egg-info/entry_points.txt
physika.egg-info/requires.txt
physika.egg-info/top_level.txt
tests/conftest.py
tests/test_codegen.py
tests/test_execute.py
tests/test_lexer.py
tests/test_physika.py
tests/test_typechecker.py
tests/test_utils/test_ast_utils.py
utils/__init__.py
utils/ast_utils.py
utils/parser_utils.py
utils/print_utils.py
utils/type_checker_utils.py
1 change: 1 addition & 0 deletions physika.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 2 additions & 0 deletions physika.egg-info/entry_points.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[console_scripts]
physika = physika.execute:main
5 changes: 5 additions & 0 deletions physika.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
torch
ply

[dev]
pytest>=7
1 change: 1 addition & 0 deletions physika.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
utils
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
3 changes: 3 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[pytest]
testpaths = tests
addopts = --tb=short
24 changes: 24 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from setuptools import setup, find_packages

setup(name="physika",
version="0.1.0",
url="https://github.com/deepforestsci/physika",
license='MIT',
python_requires=">=3.9",
install_requires=[
"torch",
"ply",
],
packages=find_packages(),
project_urls={
'Source': 'https://github.com/deepforestsci/physika',
},
entry_points={
"console_scripts": [
"physika=physika.execute:main",
],
},
extras_require={
"dev": ["pytest>=7"],
},
)