Skip to content

Commit c910257

Browse files
authored
Merge branch 'master' into fix_pandas_test_eq
2 parents 7624113 + 4e2b8a3 commit c910257

26 files changed

+4943
-2686
lines changed

.devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
"name": "fastcore-codespaces",
33
"dockerComposeFile": "docker-compose.yml",
44
"settings": {"terminal.integrated.shell.linux": "/bin/bash"},
5+
"workspaceFolder": "/data/",
56
"service": "watcher",
67
"mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
78
"forwardPorts": [4000, 8080],
89
"appPort": [4000, 8080],
910
"extensions": ["ms-python.python",
1011
"ms-azuretools.vscode-docker"],
1112
"runServices": ["notebook", "jekyll", "watcher"],
12-
"postStartCommand": "pip install -e ."
13+
"postStartCommand": "cd /data && pip install -e \".[dev]\""
1314
}

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ jobs:
2828
uses: fastai/workflows/nb@master
2929
- name: Run fastcore tests
3030
run: |
31-
pip install -Uqq nbdev fastcore
31+
pip install -Uqq nbdev
32+
pip install -e ".[dev]"
3233
nbdev_test_nbs
3334
3435
nbdev-integration-test:
@@ -79,7 +80,6 @@ jobs:
7980
pip install -Uqq nbdev
8081
cd fastai && pip install -Ue .[dev]
8182
cd ../fastcore && pip install -Ue .[dev]
82-
pip install "sentencepiece<0.1.90" wandb tensorboard albumentations pydicom opencv-python scikit-image pyarrow kornia catalyst captum neptune-cli
8383
8484
- name: check for cache hit
8585
uses: actions/cache@v2

CHANGELOG.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,103 @@
22

33
<!-- do not remove -->
44

