Skip to content

Commit 860e2c5

Browse files
authored
Merge pull request #225 from htcondor/v0.6.1
v0.6.1
2 parents 6a82c33 + fa6bddb commit 860e2c5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+217
-268
lines changed

.pre-commit-config.yaml

+13-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v3.1.0
5+
rev: v3.2.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
@@ -30,3 +30,15 @@ repos:
3030
rev: v2.0.0
3131
hooks:
3232
- id: hadolint
33+
- repo: https://github.com/asottile/setup-cfg-fmt
34+
rev: v1.11.0
35+
hooks:
36+
- id: setup-cfg-fmt
37+
- repo: https://github.com/asottile/seed-isort-config
38+
rev: v2.2.0
39+
hooks:
40+
- id: seed-isort-config
41+
- repo: https://github.com/timothycrosley/isort
42+
rev: 5.3.2
43+
hooks:
44+
- id: isort

docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ ENTRYPOINT ["/home/mapper/htmap/docker/entrypoint.sh"]
6767
CMD ["bash"]
6868

6969
COPY --chown=mapper:mapper . /home/${USER}/htmap
70-
RUN python -m pip install --user --no-cache-dir --disable-pip-version-check "/home/${USER}/htmap[tests,docs]" htcondor==${HTCONDOR_VERSION}.*
70+
RUN python -m pip install --user --no-cache-dir --disable-pip-version-check --use-feature=2020-resolver "/home/${USER}/htmap[tests,docs]" htcondor==${HTCONDOR_VERSION}.*
7171

7272
WORKDIR /home/${USER}/htmap

docs/source/versions/v0_6_1.rst

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
v0.6.1
2+
======
3+
4+
.. py:currentmodule:: htmap
5+
6+
7+
This version is a drop-in replacement for v0.6.0, except that it relaxes the
8+
version requirements for several dependencies to accommodate upcoming changes
9+
to the
10+
`pip dependency resolver <https://pyfound.blogspot.com/2020/03/new-pip-resolver-to-roll-out-this-year.html>`_.
11+
12+
13+
Known Issues
14+
------------
15+
16+
* HTMap does not currently allow "directory content transfers", which is an HTCondor
17+
feature where naming a directory in ``transfer_input_files`` with a trailing
18+
slash transfers the contents of the directory, not the directory itself.
19+
(If you try it, the directory itself will be transferred, as if you had not
20+
used a trailing slash).
21+
Issue: :issue:`215`
22+
* Execution errors that result in the job being terminated but no output being
23+
produced are still not handled entirely gracefully. Right now, the component
24+
state will just show as ``ERRORED``, but there won't be an actual error report.
25+
* Map component state may become corrupted when a map is manually vacated.
26+
Force-removal may be needed to clean up maps if HTCondor and HTMap disagree
27+
about the state of their components.
28+
Issue: :issue:`129`

htmap/__init__.py

+15-28
Original file line numberDiff line numberDiff line change
@@ -16,47 +16,34 @@
1616

1717
import logging as _logging
1818

19+
from .settings import BASE_SETTINGS, USER_SETTINGS, settings
1920
from .version import __version__, version, version_info
2021

21-
from .settings import settings, USER_SETTINGS, BASE_SETTINGS
22-
2322
# SET UP NULL LOG HANDLER
2423
_logger = _logging.getLogger(__name__)
2524
_logger.setLevel(_logging.DEBUG)
2625
_logger.addHandler(_logging.NullHandler())
2726

28-
from .mapping import (
29-
map,
30-
starmap,
31-
build_map,
32-
MapBuilder,
33-
)
34-
from .mapped import mapped, MappedFunction
35-
from .maps import (
36-
Map,
37-
MapStdOut,
38-
MapStdErr,
39-
MapOutputFiles,
40-
)
41-
from .holds import ComponentHold
27+
from . import _startup, exceptions
28+
from .checkpointing import checkpoint
4229
from .errors import ComponentError
43-
from .state import ComponentStatus
44-
from .options import MapOptions, register_delivery_method
30+
from .holds import ComponentHold
4531
from .management import (
46-
status,
47-
status_json,
48-
status_csv,
32+
Transplant,
33+
clean,
4934
load,
5035
load_maps,
5136
remove,
52-
clean,
53-
Transplant,
54-
transplants,
37+
status,
38+
status_csv,
39+
status_json,
5540
transplant_info,
41+
transplants,
5642
)
43+
from .mapped import MappedFunction, mapped
44+
from .mapping import MapBuilder, build_map, map, starmap
45+
from .maps import Map, MapOutputFiles, MapStdErr, MapStdOut
46+
from .options import MapOptions, register_delivery_method
47+
from .state import ComponentStatus
5748
from .tags import get_tags
58-
from .checkpointing import checkpoint
5949
from .transfer import TransferPath, transfer_output_files
60-
from . import exceptions
61-
62-
from . import _startup

htmap/__main__.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from .cli import cli
22

3-
43
if __name__ == "__main__":
54
exit(cli.main(prog_name="htmap"))

htmap/_startup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import os
21
import logging
2+
import os
33
from logging import handlers
44
from pathlib import Path
55

6-
from . import settings, names
6+
from . import names, settings
77

88
logger = logging.getLogger("htmap")
99

htmap/checkpointing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
# limitations under the License.
1515

1616
import os
17-
from pathlib import Path
1817
import shutil
18+
from pathlib import Path
1919

2020
from . import names
2121

htmap/cli.py

