File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,11 +7,12 @@ COPY requirements.txt requirements-dev.txt /tmp/
77# (generated by 'task wheel') from that repo and uncomment
88# the following lines. Also comment out the datatrails-archivist line in
99# requirements.txt.
10+ # cp ~/git/datatrails-python/dist/*.whl .
1011# That way one can test an unreleased version of github datatrails-samples.
1112# NB dont forget to recomment before merging !!
12- # COPY datatrails*.whl /tmp/
13- # RUN python3 -m pip -qq install /tmp/datatrails*.whl \
14- # && rm -f /tmp/datatrails*.whl
13+ # COPY datatrails*.whl /tmp/
14+ # RUN python3 -m pip -qq install /tmp/datatrails*.whl \
15+ # && rm -f /tmp/datatrails*.whl
1516
1617RUN python3 -m pip -qq install --upgrade pip \
1718 && python3 -m pip -qq install -r /tmp/requirements-dev.txt \
Original file line number Diff line number Diff line change 1+ """Local Archivist class
2+ """
3+
4+ # pylint: disable=missing-docstring
5+ # pylint: disable=too-few-public-methods
6+
7+ from archivist .archivist import Archivist as _Archivist
8+
9+ from .about import __version__ as VERSION
10+ from .constants import USER_AGENT_PREFIX
11+
12+
13+ class Archivist (_Archivist ):
14+ def __init__ (self , * args , ** kwargs ):
15+ super ().__init__ (* args , ** kwargs )
16+ self .user_agent = f"{ USER_AGENT_PREFIX } { VERSION } "
Original file line number Diff line number Diff line change 2121from ..testing .assets import make_assets_create , AttachmentDescription
2222
2323if TYPE_CHECKING :
24- from archivist .archivist import Archivist
24+ from . .archivist import Archivist
2525
2626LOGGER = logging .getLogger (__name__ )
2727
File renamed without changes.
Original file line number Diff line number Diff line change 2121from ..testing .assets import make_assets_create , AttachmentDescription
2222
2323if TYPE_CHECKING :
24- from archivist .archivist import Archivist
24+ from . .archivist import Archivist
2525
2626LOGGER = logging .getLogger (__name__ )
2727
Original file line number Diff line number Diff line change 1414from sys import exit as sys_exit
1515from typing import List , Optional
1616
17- from archivist import archivist as type_helper
17+ from .. import archivist as type_helper
1818
1919from ..testing .assets import make_assets_create , AttachmentDescription
2020
Original file line number Diff line number Diff line change 1313import logging
1414from sys import exit as sys_exit
1515
16- from archivist .archivist import Archivist
1716from archivist .logger import set_logger
1817
19- from ..about import __version__ as VERSION
20- from .constants import USER_AGENT_PREFIX
18+ from ..archivist import Archivist
2119
2220LOGGER = logging .getLogger (__name__ )
2321
@@ -114,11 +112,11 @@ def endpoint(args):
114112 args .url ,
115113 authtoken ,
116114 partner_id = args .partner_id ,
117- user_agent = f"{ USER_AGENT_PREFIX } { VERSION } " ,
118115 )
119116
120117 if arch is None :
121118 LOGGER .error ("Critical error. Aborting." )
122119 sys_exit (1 )
123120
121+ LOGGER .info ("User agent is %s" , arch .user_agent )
124122 return arch
Original file line number Diff line number Diff line change @@ -7,4 +7,4 @@ pyyaml~=6.0.1
77# the following lines. Also do similar in the Dockerfile.
88# That way one can test an unreleased version of github datatrails-samples.
99# NB dont forget to uncomment before merging !!
10- datatrails-archivist == 0.31.2
10+ datatrails-archivist == 0.31.3
You can’t perform that action at this time.
0 commit comments