dtool-http 0.5.2__tar.gz → 0.5.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. dtool_http-0.5.3/.github/workflows/publish.yml +62 -0
  2. {dtool_http-0.5.2 → dtool_http-0.5.3}/.github/workflows/test.yml +6 -9
  3. {dtool_http-0.5.2 → dtool_http-0.5.3}/.gitignore +1 -0
  4. {dtool_http-0.5.2 → dtool_http-0.5.3}/CHANGELOG.rst +30 -1
  5. {dtool_http-0.5.2 → dtool_http-0.5.3}/PKG-INFO +17 -16
  6. {dtool_http-0.5.2 → dtool_http-0.5.3}/README.rst +6 -6
  7. dtool_http-0.5.3/dtool_http/__init__.py +14 -0
  8. {dtool_http-0.5.2 → dtool_http-0.5.3}/dtool_http/server.py +1 -1
  9. {dtool_http-0.5.2 → dtool_http-0.5.3}/dtool_http/storagebroker.py +2 -2
  10. {dtool_http-0.5.2 → dtool_http-0.5.3}/pyproject.toml +18 -15
  11. {dtool_http-0.5.2 → dtool_http-0.5.3}/scripts/share_data.py +1 -4
  12. {dtool_http-0.5.2 → dtool_http-0.5.3}/setup.cfg +2 -6
  13. dtool_http-0.5.3/tests/test_entry_points.py +28 -0
  14. {dtool_http-0.5.2 → dtool_http-0.5.3}/tox.ini +0 -1
  15. dtool_http-0.5.2/.github/workflows/publish.yml +0 -140
  16. dtool_http-0.5.2/.travis.yml +0 -9
  17. dtool_http-0.5.2/MANIFEST.in +0 -1
  18. dtool_http-0.5.2/dtool_http/__init__.py +0 -16
  19. dtool_http-0.5.2/dtool_http/version.py +0 -21
  20. dtool_http-0.5.2/dtool_http.egg-info/PKG-INFO +0 -128
  21. dtool_http-0.5.2/dtool_http.egg-info/SOURCES.txt +0 -36
  22. dtool_http-0.5.2/dtool_http.egg-info/dependency_links.txt +0 -1
  23. dtool_http-0.5.2/dtool_http.egg-info/entry_points.txt +0 -7
  24. dtool_http-0.5.2/dtool_http.egg-info/requires.txt +0 -7
  25. dtool_http-0.5.2/dtool_http.egg-info/top_level.txt +0 -1
  26. dtool_http-0.5.2/tests/data/actually_a_png.txt +0 -0
  27. dtool_http-0.5.2/tests/data/actually_a_text_file.jpg +0 -1
  28. dtool_http-0.5.2/tests/data/another_file.txt +0 -1
  29. dtool_http-0.5.2/tests/data/empty_file +0 -0
  30. dtool_http-0.5.2/tests/data/random_bytes +0 -0
  31. dtool_http-0.5.2/tests/data/real_text_file.txt +0 -1
  32. dtool_http-0.5.2/tests/data/tiny.png +0 -0
  33. {dtool_http-0.5.2 → dtool_http-0.5.3}/.github/dependabot.yml +0 -0
  34. {dtool_http-0.5.2 → dtool_http-0.5.3}/LICENSE.rst +0 -0
  35. {dtool_http-0.5.2 → dtool_http-0.5.3}/dtool_http/publish.py +0 -0
  36. {dtool_http-0.5.2 → dtool_http-0.5.3}/icons/22x22/dtool_logo.png +0 -0
  37. {dtool_http-0.5.2 → dtool_http-0.5.3}/requirements.txt +0 -0
  38. {dtool_http-0.5.2 → dtool_http-0.5.3}/tests/__init__.py +0 -0
  39. {dtool_http-0.5.2 → dtool_http-0.5.3}/tests/test_dtool_http_server.py +0 -0
  40. {dtool_http-0.5.2 → dtool_http-0.5.3}/tests/test_publish.py +0 -0
