-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
141 additions
and
0 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,7 @@ | ||
*__pycache__* | ||
*.py[cod] | ||
*$py.class | ||
miniconda3/* | ||
sha256sum.txt | ||
Miniconda3-py* | ||
*.pytest_cache* |
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 @@ | ||
include LICENSE |
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,29 @@ | ||
REPOSITORY=https://repo.anaconda.com/miniconda | ||
INSTALLER=Miniconda3-py38_4.9.2-Linux-x86_64.sh | ||
HASH=1314b90489f154602fd794accfc90446111514a5a72fe1f71ab83e07de9504a7 | ||
HASHFILE=sha256sum.txt | ||
PYENV=miniconda3 | ||
PYTHON=$(PYENV)/bin/python3 | ||
|
||
.PHONY: build checksum clean | ||
|
||
build: $(PYENV)/bin/activate | ||
$(PYTHON) -m build | ||
|
||
$(PYENV)/bin/activate: checksum requirements.txt | ||
test -d $(PYENV) || bash ./$(INSTALLER) -b -p $(PYENV) | ||
$(PYTHON) -m pip install -U pip wheel setuptools build pytest | ||
$(PYTHON) -m pip install -r requirements.txt | ||
touch $(PYENV)/bin/activate | ||
|
||
checksum: $(INSTALLER) $(HASHFILE) | ||
sha256sum -c $(HASHFILE) | ||
|
||
$(INSTALLER): | ||
wget $(REPOSITORY)/$(INSTALLER) | ||
|
||
$(HASHFILE): | ||
echo "$(HASH) $(INSTALLER)" > $(HASHFILE) | ||
|
||
clean: | ||
rm -rf dist/ $(PYENV) $(HASHFILE) $(INSTALLER) |
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,10 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.pytest.ini_options] | ||
minversion = "6.0" | ||
addopts = "-s" | ||
testpaths = [ | ||
"tests", | ||
] |
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,31 @@ | ||
attrs==21.2.0 | ||
brotlipy==0.7.0 | ||
build==0.5.1 | ||
certifi==2020.6.20 | ||
cffi==1.14.3 | ||
chardet==3.0.4 | ||
conda==4.9.2 | ||
conda-package-handling==1.7.2 | ||
cryptography==3.2.1 | ||
evaluation-tools==1.2.0 | ||
idna==2.10 | ||
iniconfig==1.1.1 | ||
packaging==21.0 | ||
pep517==0.10.0 | ||
pip==21.1.3 | ||
pluggy==0.13.1 | ||
py==1.10.0 | ||
pycosat==0.6.3 | ||
pycparser==2.20 | ||
pyOpenSSL==19.1.0 | ||
pyparsing==2.4.7 | ||
PySocks==1.7.1 | ||
pytest==6.2.4 | ||
requests==2.24.0 | ||
ruamel-yaml==0.15.87 | ||
setuptools==57.2.0 | ||
six==1.15.0 | ||
toml==0.10.2 | ||
tqdm==4.51.0 | ||
urllib3==1.25.11 | ||
wheel==0.36.2 |
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,37 @@ | ||
[metadata] | ||
name = hello | ||
version = 0.1.0 | ||
author = Your Name | ||
author_email = [email protected] | ||
description = Generic template for data-driven projects using Python. | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown; charset=UTF-8 | ||
license = USDOC | ||
license_files = | ||
LICENSE | ||
url = https://github.com/NOAA-OWP/ | ||
project_urls = | ||
Documentation = https://github.com/NOAA-OWP/ | ||
Source = https://github.com/NOAA-OWP/ | ||
Tracker = https://github.com/NOAA-OWP/ | ||
classifiers = | ||
Development Status :: 1 - Planning | ||
Intended Audience :: Education | ||
Intended Audience :: Science/Research | ||
License :: Free To Use But Restricted | ||
Programming Language :: Python :: 3.8 | ||
Topic :: Scientific/Engineering :: Hydrology | ||
Operating System :: OS Independent | ||
Private :: Do not Upload | ||
|
||
[options] | ||
packages = find: | ||
package_dir = | ||
=src | ||
install_requires = | ||
numpy | ||
python_requires = >=3.8 | ||
include_package_data = True | ||
|
||
[options.packages.find] | ||
where = src |
Empty file.
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,17 @@ | ||
def greet(name: str): | ||
""" | ||
Create a simple greeting. | ||
Parameters | ||
---------- | ||
name: str, required | ||
Name of person to greet. | ||
Returns | ||
------- | ||
greeting: str | ||
String with a simple greeting. | ||
""" | ||
# Return greeting | ||
return f"Hello, {name}!" |
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,9 @@ | ||
import pytest | ||
from hello.hello import greet | ||
|
||
def test_greet(): | ||
# Create a greeting | ||
greeting = greet("Jo") | ||
|
||
# Check the greeting | ||
assert greeting == "Hello, Jo!" |