-
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.
Merge pull request #35 from viljarjf/dev
0.1.1
- Loading branch information
Showing
25 changed files
with
472 additions
and
238 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,26 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: python -m build | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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,44 @@ | ||
name: Lint the sourcecode | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- dev | ||
- main | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
env: | ||
SRC_DIR: src/qm_sim | ||
|
||
jobs: | ||
lint: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- name: setup | ||
run: | | ||
pip install .[linting] | ||
- name: run black | ||
run: | | ||
black "$SRC_DIR" --check | ||
- name: run isort | ||
run: | | ||
isort "$SRC_DIR" -m 3 --trailing-comma -c | ||
- name: run pylint | ||
run: | | ||
pylint "$SRC_DIR" --fail-under=7 | ||
# Remove -c and --check if we want to force linting in the future | ||
# - name: Commit changes | ||
# run: | | ||
# git config user.name github-actions | ||
# git config user.email [email protected] | ||
# git add . | ||
# git commit -m "[Auto-generated] Linting" | ||
# 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
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
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
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
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[project] | ||
name = "qm_sim" | ||
version = "0.1.0" | ||
version = "0.1.1" | ||
authors = [ | ||
{ name="Viljar Femoen", email="[email protected]" }, | ||
] | ||
|
@@ -28,9 +28,10 @@ dependencies = [ | |
"Source" = "https://github.com/viljarjf/QM_sim" | ||
|
||
[project.optional-dependencies] | ||
test = ["pytest", "matplotlib"] | ||
torch = ["torch"] | ||
docs = ["sphinx", "sphinx-rtd-theme", "sphinx-mdinclude"] | ||
test = ["pytest", "matplotlib",] | ||
torch = ["torch",] | ||
docs = ["sphinx", "sphinx-rtd-theme", "sphinx-mdinclude",] | ||
linting = ["black", "isort", "pylint",] | ||
|
||
[build-system] | ||
requires = [ | ||
|
@@ -46,3 +47,19 @@ wheel.expand-macos-universal-tags = true | |
[tool.pytest.ini_options] | ||
testpaths = ["tests"] | ||
addopts = "-raP" | ||
|
||
[tool.black] | ||
# this is a regex, not a list | ||
exclude = "nature_constants.py" | ||
|
||
[tool.pylint.'Basic'] | ||
good-names = [ | ||
"N", "L", "m", "x", "y", "z", "i", "j", "t", "t0", | ||
"tn", "dt", "H", "h", "l", "n", "v", "w", "psi", "E", | ||
"V", | ||
] | ||
|
||
[tool.pylint.'Main'] | ||
ignore = [ | ||
"nature_constants.py", | ||
] |
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 |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
C++ code for faster eigenproblem solution. | ||
Currently unused, as the performance was just the same at best | ||
""" | ||
""" |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
try: | ||
from .eigen_wrapper import * | ||
except ImportError: | ||
print("Warning: eigen_wrapper C++ module not found") | ||
print("Warning: eigen_wrapper C++ module not found") |
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
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
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
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
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
Oops, something went wrong.