@@ -0,0 +1,62 @@
1
+ name: publish
2
+
3
+ # Pushing a version tag (e.g. 0.5.2) runs the test suite, then builds the
4
+ # package and publishes it to PyPI. The upload uses PyPI trusted publishing
5
+ # (OIDC), so no API tokens are stored in the repository.
6
+
7
+ on:
8
+ push:
9
+ tags:
10
+ - '[0-9]+.[0-9]+.[0-9]+*'
11
+
12
+ jobs:
13
+ test:
14
+ uses: ./.github/workflows/test.yml
15
+
16
+ build:
17
+ needs: test
18
+ runs-on: ubuntu-24.04
19
+
20
+ steps:
21
+ - uses: actions/checkout@v7
22
+ with:
23
+ # hatch-vcs derives the version from the git tags
24
+ fetch-depth: 0
25
+
26
+ - name: Set up Python 3.12
27
+ uses: actions/setup-python@v7
28
+ with:
29
+ python-version: 3.12
30
+
31
+ - name: Package distribution
32
+ run: |
33
+ pip install --upgrade build
34
+ python -m build
35
+
36
+ - name: Check version matches tag
37
+ run: |
38
+ ls "dist/dtool_http-${GITHUB_REF_NAME}.tar.gz" \
39
+ "dist/dtool_http-${GITHUB_REF_NAME}-py3-none-any.whl"
40
+
41
+ - uses: actions/upload-artifact@v7
42
+ with:
43
+ name: dist
44
+ path: dist/
45
+
46
+ publish-pypi:
47
+ needs: build
48
+ runs-on: ubuntu-24.04
49
+ environment:
50
+ name: pypi
51
+ url: https://pypi.org/p/dtool-http
52
+ permissions:
53
+ id-token: write
54
+
55
+ steps:
56
+ - uses: actions/download-artifact@v8
57
+ with:
58
+ name: dist
59
+ path: dist/
60
+
61
+ - name: Publish distribution to PyPI
62
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -4,10 +4,10 @@ on:
4
4
  push:
5
5
  branches:
6
6
  - main
7
- - master
8
7
  tags:
9
8
  - '*'
10
9
  pull_request:
10
+ workflow_call:
11
11
 
12
12
  jobs:
13
13
  test:
@@ -15,21 +15,20 @@ jobs:
15
15
 
16
16
  strategy:
17
17
  matrix:
18
- python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
18
+ python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
19
19
 
20
20
  steps:
21
21
  - name: Git checkout
22
- uses: actions/checkout@v4
22
+ uses: actions/checkout@v7
23
23
 
24
24
  - name: Set up python3 ${{ matrix.python-version }}
25
- uses: actions/setup-python@v5
25
+ uses: actions/setup-python@v7
26
26
  with:
27
27
  python-version: ${{ matrix.python-version }}
28
28
 
29
29
  - name: Install requirements
30
30
  run: |
31
31
  python -m pip install --upgrade pip
32
- pip install --upgrade setuptools wheel setuptools-scm[toml] importlib-metadata
33
32
  pip install flake8 pytest pytest-cov pytz
34
33
  if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
35
34
  pip install .
@@ -41,7 +40,5 @@ jobs:
41
40
 
42
41
  - name: Lint with flake8
43
42
  run: |
44
- # stop the build if there are Python syntax errors or undefined names
45
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
46
- # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
47
- flake8 . --count --exit-zero --max-complexity=12 --max-line-length=127 --statistics
43
+ # Configuration (including excludes) lives in setup.cfg
44
+ flake8 --count --show-source --statistics
@@ -14,3 +14,4 @@ uris.txt
14
14
  .tox
15
15
 
16
16
  dist
17
+ build
@@ -30,6 +30,35 @@ Fixed
30
30
  Security
31
31
  ^^^^^^^^
32
32
 
33
+
34
+ [0.5.3] - 2026-11-24
35
+ --------------------
36
+
37
+ Changed
38
+ ^^^^^^^
39
+
40
+ - Build system switched to hatchling with hatch-vcs; the version is now
41
+ derived from git tags
42
+ - The publish workflow now runs only for version tags: it runs the test
43
+ suite, checks that the built version matches the tag and publishes to
44
+ PyPI. Development builds are no longer uploaded to TestPyPI
45
+
46
+ Removed
47
+ ^^^^^^^
48
+
49
+ - Support for Python < 3.10
50
+
51
+ Fixed
52
+ ^^^^^
53
+
54
+ - ``dtool_serve_directory`` and ``dtool_publish_dataset`` are installed as
55
+ console scripts again; 0.5.2 wrongly registered these argparse functions as
56
+ ``dtool.cli`` plugins, which broke ``dtool --help`` listings and removed the
57
+ standalone commands
58
+ - License metadata now points to ``LICENSE.rst`` (SPDX ``MIT``)
59
+ - ``dtool_http.__version__`` is always defined, even when not installed
60
+
61
+
33
62
  [0.5.2] - 2025-03-31
34
63
  --------------------
35
64
 
@@ -42,7 +71,7 @@ Added
42
71
  Changed
