Skip to content

Commit

Permalink
Merge pull request #35 from SmithSamuelM/main
Browse files Browse the repository at this point in the history
fixed test updated version
  • Loading branch information
SmithSamuelM authored Apr 3, 2024
2 parents 50b05dc + be1c9e7 commit 7aa6bea
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 15 deletions.
20 changes: 13 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
$ sphinx-apidoc -f -o source/ ../src/
$ make html
$ git tag # lists all tags
$ git tag -a v0.6.11 -m "new feature"
$ git show v0.6.11
$ git push --tags $ pushes tags to remote
Best practices for setup.py and requirements.txt
https://caremad.io/posts/2013/07/setup-vs-requirement/
"""
Expand All @@ -37,7 +43,7 @@

setup(
name='hio',
version='0.6.10', # also change in src/hio/__init__.py
version='0.6.12', # also change in src/hio/__init__.py
license='Apache Software License 2.0',
description='Hierarchical Concurrency with Async IO',
long_description=("HIO Hierarchical Concurrency and Asynchronous IO Library. "
Expand Down Expand Up @@ -79,12 +85,12 @@
"structured concurrency",
# eg: 'keyword1', 'keyword2', 'keyword3',
],
python_requires='>=3.10.4',
python_requires='>=3.12.2',
install_requires=[
'lmdb>=1.4.1',
'msgpack>=1.0.7',
'cbor2>=5.5.1',
'multidict>=6.0.4',
'msgpack>=1.0.8',
'cbor2>=5.6.2',
'multidict>=6.0.5',
'falcon>=3.1.3',
'ordered-set>=4.1.0',

Expand All @@ -95,8 +101,8 @@
# ':python_version=="2.6"': ['argparse'],
},
tests_require=[
'coverage>=7.3.4',
'pytest>=7.4.3',
'coverage>=7.4.4',
'pytest>=8.1.1',
],
setup_requires=[
],
Expand Down
2 changes: 1 addition & 1 deletion src/hio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
hio package
"""

__version__ = '0.6.10' # also change in setup.py
__version__ = '0.6.12' # also change in setup.py

from .hioing import Mixin, HioError, ValidationError, VersionError
12 changes: 7 additions & 5 deletions src/hio/base/filing.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ def exists(self, name="", base="", headDirPath=None, clean=False, filed=False, f
Returns:
bool: True means path or alt path exists, false means neither exists
"""

# use class defaults here so can use makePath for other dirs and files
Expand Down Expand Up @@ -409,11 +411,11 @@ def exists(self, name="", base="", headDirPath=None, clean=False, filed=False, f
# Now we must check the alt path to see if that exists.
headDirPath = self.AltHeadDirPath
path = os.path.abspath(
os.path.expanduser(
os.path.join(headDirPath,
altTailDirPath,
base,
name)))
os.path.expanduser(
os.path.join(headDirPath,
altTailDirPath,
base,
name)))
return os.path.exists(path)

def close(self, clear=False):
Expand Down
19 changes: 17 additions & 2 deletions tests/base/test_filing.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,21 @@ def test_filing():
filer.close(clear=True)
assert not os.path.exists(filer.path)

# Test with clean
# Test with clean not same as clear
# remove both clean and not clean

# remove both alt not clean and alt clean
dirpath = os.path.abspath(os.path.expanduser('~/.hio/test'))
if os.path.exists(dirpath):
shutil.rmtree(dirpath)
dirpath = os.path.abspath(os.path.expanduser('~/.hio/clean/test'))
if os.path.exists(dirpath):
shutil.rmtree(dirpath)
dirpath = '/usr/local/var/hio/test' # remove both clean and not clean
if os.path.exists(dirpath):
shutil.rmtree(dirpath)


dirpath = '/usr/local/var/hio/clean/test'
if os.path.exists(dirpath):
shutil.rmtree(dirpath)
Expand Down Expand Up @@ -101,7 +115,8 @@ def test_filing():
assert not os.path.exists(filer.path)

# test with alt
dirpath = '/Users/samuel/.hio/test'
#dirpath = '/Users/samuel/.hio/test'
dirpath = os.path.abspath(os.path.expanduser('~/.hio/test'))
if os.path.exists(dirpath):
shutil.rmtree(dirpath)

Expand Down

0 comments on commit 7aa6bea

Please sign in to comment.