Skip to content

Commit 54771e7

Browse files
Merge pull request #18 from NCAS-CMS/cleanup_bugfix_v0.1.1
TLC towards bugfix release v0.2.2
2 parents 55e9a9f + 61d49e2 commit 54771e7

File tree

4 files changed

+28
-19
lines changed

4 files changed

+28
-19
lines changed

cfs3/__init__.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
__version__ = "0.2.1"
2-
31
from cfs3.cftools import MetaFix, FileNameFix, CFSplitter, CFuploader
4-
from cfs3.s3cmd import s3cmd
2+
from cfs3.s3cmd import s3cmd
3+
from importlib.metadata import version
4+
from importlib.metadata import PackageNotFoundError
5+
6+
7+
try:
8+
__version__ = version("cfs3")
9+
except PackageNotFoundError as exc:
10+
msg = (
11+
"cfs3 package not found, please run `pip install -e .` before "
12+
"importing the package."
13+
)
14+
raise PackageNotFoundError(
15+
msg,
16+
) from exc

environment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ dependencies:
1616
- udunits2
1717
# for tests
1818
- pytest
19-
- pytest-html !=2.1.0
20-
- pytest-metadata >=1.5.1
19+
- pytest-html
20+
- pytest-metadata
2121
- pytest-mock
2222
- pytest-xdist
2323
# for docs

pyproject.toml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build-system]
22
requires = [
3-
"setuptools>=40.6.0",
4-
"setuptools_scm>=6.2",
3+
"setuptools>=80",
4+
"setuptools_scm>=8",
55
]
66
build-backend = "setuptools.build_meta"
77

@@ -12,7 +12,6 @@ authors = [
1212
classifiers = [
1313
"Environment :: Console",
1414
"Intended Audience :: Science/Research",
15-
"License :: OSI Approved :: BSD License",
1615
"Natural Language :: English",
1716
"Operating System :: POSIX :: Linux",
1817
"Programming Language :: Python :: 3",
@@ -27,16 +26,17 @@ dynamic = [
2726
"version",
2827
]
2928
dependencies = [
30-
'cmd2>2',
31-
'pyreadline3;platform_system=="Windows"',
32-
'minio',
3329
'bitmath',
3430
'cf-python',
35-
'pyfive',
31+
'cmd2>2',
3632
'fsspec',
33+
'minio',
34+
'pyfive',
35+
'pyreadline3;platform_system=="Windows"',
3736
]
3837
description = "Lightweight tool for investigating data files in an s3 repository"
39-
license = {text = "BSD License, Version 3-Clause"}
38+
license = "BSD-3-Clause"
39+
license-files = ["LICENSE.txt"]
4040
name = "cfs3"
4141
requires-python = ">=3.10"
4242

@@ -45,9 +45,11 @@ s3view = "cfs3.s3view:main"
4545

4646
[project.optional-dependencies]
4747
test = [
48+
'docker',
4849
'pytest',
50+
'pytest-metadata',
4951
'pytest-mock',
50-
'docker'
52+
'pytest-xdist',
5153
]
5254
dev = [
5355
'pytest',
@@ -72,10 +74,7 @@ doc = [
7274
# Documentation = ""
7375

7476
[tool.setuptools]
75-
include-package-data = true
76-
license-files = ["LICENSE"]
7777
packages = ["cfs3"]
78-
zip-safe = false # possibly yes
7978

8079
[tool.setuptools.dynamic]
8180
readme = {file = "README.md", content-type = "text/markdown"}

tests/test_s3v.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import json
66
import io
77

8-
#import cmd2
9-
#cmd2.ansi.allow_style = cmd2.ansi.AllowStyle.NEVER
108

119
dummy_config = '{"aliases":{"loc1":{"url":"https://blah.com","accessKey":"a key","secretKey":"b key","api":"S3v4"}}}'
1210

0 commit comments

Comments
 (0)