43
72
  ^^^^^^^
44
73
 
45
- - Transitoned from ``setup.py`` to ``pyporject.toml``
74
+ - Transitioned from ``setup.py`` to ``pyproject.toml``
46
75
 
47
76
  Fixed
48
77
  ^^^^^
@@ -1,35 +1,36 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: dtool-http
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: Add HTTP read only dataset support to dtool
5
- Author-email: Tjelvar Olsson <tjelvar.olsson@gmail.com>
6
- Project-URL: Documentation, https://github.com/jic-dtool/dtool-http/blob/master/README.rst
5
+ Project-URL: Documentation, https://github.com/jic-dtool/dtool-http/blob/main/README.rst
7
6
  Project-URL: Repository, https://github.com/jic-dtool/dtool-http
8
- Project-URL: Changelog, https://github.com/jic-dtool/dtool-http/blob/master/CHANGELOG.rst
9
- Description-Content-Type: text/x-rst
7
+ Project-URL: Changelog, https://github.com/jic-dtool/dtool-http/blob/main/CHANGELOG.rst
8
+ Author-email: Tjelvar Olsson <tjelvar.olsson@gmail.com>
9
+ License-Expression: MIT
10
10
  License-File: LICENSE.rst
11
+ Requires-Python: >=3.10
11
12
  Requires-Dist: dtoolcore>=3.13
12
13
  Requires-Dist: requests
13
14
  Provides-Extra: test
14
- Requires-Dist: pytest; extra == "test"
15
- Requires-Dist: pytest-cov; extra == "test"
16
- Requires-Dist: pytz; extra == "test"
17
- Dynamic: license-file
15
+ Requires-Dist: pytest; extra == 'test'
16
+ Requires-Dist: pytest-cov; extra == 'test'
17
+ Requires-Dist: pytz; extra == 'test'
18
+ Description-Content-Type: text/x-rst
18
19
 
19
20
  Add HTTP support to dtool for read only access to datasets
20
21
  ==========================================================
21
22
 
22
- .. |dtool| image:: https://github.com/jic-dtool/dtool-http/blob/master/icons/22x22/dtool_logo.png?raw=True
23
+ .. |dtool| image:: https://github.com/jic-dtool/dtool-http/blob/main/icons/22x22/dtool_logo.png?raw=True
23
24
  :height: 20px
24
25
  :target: https://github.com/jic-dtool/dtool-http
25
26
  .. |pypi| image:: https://img.shields.io/pypi/v/dtool-http
26
27
  :target: https://pypi.org/project/dtool-http/
27
28
  .. |tag| image:: https://img.shields.io/github/v/tag/jic-dtool/dtool-http
28
29
  :target: https://github.com/jic-dtool/dtool-http/tags
29
- .. |test| image:: https://img.shields.io/github/actions/workflow/status/jic-dtool/dtool-http/test.yml?branch=master&label=tests
30
+ .. |test| image:: https://img.shields.io/github/actions/workflow/status/jic-dtool/dtool-http/test.yml?branch=main&label=tests
30
31
  :target: https://github.com/jic-dtool/dtool-http/actions/workflows/test.yml
31
- .. |coverage| image:: https://codecov.io/github/jic-dtool/dtool-http/coverage.svg?branch=master
32
- :target: https://codecov.io/github/jic-dtool/dtool-http?branch=master
32
+ .. |coverage| image:: https://codecov.io/github/jic-dtool/dtool-http/coverage.svg?branch=main
33
+ :target: https://codecov.io/github/jic-dtool/dtool-http?branch=main
33
34
 
34
35
  |dtool| |pypi| |tag| |test| |coverage|
35
36
 
@@ -53,7 +54,7 @@ To install the dtool-http package.
53
54
  .. code-block:: bash
54
55
 
55
56
  cd dtool-http
56
- python setup.py install
57
+ pip install .
57
58
 
58
59
 
59
60
  Usage
@@ -94,7 +95,7 @@ Serving a directory of datasets over HTTP
94
95
  -----------------------------------------
95
96
 
96
97
  There is a simple utility for serving datasets in a directory over HTTP called
97
- ``dtool_serve_direcotry``. This is mainly useful for testing purposes.
98
+ ``dtool_serve_directory``. This is mainly useful for testing purposes.
98
99
 
99
100
  Usage::
100
101
 
@@ -1,17 +1,17 @@
1
1
  Add HTTP support to dtool for read only access to datasets
2
2
  ==========================================================
3
3
 