+10-12
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,26 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
from typing import Optional, List, Collection, Tuple
17-
18-
import logging
19-
import sys
20-
import time
2116
import collections
22-
import random
2317
import functools
18+
import logging
19+
import random
2420
import shutil
21+
import sys
22+
import time
2523
from pathlib import Path
26-
27-
import htcondor
28-
import htmap
29-
from htmap import names, __version__
30-
from htmap.management import _status, read_events
24+
from typing import Collection, List, Optional, Tuple
3125

3226
import click
27+
import htcondor
3328
from click_didyoumean import DYMGroup
34-
3529
from halo import Halo
3630
from spinners import Spinners
3731

32+
import htmap
33+
from htmap import __version__, names
34+
from htmap.management import _status, read_events
35+
3836
logger = logging.getLogger(__name__)
3937
logger.setLevel(logging.DEBUG)
4038

htmap/htio.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
from typing import Any, List, Iterator, Callable, Iterable
17-
import logging
18-
1916
import gzip
2017
import json
18+
import logging
2119
from pathlib import Path
20+
from typing import Any, Callable, Iterable, Iterator, List
2221

2322
import cloudpickle
2423
import htcondor

htmap/management.py

+7-8
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,20 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
from typing import Tuple, Iterable, Dict, Union, NamedTuple, Callable, List, Optional
17-
import logging
18-
19-
from pathlib import Path
20-
import datetime
2116
import collections
22-
import json
2317
import csv
18+
import datetime
2419
import io
25-
import textwrap
20+
import json
21+
import logging
2622
import shutil
23+
import textwrap
2724
import uuid
2825
from concurrent.futures.thread import ThreadPoolExecutor
26+
from pathlib import Path
27+
from typing import Callable, Dict, Iterable, List, NamedTuple, Optional, Tuple, Union
2928

30-
from . import maps, tags, mapping, utils, state, names, settings, exceptions
29+
from . import exceptions, mapping, maps, names, settings, state, tags, utils
3130

3231
logger = logging.getLogger(__name__)
3332

htmap/mapped.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
from typing import Iterable, Dict, Union, Optional, Callable, Any
1716
import logging
17+
from typing import Any, Callable, Dict, Iterable, Optional, Union
1818

19-
from . import mapping, options, maps
19+
from . import mapping, maps, options
2020

2121
logger = logging.getLogger(__name__)
2222

htmap/mapping.py

+5-17
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,18 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
from typing import Tuple, Iterable, Dict, Optional, Callable, Iterator, Any, List, Union
16+
import itertools
1717
import logging
18-
19-
import uuid
2018
import shutil
19+
import uuid
2120
from pathlib import Path
22-
import itertools
2321
from pprint import pformat
22+
from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Union
2423

2524
import htcondor
2625

27-
from . import (
28-
htio,
29-
tags,
30-
exceptions,
31-
maps,
32-
transfer,
33-
options,
34-
condor,
35-
settings,
36-
names,
37-
utils,
38-
)
39-
from .types import KWARGS, ARGS_OR_KWARGS, ARGS_AND_KWARGS, ARGS
26+
from . import condor, exceptions, htio, maps, names, options, settings, tags, transfer, utils
27+
from .types import ARGS, ARGS_AND_KWARGS, ARGS_OR_KWARGS, KWARGS
4028

4129
logger = logging.getLogger(__name__)
4230

htmap/maps.py

+9-33
Original file line numberDiff line numberDiff line change
@@ -13,48 +13,24 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
from typing import (
17-
Tuple,
18-
List,
19-
Iterable,
20-
Any,
21-
Optional,
22-
Iterator,
23-
Dict,
24-
Mapping,
25-
MutableMapping,
26-
)
27-
import logging
28-
16+
import collections
17+
import collections.abc
2918
import datetime
30-
import shutil
31-
import time
3219
import functools
3320
import inspect
34-
import collections
35-
import collections.abc
21+
import logging
22+
import shutil
23+
import time
3624
import weakref
3725
from copy import copy
3826
from pathlib import Path
27+
from typing import Any, Dict, Iterable, Iterator, List, Mapping, MutableMapping, Optional, Tuple
3928

40-
from tqdm import tqdm
41-
42-
import htcondor
4329
import classad
30+
import htcondor
31+
from tqdm import tqdm
4432

45-
from . import (
46-
htio,
47-
state,
48-
tags,
49-
errors,
50-
holds,
51-
mapping,
52-
condor,
53-
settings,
54-
utils,
55-
names,
56-
exceptions,
57-
)
33+
from . import condor, errors, exceptions, holds, htio, mapping, names, settings, state, tags, utils
5834

5935
logger = logging.getLogger(__name__)
6036

htmap/options.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,18 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
from typing import Union, Iterable, Optional, Callable, Dict, List, Tuple
17-
import logging
18-
19-
import sys
20-
import shutil
2116
import collections
2217
import hashlib
18+
import logging
19+
import shutil
20+
import sys
2321
from pathlib import Path
22+
from typing import Callable, Dict, Iterable, List, Optional, Tuple, Union
2423

2524
import htcondor
2625

27-
from . import utils, transfer, exceptions, names, settings
28-
from .types import TRANSFER_PATH, REMAPS
26+
from . import exceptions, names, settings, transfer, utils
27+
from .types import REMAPS, TRANSFER_PATH
2928

3029
logger = logging.getLogger(__name__)
3130

htmap/run/_htmap_run.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18+
import datetime
19+
import getpass
20+
import gzip
1821
import os
1922
import shutil
20-
import sys
2123
import socket
22-
import datetime
23-
import gzip
24+
import subprocess
25+
import sys
2426
import textwrap
2527
import traceback
26-
import subprocess
27-
import getpass
2828
from pathlib import Path
2929

3030
TRANSFER_DIR = "_htmap_transfer"

0 commit comments

Comments
 (0)