Skip to content

Commit

Permalink
pre-version 0.0.11 update
Browse files Browse the repository at this point in the history
  • Loading branch information
hovey committed Jan 26, 2023
1 parent 58f4b18 commit ab5b671
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 14 deletions.
21 changes: 10 additions & 11 deletions config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pip 21.2.1
setuptools 57.4.0
WARNING: You are using pip version 21.2.3; however, version 22.3.1 is available.
You should consider upgrading via the '~/sibl/.venv/bin/python3.9 -m pip install --upgrade pip' command.
(.venv) ~/copyright>
(.venv) ~/sibl>

python -m pip install --upgrade pip
```
Expand Down Expand Up @@ -91,12 +91,11 @@ click 8.1.3
comm 0.1.2
contourpy 1.0.7
copyright 0.0.1
coverage 7.0.5
coverage 7.1.0
cycler 0.11.0
debugpy 1.6.6
decorator 5.1.1
defusedxml 0.7.1
entrypoints 0.4
exceptiongroup 1.1.0
executing 1.2.0
fastjsonschema 2.16.2
Expand All @@ -115,7 +114,7 @@ jedi 0.18.2
Jinja2 3.1.2
jsonpointer 2.3
jsonschema 4.17.3
jupyter_client 7.4.9
jupyter_client 8.0.0
jupyter_core 5.1.5
jupyter-events 0.6.3
jupyter_server 2.1.0
Expand Down Expand Up @@ -152,7 +151,7 @@ pluggy 1.0.0
prometheus-client 0.16.0
prompt-toolkit 3.0.36
psutil 5.9.4
ptg 0.0.4 /Users/chovey/sibl/geo/src
ptg 0.0.11 /Users/chovey/sibl/geo
ptyprocess 0.7.0
pure-eval 0.2.2
pybind11 2.10.3
Expand Down Expand Up @@ -193,7 +192,7 @@ uri-template 1.2.0
wcwidth 0.2.6
webcolors 1.12
webencodings 0.5.1
websocket-client 1.4.2
websocket-client 1.5.0
xybind 0.0.8 /Users/chovey/sibl/geo/src/bind
xyfigure 0.0.9 /Users/chovey/sibl/cli/src
zipp 3.11.0
Expand Down Expand Up @@ -246,14 +245,14 @@ version Prints the semantic verison of the current installation.
Run the tests with `pytest`:

```bash
(.venv) ~/sibl> cd geo
(.venv) ~/sibl/geo> pytest -v
(.venv) ~/sibl> pytest -v
(.venv) ~/sibl> pytest geo/ -v # test only the ptg module
```

And `pytest-cov` (coverage) with line numbers missing coverage:

```bash
(.venv) ~/sibl/geo> pytest --cov=copyright --cov-report term-missing
(.venv) ~/sibl> pytest --cov=geo --cov-report term-missing
```

Success! The `venv` virtual environment `.venv` has been created,
Expand All @@ -264,9 +263,9 @@ and the `atmesh` module is now installed and tested.
```bash
# develop code
# uninstall the now-outdated developer installation
pip uninstall copyright
pip uninstall ptg
# reinstall the module with the newly developed code
pip install -e .[dev]
# see original installation instructions above
```

## Modify VS Code if desired
Expand Down
59 changes: 59 additions & 0 deletions geo/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# reference
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
# PEP621
# https://peps.python.org/pep-0621/
#
# Python Packages
# https://py-pkgs.org/welcome


[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "ptg"
version = "0.0.11"
authors = [
{ name="Chad Hovey", email="[email protected]" },
]
description = "SNL SIBL Geometry Engine"
readme = "README.md"
license = { file="LICENSE" }
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"copyright @ git+https://github.com/sandialabs/copyright",
"ipykernel",
"matplotlib",
"mypy",
"notebook",
"pybind11",
"pygments",
"pytz",
"pyyaml",
"seaborn",
"scikit-image",
"scipy",
]

# Optional dependencies video
# https://www.youtube.com/watch?v=yJyo-K7wW2g

[project.optional-dependencies]
dev = ["black==22.3.0", "flake8", "pytest", "pytest-cov"]

# Entry Points
# https://setuptools.pypa.io/en/latest/userguide/entry_point.html
[project.scripts]
cli-hello="ptg.command_line:say_hello"
version="ptg.command_line:version"
pydual="ptg.main:main"

[project.urls]
"Homepage" = "https://github.com/sandialabs/sibl"
"Bug Tracker" = "https://github.com/sandialabs/sibl/issues"
File renamed without changes.
6 changes: 4 additions & 2 deletions geo/src/ptg/command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
import pkg_resources # part of setup tools


def say_hello():
print("hello world!")
def say_hello() -> str:
aa = "hello world!"
print(aa)
return aa


def version() -> str:
Expand Down
13 changes: 13 additions & 0 deletions geo/tests/test_command_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from ptg import command_line as cl


def test_say_hello():
known = "hello world!"
found = cl.say_hello()
assert known == found


def test_version():
known = "0.0.11"
found = cl.version()
assert known == found
2 changes: 1 addition & 1 deletion geo/tests/test_xybind.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

def test_ptg_version():
ptg_version = command_line.version()
assert ptg_version == "0.0.4"
assert ptg_version == "0.0.11"


def test_xyb_version():
Expand Down

0 comments on commit ab5b671

Please sign in to comment.