4
- .. |dtool| image:: https://github.com/jic-dtool/dtool-http/blob/master/icons/22x22/dtool_logo.png?raw=True
4
+ .. |dtool| image:: https://github.com/jic-dtool/dtool-http/blob/main/icons/22x22/dtool_logo.png?raw=True
5
5
  :height: 20px
6
6
  :target: https://github.com/jic-dtool/dtool-http
7
7
  .. |pypi| image:: https://img.shields.io/pypi/v/dtool-http
8
8
  :target: https://pypi.org/project/dtool-http/
9
9
  .. |tag| image:: https://img.shields.io/github/v/tag/jic-dtool/dtool-http
10
10
  :target: https://github.com/jic-dtool/dtool-http/tags
11
- .. |test| image:: https://img.shields.io/github/actions/workflow/status/jic-dtool/dtool-http/test.yml?branch=master&label=tests
11
+ .. |test| image:: https://img.shields.io/github/actions/workflow/status/jic-dtool/dtool-http/test.yml?branch=main&label=tests
12
12
  :target: https://github.com/jic-dtool/dtool-http/actions/workflows/test.yml
13
- .. |coverage| image:: https://codecov.io/github/jic-dtool/dtool-http/coverage.svg?branch=master
14
- :target: https://codecov.io/github/jic-dtool/dtool-http?branch=master
13
+ .. |coverage| image:: https://codecov.io/github/jic-dtool/dtool-http/coverage.svg?branch=main
14
+ :target: https://codecov.io/github/jic-dtool/dtool-http?branch=main
15
15
 
16
16
  |dtool| |pypi| |tag| |test| |coverage|
17
17
 
@@ -35,7 +35,7 @@ To install the dtool-http package.
35
35
  .. code-block:: bash
36
36
 
37
37
  cd dtool-http
38
- python setup.py install
38
+ pip install .
39
39
 
40
40
 
41
41
  Usage
@@ -76,7 +76,7 @@ Serving a directory of datasets over HTTP
76
76
  -----------------------------------------
77
77
 
78
78
  There is a simple utility for serving datasets in a directory over HTTP called
79
- ``dtool_serve_direcotry``. This is mainly useful for testing purposes.
79
+ ``dtool_serve_directory``. This is mainly useful for testing purposes.
80
80
 
81
81
  Usage::
82
82
 
@@ -0,0 +1,14 @@
1
+ """dtool_http package."""
2
+
3
+ import logging
4
+
5
+ from importlib.metadata import version, PackageNotFoundError
6
+
7
+ try:
8
+ __version__ = version(__name__)
9
+ except PackageNotFoundError:
10
+ # Package is not installed; dtool-cli's ``dtool --version`` still
11
+ # expects the attribute to exist.
12
+ __version__ = "unknown"
13
+
14
+ logger = logging.getLogger(__name__)
@@ -93,7 +93,7 @@ class DtoolHTTPRequestHandler(SimpleHTTPRequestHandler):
93
93
  self.end_headers()
94
94
 
95
95
  else:
96
- super(DtoolHTTPRequestHandler, self).do_GET()
96
+ super().do_GET()
97
97
 
98
98
 
99
99
  class DtoolHTTPServer(HTTPServer):
@@ -22,7 +22,7 @@ class HTTPError(RuntimeError):
22
22
  pass
23
23
 
24
24
 
25
- class HTTPStorageBroker(object):
25
+ class HTTPStorageBroker:
26
26
  """
27
27
  Storage broker to interact with datasets over HTTP in a read only fashion.
28
28
  """
@@ -71,7 +71,7 @@ class HTTPStorageBroker(object):
71
71
  logger.info("Response status code: {}".format(r.status_code))
72
72
 
73
73
  if r.status_code != 200:
74
- raise(HTTPError(r.status_code))
74
+ raise HTTPError(r.status_code)
75
75
 
76
76
  return r
77
77
 
@@ -1,12 +1,14 @@
1
1
  [build-system]
2
- requires = ["setuptools>=42", "setuptools_scm[toml]>=6.3"]
3
- build-backend = "setuptools.build_meta"
2
+ requires = ["hatchling>=1.27", "hatch-vcs"]
3
+ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "dtool-http"
7
7
  description = "Add HTTP read only dataset support to dtool"
8
8
  readme = "README.rst"
9
- license = {file = "LICENSE"}
9
+ license = "MIT"
10
+ license-files = ["LICENSE.rst"]
11
+ requires-python = ">=3.10"
10
12
  authors = [
11
13
  {name = "Tjelvar Olsson", email = "tjelvar.olsson@gmail.com"}
12
14
  ]
