Skip to content

Commit 7b6d45e

Browse files
committed
chore: requirements and new version infrastructure updated
1 parent 10b91b5 commit 7b6d45e

File tree

7 files changed

+46
-0
lines changed

7 files changed

+46
-0
lines changed

requirements/build.txt

Whitespace-only changes.

requirements/conda.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
matplotlib-base
2+
numpy
3+
scipy

requirements/docs.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sphinx
2+
sphinx_rtd_theme
3+
sphinx-copybutton
4+
doctr
5+
m2r

requirements/pip.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
matplotlib
2+
numpy
3+
scipy

requirements/test.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
flake8
2+
pytest
3+
codecov
4+
coverage
5+
pytest-cov
6+
pytest-env

tests/conftest.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import json
2+
from pathlib import Path
3+
4+
import pytest
5+
6+
7+
@pytest.fixture
8+
def user_filesystem(tmp_path):
9+
base_dir = Path(tmp_path)
10+
home_dir = base_dir / "home_dir"
11+
home_dir.mkdir(parents=True, exist_ok=True)
12+
cwd_dir = base_dir / "cwd_dir"
13+
cwd_dir.mkdir(parents=True, exist_ok=True)
14+
15+
home_config_data = {"username": "home_username", "email": "[email protected]"}
16+
with open(home_dir / "diffpyconfig.json", "w") as f:
17+
json.dump(home_config_data, f)
18+
19+
yield tmp_path

tests/test_version.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"""Unit tests for __version__.py."""
2+
3+
import diffpy.srfit # noqa
4+
5+
6+
def test_package_version():
7+
"""Ensure the package version is defined and not set to the initial
8+
placeholder."""
9+
assert hasattr(diffpy.srfit, "__version__")
10+
assert diffpy.srfit.__version__ != "0.0.0"

0 commit comments

Comments
 (0)