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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov

pip install .

- name: Run tests
run: |
pytest --cov=STL_main tests/
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ __pycache__/
docs/build/
*.pyc
my_tests.ipynb
STL.egg-info/
12 changes: 12 additions & 0 deletions STL_main/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import warnings
from importlib.metadata import PackageNotFoundError, version

try:
__version__ = version("STL")
except PackageNotFoundError:
__version__ = None

warnings.warn(
"In development mode: Please run 'pip install -e .' in the root directory of the STL repository to properly install the package, its dependencies and enable proper version tracking.",
UserWarning,
)
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
[build-system]
requires = ["setuptools>=64", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[project]
name = "STL"
dynamic = ["version"]

[tool.setuptools.packages.find]
include = ["STL_main*"]

[tool.setuptools_scm]
version_scheme = "post-release"
local_scheme = "no-local-version"

[tool.isort]
profile = "black"
line_length = 88
Expand Down
1 change: 1 addition & 0 deletions tests/test_2D_FFT_Torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
print(f"Parent directory already in sys.path: ...\\{PARENT_DIR.name}")
DATA_TEST_PATH = Path(__file__).parent.parent / "data" / "test"

import STL_main
from STL_main.STL_2D_FFT_Torch import STL_2D_FFT_Torch as DataClass


Expand Down
Loading