@@ -24,22 +26,23 @@ test = [
24
26
  ]
25
27
 
26
28
  [project.urls]
27
- Documentation = "https://github.com/jic-dtool/dtool-http/blob/master/README.rst"
29
+ Documentation = "https://github.com/jic-dtool/dtool-http/blob/main/README.rst"
28
30
  Repository = "https://github.com/jic-dtool/dtool-http"
29
- Changelog = "https://github.com/jic-dtool/dtool-http/blob/master/CHANGELOG.rst"
30
-
31
- [tool.setuptools_scm]
32
- version_scheme = "guess-next-dev"
33
- local_scheme = "no-local-version"
34
- write_to = "dtool_http/version.py"
35
-
36
- [tool.setuptools]
37
- packages = ["dtool_http"]
31
+ Changelog = "https://github.com/jic-dtool/dtool-http/blob/main/CHANGELOG.rst"
38
32
 
39
33
  [project.entry-points."dtool.storage_brokers"]
40
34
  "HTTPStorageBroker" = "dtool_http.storagebroker:HTTPStorageBroker"
41
35
  "HTTPSStorageBroker" = "dtool_http.storagebroker:HTTPSStorageBroker"
42
36
 
43
- [project.entry-points."dtool.cli"]
37
+ [project.scripts]
44
38
  "dtool_serve_directory" = "dtool_http.server:cli"
45
- "dtool_publish_dataset" = "dtool_http.publish:cli"
39
+ "dtool_publish_dataset" = "dtool_http.publish:cli"
40
+
41
+ [tool.hatch.version]
42
+ source = "vcs"
43
+
44
+ [tool.hatch.version.raw-options]
45
+ local_scheme = "no-local-version"
46
+
47
+ [tool.hatch.build.targets.wheel]
48
+ packages = ["dtool_http"]
@@ -6,10 +6,7 @@ import pkg_resources
6
6
 
7
7
  import click
8
8
 
9
- try:
10
- from StringIO import StringIO
11
- except ImportError:
12
- from io import StringIO
9
+ from io import StringIO
13
10
 
14
11
  from ruamel.yaml import YAML
15
12
  from ruamel.yaml.comments import CommentedMap
@@ -1,14 +1,10 @@
1
1
  [flake8]
2
- exclude = env*,.tox,.git,*.egg,build,docs
2
+ exclude=env*,.tox,.git,*.egg,build,docs
3
3
 
4
4
  [tool:pytest]
5
5
  testpaths = tests
6
6
  addopts = --cov=dtool_http
7
+ #addopts = -x --pdb
7
8
 
8
9
  [cov:run]
9
10
  source = dtool_http
10
-
11
- [egg_info]
12
- tag_build =
13
- tag_date = 0
14
-
@@ -0,0 +1,28 @@
1
+ """Test that the package registers the expected entry points."""
2
+
3
+ from importlib.metadata import distribution
4
+
5
+
6
+ def _entry_points(group):
7
+ eps = distribution("dtool-http").entry_points
8
+ return {ep.name: ep.value for ep in eps if ep.group == group}
9
+
10
+
11
+ def test_console_scripts_registered():
12
+ assert _entry_points("console_scripts") == {
13
+ "dtool_serve_directory": "dtool_http.server:cli",
14
+ "dtool_publish_dataset": "dtool_http.publish:cli",
15
+ }
16
+
17
+
18
+ def test_no_dtool_cli_plugins_registered():
19
+ # The utilities are argparse based, not click commands, so they must not
20
+ # be registered as dtool-cli plugins.
21
+ assert _entry_points("dtool.cli") == {}
22
+
23
+
24
+ def test_storage_brokers_registered():
25
+ assert _entry_points("dtool.storage_brokers") == {
26
+ "HTTPStorageBroker": "dtool_http.storagebroker:HTTPStorageBroker",
27
+ "HTTPSStorageBroker": "dtool_http.storagebroker:HTTPSStorageBroker",
28
+ }
@@ -4,7 +4,6 @@ envlist=py3,flake8
4
4
  [testenv]
5
5
  deps=pytest
6
6
  pytest-cov
7
- mock
8
7
  pytest-mock
9
8
  coverage
10
9
  pytz