5+
## 1.3.12
6+
7+
### New Features
8+
9+
- enum support for `call_parse` ([#245](https://github.com/fastai/fastcore/issues/245))
10+
- Added obj2dict ([#244](https://github.com/fastai/fastcore/issues/244))
11+
- `return_headers` param for `urlsend` and `urlread` ([#242](https://github.com/fastai/fastcore/issues/242))
12+
- add common Chrome headers ([#241](https://github.com/fastai/fastcore/issues/241))
13+
- add `utc2local` and `local2utc` ([#239](https://github.com/fastai/fastcore/issues/239))
14+
- add `Path.read_json` ([#238](https://github.com/fastai/fastcore/issues/238))
15+
16+
### Bugs Squashed
17+
18+
- `*args` not handled correctly in process/thread pools ([#246](https://github.com/fastai/fastcore/issues/246))
19+
20+
21+
## 1.3.11
22+
23+
### Bugs Squashed
24+
25+
- regression in urlopen header user-agent not set ([#237](https://github.com/fastai/fastcore/issues/237))
26+
- `loads` incompatible with Python 3.9 ([#236](https://github.com/fastai/fastcore/issues/236))
27+
- Documentation search not working ([#235](https://github.com/fastai/fastcore/issues/235))
28+
29+
30+
## 1.3.10
31+
32+
### New Features
33+
34+
- split `parallel` and `net` modules out of `xtras` ([#234](https://github.com/fastai/fastcore/issues/234))
35+
- New HTTP Exceptions hierarchy for each status code, used by `url*` functions
36+
- add `Request.summary` and `debug` paramaeter to `urlsend` ([#233](https://github.com/fastai/fastcore/issues/233))
37+
- Add `ImportEnum`, `StrEnum`, and `str_enum` ([#232](https://github.com/fastai/fastcore/issues/232))
38+
- handle encoded data in `urlrequest` ([#231](https://github.com/fastai/fastcore/issues/231))
39+
40+
41+
## 1.3.9
42+
43+
### New Features
44+
45+
- use `__slots__` in `store_attr` if exists ([#226](https://github.com/fastai/fastcore/issues/226))
46+
- add `urlrequest` ([#225](https://github.com/fastai/fastcore/issues/225))
47+
- add `loads` and `urlsend` ([#224](https://github.com/fastai/fastcore/issues/224))
48+
- add `PartialFormatter` and `partial_format` ([#223](https://github.com/fastai/fastcore/issues/223))
49+
- add `stringfmt_names` ([#222](https://github.com/fastai/fastcore/issues/222))
50+
51+
52+
## 1.3.8
53+
54+
### New Features
55+
56+
- rename `negate_func` to `not_` for consistency with other curried ops ([#221](https://github.com/fastai/fastcore/issues/221))
57+
- Support empty content for `urljson` ([#219](https://github.com/fastai/fastcore/issues/219))
58+
- move `patch` and `patch_to` to `fastcore.basics`, and avoid clobbering existing symbols when patching ([#214](https://github.com/fastai/fastcore/issues/214))
59+
60+
61+
## 1.3.7
62+
63+
### New Features
64+
65+
- add `startthread` ([#218](https://github.com/fastai/fastcore/issues/218))
66+
- make `run` compatible with py36 ([#216](https://github.com/fastai/fastcore/issues/216))
67+
- `reuse_addr` param to `start_server` ([#215](https://github.com/fastai/fastcore/issues/215))
68+
- add rfc3986 list to `urlquote` ([#213](https://github.com/fastai/fastcore/issues/213))
69+
70+
71+
## 1.3.6
72+
73+
### New Features
74+
75+
- quote URL paths in `urlwrap` ([#211](https://github.com/fastai/fastcore/issues/211))
76+
- Add `start_server` and `start_client` for simple socket networking ([#210](https://github.com/fastai/fastcore/issues/210))
77+
- new `uniqueify` and `val2idx` functions, and additional params to `listify` ([#209](https://github.com/fastai/fastcore/issues/209))
78+
- improve representation in `basic_repr` ([#197](https://github.com/fastai/fastcore/issues/197))
79+
80+
81+
## 1.3.5
82+
83+
### Breaking Changes
84+
85+
- remove `log_args` ([#176](https://github.com/fastai/fastcore/issues/176))
86+
87+
### New Features
88+
89+
- `Stateful` base class/mixin for objects that should not serialize all their state ([#196](https://github.com/fastai/fastcore/issues/196))
90+
- new `frame` param to `argnames` ([#195](https://github.com/fastai/fastcore/issues/195))
91+
- add `urlopen` and `untar_dir` ([#192](https://github.com/fastai/fastcore/issues/192))
92+
- `SCRIPT_INFO.func` to let functions know what CLI name was called in `fastcore.script` ([#185](https://github.com/fastai/fastcore/issues/185))
93+
- add `annotations` and `argnames` functions ([#179](https://github.com/fastai/fastcore/issues/179))
94+
- allow `but` param in `store_attr` to be either `list` or `str` ([#174](https://github.com/fastai/fastcore/issues/174))
95+
- add `urlvalid` ([#173](https://github.com/fastai/fastcore/issues/173))
96+
97+
### Bugs Squashed
98+
99+
- `@typed` doesn't work with classes ([#183](https://github.com/fastai/fastcore/issues/183)) (reported by @krishnap)
100+
101+
5102
## 1.3.2
6103

7104
### New Features

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ For more details, including a link to the full documentation and source code, us
5151
doc(coll_repr)
5252
```
5353

54-
<img width="499" src="nbs/images/att_00000.png" align="left">
54+
<img width="499" src="nbs/images/att_00000.png" style="max-width: 499px">
5555

5656
The documentation also contains links to any related functions or classes, which appear like this: `coll_repr` (in the notebook itself you will just see a word with back-ticks around it; the links are auto-generated in the documentation site). The documentation will generally show one or more examples of use, along with any background context necessary to understand them. As you'll see, the examples for each function and method are shown as tests, rather than example outputs, so let's start by explaining that.
5757

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ services:
1515

1616
notebook:
1717
<<: *fastai
18-
command: bash -c "pip install -e . && jupyter notebook --allow-root --no-browser --ip=0.0.0.0 --port=8080 --NotebookApp.token='' --NotebookApp.password=''"
18+
command: bash -c "pip install -e \".[dev]\" && jupyter notebook --allow-root --no-browser --ip=0.0.0.0 --port=8080 --NotebookApp.token='' --NotebookApp.password=''"
1919
ports:
2020
- "8080:8080"
2121

docs_src/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ company_name: fast.ai
66
github_editme_path:
77
use_math: true
88
google_analytics: UA-89522379-3
9-
google_search: 000837339549978028235:mygjrpycyx2
9+
google_search: 330b68eee09552ff9
1010

1111
exclude:
1212
- .idea/

fastcore/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.3.3"
1+
__version__ = "1.3.13"

fastcore/_nbdev.py

Lines changed: 70 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"basic_repr": "01_basics.ipynb",
2626
"is_array": "01_basics.ipynb",
2727
"listify": "01_basics.ipynb",
28+
"tuplify": "01_basics.ipynb",
2829
"true": "01_basics.ipynb",
2930
"NullType": "01_basics.ipynb",
3031
"null": "01_basics.ipynb",
@@ -52,17 +53,22 @@
5253
"store_attr": "01_basics.ipynb",
5354
"attrdict": "01_basics.ipynb",
5455
"properties": "01_basics.ipynb",
56+
"camel2words": "01_basics.ipynb",
5557
"camel2snake": "01_basics.ipynb",
5658
"snake2camel": "01_basics.ipynb",
5759
"class2attr": "01_basics.ipynb",
5860
"getattrs": "01_basics.ipynb",
5961
"hasattrs": "01_basics.ipynb",
6062
"setattrs": "01_basics.ipynb",
6163
"try_attrs": "01_basics.ipynb",
64+
"GetAttrBase": "01_basics.ipynb",
65+
"GetAttr": "01_basics.ipynb",
66+
"delegate_attr": "01_basics.ipynb",
6267
"ShowPrint": "01_basics.ipynb",
6368
"Int": "01_basics.ipynb",
6469
"Str": "01_basics.ipynb",
6570
"Float": "01_basics.ipynb",
71+
"concat": "01_basics.ipynb",
6672
"detuplify": "01_basics.ipynb",
6773
"replicate": "01_basics.ipynb",
6874
"setify": "01_basics.ipynb",
@@ -76,13 +82,15 @@
7682
"cycle": "02_foundation.ipynb",
7783
"zip_cycle": "02_foundation.ipynb",
7884
"sorted_ex": "01_basics.ipynb",
79-
"negate_func": "01_basics.ipynb",
85+
"not_": "01_basics.ipynb",
8086
"argwhere": "01_basics.ipynb",
8187
"filter_ex": "01_basics.ipynb",
8288
"renumerate": "01_basics.ipynb",
8389
"first": "01_basics.ipynb",
8490
"nested_attr": "01_basics.ipynb",
8591
"nested_idx": "01_basics.ipynb",
92+
"val2idx": "01_basics.ipynb",
93+
"uniqueify": "01_basics.ipynb",
8694
"num_methods": "01_basics.ipynb",
8795
"rnum_methods": "01_basics.ipynb",
8896
"inum_methods": "01_basics.ipynb",
@@ -100,75 +108,102 @@
100108
"instantiate": "01_basics.ipynb",
101109
"using_attr": "01_basics.ipynb",
102110
"Self": "01_basics.ipynb",
111+
"copy_func": "01_basics.ipynb",
112+
"patch_to": "01_basics.ipynb",
113+
"patch": "01_basics.ipynb",
114+
"patch_property": "01_basics.ipynb",
115+
"ImportEnum": "01_basics.ipynb",
116+
"StrEnum": "01_basics.ipynb",
117+
"str_enum": "01_basics.ipynb",
118+
"Stateful": "01_basics.ipynb",
103119
"PrettyString": "01_basics.ipynb",
104120
"even_mults": "01_basics.ipynb",
105121
"num_cpus": "01_basics.ipynb",
106122
"defaults.cpus": "01_basics.ipynb",
107123
"add_props": "01_basics.ipynb",
108124
"typed": "01_basics.ipynb",
109-
"copy_func": "02_foundation.ipynb",
110-
"patch_to": "02_foundation.ipynb",
111-
"patch": "02_foundation.ipynb",
112-
"patch_property": "02_foundation.ipynb",
113125
"working_directory": "02_foundation.ipynb",
114126
"add_docs": "02_foundation.ipynb",
115127
"docs": "02_foundation.ipynb",
116128
"coll_repr": "02_foundation.ipynb",
117129
"is_bool": "02_foundation.ipynb",
118130
"mask2idxs": "02_foundation.ipynb",
119131
"is_indexer": "02_foundation.ipynb",
120-
"GetAttr": "02_foundation.ipynb",
121-
"delegate_attr": "02_foundation.ipynb",
122132
"CollBase": "02_foundation.ipynb",
123133
"L": "02_foundation.ipynb",
124134
"L.__signature__": "02_foundation.ipynb",
125135
"save_config_file": "02_foundation.ipynb",
126136
"read_config_file": "02_foundation.ipynb",
127137
"Config": "02_foundation.ipynb",
128138
"dict2obj": "03_xtras.ipynb",
139+
"obj2dict": "03_xtras.ipynb",
129140
"repr_dict": "03_xtras.ipynb",
130141
"AttrDict.__repr__": "03_xtras.ipynb",
131-
"tuplify": "03_xtras.ipynb",
132-
"uniqueify": "03_xtras.ipynb",
133142
"is_listy": "03_xtras.ipynb",
134143
"shufflish": "03_xtras.ipynb",
135144
"mapped": "03_xtras.ipynb",
136145
"IterLen": "03_xtras.ipynb",
137146
"ReindexCollection": "03_xtras.ipynb",
138-
"Path.readlines": "03_xtras.ipynb",
139-
"Path.mk_write": "03_xtras.ipynb",
140-
"Path.ls": "03_xtras.ipynb",
141-
"open_file": "03_xtras.ipynb",
142-
"save_pickle": "03_xtras.ipynb",
143-
"load_pickle": "03_xtras.ipynb",
144-
"Path.__repr__": "03_xtras.ipynb",
145147
"maybe_open": "03_xtras.ipynb",
146148
"image_size": "03_xtras.ipynb",
147149
"bunzip": "03_xtras.ipynb",
148150
"join_path_file": "03_xtras.ipynb",
149-
"urlread": "03_xtras.ipynb",
150-
"urljson": "03_xtras.ipynb",
151-
"urlwrap": "03_xtras.ipynb",
152-
"urlcheck": "03_xtras.ipynb",
153-
"urlclean": "03_xtras.ipynb",
154-
"urlsave": "03_xtras.ipynb",
155-
"urlvalid": "03_xtras.ipynb",
151+
"loads": "03_xtras.ipynb",
152+
"untar_dir": "03_xtras.ipynb",
156153
"repo_details": "03_xtras.ipynb",
157154
"run": "03_xtras.ipynb",
158-
"do_request": "03_xtras.ipynb",
159-
"sort_by_run": "03_xtras.ipynb",
155+
"open_file": "03_xtras.ipynb",
156+
"save_pickle": "03_xtras.ipynb",
157+
"load_pickle": "03_xtras.ipynb",
158+
"Path.readlines": "03_xtras.ipynb",
159+
"Path.read_json": "03_xtras.ipynb",
160+
"Path.mk_write": "03_xtras.ipynb",
161+
"Path.ls": "03_xtras.ipynb",
162+
"Path.__repr__": "03_xtras.ipynb",
163+
"truncstr": "03_xtras.ipynb",
164+
"spark_chars": "03_xtras.ipynb",
165+
"sparkline": "03_xtras.ipynb",
166+
"autostart": "03_xtras.ipynb",
167+
"time_events": "03_xtras.ipynb",
168+
"EventTimer": "03_xtras.ipynb",
169+
"stringfmt_names": "03_xtras.ipynb",
170+
"PartialFormatter": "03_xtras.ipynb",
171+
"partial_format": "03_xtras.ipynb",
172+
"utc2local": "03_xtras.ipynb",
173+
"local2utc": "03_xtras.ipynb",
160174
"trace": "03_xtras.ipynb",
161175
"round_multiple": "03_xtras.ipynb",
162176
"modified_env": "03_xtras.ipynb",
163177
"ContextManagers": "03_xtras.ipynb",
164178
"str2bool": "03_xtras.ipynb",
165-
"set_num_threads": "03_xtras.ipynb",
166-
"ProcessPoolExecutor": "03_xtras.ipynb",
167-
"ThreadPoolExecutor": "03_xtras.ipynb",
168-
"parallel": "03_xtras.ipynb",
169-
"run_procs": "03_xtras.ipynb",
170-
"parallel_gen": "03_xtras.ipynb",
171-
"threaded": "03_xtras.ipynb",
179+
"sort_by_run": "03_xtras.ipynb",
180+
"threaded": "03a_parallel.ipynb",
181+
"startthread": "03a_parallel.ipynb",
182+
"set_num_threads": "03a_parallel.ipynb",
183+
"ThreadPoolExecutor": "03a_parallel.ipynb",
184+
"ProcessPoolExecutor": "03a_parallel.ipynb",
185+
"parallel": "03a_parallel.ipynb",
186+
"run_procs": "03a_parallel.ipynb",
187+
"parallel_gen": "03a_parallel.ipynb",
188+
"url_default_headers": "03b_net.ipynb",
189+
"urlquote": "03b_net.ipynb",
190+
"urlwrap": "03b_net.ipynb",
191+
"ExceptionsHTTP": "03b_net.ipynb",
192+
"HTTP4xxClientError": "03b_net.ipynb",
193+
"HTTP5xxServerError": "03b_net.ipynb",
194+
"urlopen": "03b_net.ipynb",
195+
"urlread": "03b_net.ipynb",
196+
"urljson": "03b_net.ipynb",
197+
"urlcheck": "03b_net.ipynb",
198+
"urlclean": "03b_net.ipynb",
199+
"urlsave": "03b_net.ipynb",
200+
"urlvalid": "03b_net.ipynb",
201+
"urlrequest": "03b_net.ipynb",
202+
"Request.summary": "03b_net.ipynb",
203+
"urlsend": "03b_net.ipynb",
204+
"do_request": "03b_net.ipynb",
205+
"start_server": "03b_net.ipynb",
206+
"start_client": "03b_net.ipynb",
172207
"lenient_issubclass": "04_dispatch.ipynb",
173208
"sorted_topologically": "04_dispatch.ipynb",
174209
"TypeDispatch": "04_dispatch.ipynb",
@@ -207,6 +242,7 @@
207242
"store_true": "08_script.ipynb",
208243
"store_false": "08_script.ipynb",
209244
"bool_arg": "08_script.ipynb",
245+
"clean_type_str": "08_script.ipynb",
210246
"Param": "08_script.ipynb",
211247
"anno_parser": "08_script.ipynb",
212248
"args_from_prog": "08_script.ipynb",
@@ -217,6 +253,8 @@
217253
"basics.py",
218254
"foundation.py",
219255
"xtras.py",
256+
"parallel.py",
257+
"net.py",
220258
"dispatch.py",
221259
"transform.py",
222260
"meta.py",

0 commit comments

Comments
 (0)