@@ -1,140 +0,0 @@
1
- name: publish
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- - master
8
- tags:
9
- - '*'
10
-
11
- jobs:
12
-
13
- build:
14
- name: Build
15
- runs-on: ubuntu-latest
16
-
17
- steps:
18
- - uses: actions/checkout@v4
19
- with:
20
- fetch-depth: 0
21
-
22
- - name: Set up Python 3.12
23
- uses: actions/setup-python@v5
24
- with:
25
- python-version: 3.12
26
-
27
- - name: Install requirements
28
- run: |
29
- pip install --upgrade build
30
- pip install --upgrade setuptools wheel setuptools-scm[toml]
31
- pip list
32
-
33
- - name: Package distribution
34
- run: |
35
- python -m build
36
-
37
- - name: Upload artifact
38
- uses: actions/upload-artifact@v4
39
- with:
40
- name: python-package-distributions
41
- path: dist/
42
-
43
-
44
- publish-to-testpypi:
45
- name: Publish to TestPyPI
46
- needs:
47
- - build
48
- runs-on: ubuntu-latest
49
-
50
- environment:
51
- name: testpypi
52
- url: https://test.pypi.org/p/dtool-http
53
-
54
- permissions:
55
- id-token: write # IMPORTANT: mandatory for trusted publishing
56
-
57
- steps:
58
- - name: Download all the dists
59
- uses: actions/download-artifact@v4
60
- with:
61
- name: python-package-distributions
62
- path: dist/
63
-
64
- - name: Publish distribution 📦 to TestPyPI
65
- uses: pypa/gh-action-pypi-publish@release/v1
66
- with:
67
- repository-url: https://test.pypi.org/legacy/
68
- verbose: true
69
- skip-existing: true
70
-
71
-
72
- publish-to-pypi:
73
- name: Publish to PyPI
74
- if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
75
- needs:
76
- - build
77
- runs-on: ubuntu-latest
78
- environment:
79
- name: pypi
80
- url: https://pypi.org/p/dtool-http # Replace <package-name> with your PyPI project name
81
- permissions:
82
- id-token: write # IMPORTANT: mandatory for trusted publishing
83
-
84
- steps:
85
- - name: Download artifact
86
- uses: actions/download-artifact@v4
87
- with:
88
- name: python-package-distributions
89
- path: dist/
90
-
91
- - name: Publish distribution to PyPI
92
- uses: pypa/gh-action-pypi-publish@release/v1
93
- with:
94
- verbose: true
95
-
96
-
97
- github-release:
98
- name: >-
99
- Make github release
100
- needs:
101
- - publish-to-pypi
102
- runs-on: ubuntu-latest
103
-
104
- permissions:
105
- contents: write # IMPORTANT: mandatory for making GitHub Releases
106
- id-token: write # IMPORTANT: mandatory for sigstore
107
-
108
- steps:
109
- - name: Download artifact
110
- uses: actions/download-artifact@v4
111
- with:
112
- name: python-package-distributions
113
- path: dist/
114
-
115
- - name: Sign with Sigstore
116
- uses: sigstore/gh-action-sigstore-python@v3.0.0
117
- with:
118
- inputs: >-
119
- ./dist/*.tar.gz
120
- ./dist/*.whl
121
-
122
- - name: Create GitHub Release
123
- env:
124
- GITHUB_TOKEN: ${{ github.token }}
125
- run: >-
126
- gh release create
127
- '${{ github.ref_name }}'
128
- --repo '${{ github.repository }}'
129
- --notes ""
130
-
131
- - name: Upload artifact signatures to GitHub Release
132
- env:
133
- GITHUB_TOKEN: ${{ github.token }}
134
- # Upload to GitHub Release using the `gh` CLI.
135
- # `dist/` contains the built packages, and the
136
- # sigstore-produced signatures and certificates.
137
- run: >-
138
- gh release upload
139
- '${{ github.ref_name }}' dist/**
140
- --repo '${{ github.repository }}'
@@ -1,9 +0,0 @@
1
- language: python
2
- python:
3
- - "3.5"
4
- install: pip install tox-travis flake8 codecov
5
- script:
6
- - tox
7
- - flake8
8
- after_success:
9
- - codecov
@@ -1 +0,0 @@
1
- include LICENSE.rst
@@ -1,16 +0,0 @@
1
- """dtool_http package."""
2
-
3
- import logging
4
-
5
- try:
6
- from importlib.metadata import version, PackageNotFoundError
7
- except ModuleNotFoundError:
8
- from importlib_metadata import version, PackageNotFoundError
9
-
10
- try:
11
- __version__ = version(__name__)
12
- except PackageNotFoundError:
13
- # package is not installed
14
- pass
15
-
16
- logger = logging.getLogger(__name__)
@@ -1,21 +0,0 @@
1
- # file generated by setuptools-scm
2
- # don't change, don't track in version control
3
-
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5
-
6
- TYPE_CHECKING = False
7
- if TYPE_CHECKING:
8
- from typing import Tuple
9
- from typing import Union
10
-
11
- VERSION_TUPLE = Tuple[Union[int, str], ...]
12
- else:
13
- VERSION_TUPLE = object
14
-
15
- version: str
16
- __version__: str
17
- __version_tuple__: VERSION_TUPLE
18
- version_tuple: VERSION_TUPLE
19
-
20
- __version__ = version = '0.5.2'
21
- __version_tuple__ = version_tuple = (0, 5, 2)
@@ -1,128 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: dtool-http
3
- Version: 0.5.2
4
- Summary: Add HTTP read only dataset support to dtool
5
- Author-email: Tjelvar Olsson <tjelvar.olsson@gmail.com>
6
- Project-URL: Documentation, https://github.com/jic-dtool/dtool-http/blob/master/README.rst
7
- Project-URL: Repository, https://github.com/jic-dtool/dtool-http
8
- Project-URL: Changelog, https://github.com/jic-dtool/dtool-http/blob/master/CHANGELOG.rst
9
- Description-Content-Type: text/x-rst
10
- License-File: LICENSE.rst
11
- Requires-Dist: dtoolcore>=3.13
12
- Requires-Dist: requests
13
- Provides-Extra: test
14
- Requires-Dist: pytest; extra == "test"
15
- Requires-Dist: pytest-cov; extra == "test"
16
- Requires-Dist: pytz; extra == "test"
17
- Dynamic: license-file
18
-
19
- Add HTTP support to dtool for read only access to datasets
20
- ==========================================================
21
-
22
- .. |dtool| image:: https://github.com/jic-dtool/dtool-http/blob/master/icons/22x22/dtool_logo.png?raw=True
23
- :height: 20px
24
- :target: https://github.com/jic-dtool/dtool-http
25
- .. |pypi| image:: https://img.shields.io/pypi/v/dtool-http
26
- :target: https://pypi.org/project/dtool-http/
27
- .. |tag| image:: https://img.shields.io/github/v/tag/jic-dtool/dtool-http
28
- :target: https://github.com/jic-dtool/dtool-http/tags
29
- .. |test| image:: https://img.shields.io/github/actions/workflow/status/jic-dtool/dtool-http/test.yml?branch=master&label=tests
30
- :target: https://github.com/jic-dtool/dtool-http/actions/workflows/test.yml
31
- .. |coverage| image:: https://codecov.io/github/jic-dtool/dtool-http/coverage.svg?branch=master
32
- :target: https://codecov.io/github/jic-dtool/dtool-http?branch=master
33
-
34
- |dtool| |pypi| |tag| |test| |coverage|
35
-
36
- - GitHub: https://github.com/jic-dtool/dtool-http
37
- - Free software: MIT License
38
-
39
-
40
- Features
41
- --------
42
-
43
- - Publish dtool datasets by making them accessible via HTTP(S)
44
- - Interact with dtool datasets over HTTP(S)
45
- - Copy a dataset over HTTP(S)
46
-
47
-
48
- Installation
49
- ------------
50
-
51
- To install the dtool-http package.
52
-
53
- .. code-block:: bash
54
-
55
- cd dtool-http
56
- python setup.py install
57
-
58
-
59
- Usage
60
- -----
61
-
62
- To publish a dataset hosted in Amazon S3 or Microsoft Azure Storage use the
63
- ``dtool_publish_dataset`` command line utility::
64
-
65
- $ dtool_publish_dataset azure://jicinformatics/c58038a4-3a54-425e-9087-144d0733387f
66
- Dataset accessible at: https://jicinformatics.blob.core.windows.net/c58038a4-3a54-425e-9087-144d0733387f
67
-
68
-
69
- To show the descriptive metadata of the published dataset::
70
-
71
- $ dtool readme show https://jicinformatics.blob.core.windows.net/c58038a4-3a54-425e-9087-144d0733387f
72
- ---
73
- description: Enterobacteria phage lambda, complete genome
74
- creation_date: 2018-02-06
75
- accession: NC_001416.1
76
- link: https://www.ncbi.nlm.nih.gov/nuccore/NC_001416.1
77
- reference: |
78
- Nucleotide [Internet]. Bethesda (MD):
79
- National Library of Medicine (US),
80
- National Center for Biotechnology Information; [1988] - .
81
- Accession No. NC_001416.1, Enterobacteria phage lambda, complete genome
82
- [cited 2018 Feb 06]
83
- Available from: https://www.ncbi.nlm.nih.gov/nuccore/NC_001416.1
84
-
85
-
86
- To copy the dataset to local disk::
87
-
88
- $ dtool copy https://jicinformatics.blob.core.windows.net/c58038a4-3a54-425e-9087-144d0733387f ~/my_datasets
89
- Dataset copied to:
90
- file:///Users/olssont/my_datasets/lamda-phage-genome
91
-
92
-
93
- Serving a directory of datasets over HTTP
94
- -----------------------------------------
95
-
96
- There is a simple utility for serving datasets in a directory over HTTP called
97
- ``dtool_serve_direcotry``. This is mainly useful for testing purposes.
98
-
99
- Usage::
100
-
101
- $ dtool_serve_directory ~/my_datasets
102
-
103
- The default port used is 8081. To show the descriptive metadata in the README
104
- one can use dtool::
105
-
106
- $ dtool readme show http://localhost:8081/lamda-phage-genome
107
- ---
108
- description: Enterobacteria phage lambda, complete genome
109
- creation_date: 2018-02-06
110
- accession: NC_001416.1
111
- link: https://www.ncbi.nlm.nih.gov/nuccore/NC_001416.1
112
- reference: |
113
- Nucleotide [Internet]. Bethesda (MD):
114
- National Library of Medicine (US),
115
- National Center for Biotechnology Information; [1988] - .
116
- Accession No. NC_001416.1, Enterobacteria phage lambda, complete genome
117
- [cited 2018 Feb 06]
118
- Available from: https://www.ncbi.nlm.nih.gov/nuccore/NC_001416.1
119
-
120
-
121
- Related packages
122
- ----------------
123
-
124
- - `dtoolcore <https://github.com/jic-dtool/dtoolcore>`_
125
- - `dtool-cli <https://github.com/jic-dtool/dtool-cli>`_
126
- - `dtool-info <https://github.com/jic-dtool/dtool-info>`_
127
- - `dtool-s3 <https://github.com/jic-dtool/dtool-s3>`_
128
- - `dtool-azure <https://github.com/jic-dtool/dtool-azure>`_
@@ -1,36 +0,0 @@
1
- .gitignore
2
- .travis.yml
3
- CHANGELOG.rst
4
- LICENSE.rst
5
- MANIFEST.in
6
- README.rst
7
- pyproject.toml
8
- requirements.txt
9
- setup.cfg
10
- tox.ini
11
- .github/dependabot.yml
12
- .github/workflows/publish.yml
13
- .github/workflows/test.yml
14
- dtool_http/__init__.py
15
- dtool_http/publish.py
16
- dtool_http/server.py
17
- dtool_http/storagebroker.py
18
- dtool_http/version.py
19
- dtool_http.egg-info/PKG-INFO
20
- dtool_http.egg-info/SOURCES.txt
21
- dtool_http.egg-info/dependency_links.txt
22
- dtool_http.egg-info/entry_points.txt
23
- dtool_http.egg-info/requires.txt
24
- dtool_http.egg-info/top_level.txt
25
- icons/22x22/dtool_logo.png
26
- scripts/share_data.py
27
- tests/__init__.py
28
- tests/test_dtool_http_server.py
29
- tests/test_publish.py
30
- tests/data/actually_a_png.txt
31
- tests/data/actually_a_text_file.jpg
32
- tests/data/another_file.txt
33
- tests/data/empty_file
34
- tests/data/random_bytes
35
- tests/data/real_text_file.txt
36
- tests/data/tiny.png
@@ -1,7 +0,0 @@
1
- [dtool.cli]
2
- dtool_publish_dataset = dtool_http.publish:cli
3
- dtool_serve_directory = dtool_http.server:cli
4
-
5
- [dtool.storage_brokers]
6
- HTTPSStorageBroker = dtool_http.storagebroker:HTTPSStorageBroker
7
- HTTPStorageBroker = dtool_http.storagebroker:HTTPStorageBroker
@@ -1,7 +0,0 @@
1
- dtoolcore>=3.13
2
- requests
3
-
4
- [test]
5
- pytest
6
- pytest-cov
7
- pytz
@@ -1 +0,0 @@
1
- dtool_http
@@ -1 +0,0 @@
1
- I am not really a JPG
@@ -1 +0,0 @@
1
- Hello
File without changes
Binary file
@@ -1 +0,0 @@
1
- Here is some text
Binary file
File without changes
File without changes
File without changes