Jason R. Coombs
7bee559740
Rely on inheritance to handle errors in Result and Pod.
2016-09-03 15:36:52 -04:00
Jason R. Coombs
f0fc35c7c1
Simplify init in Result
2016-09-03 15:32:30 -04:00
Jason R. Coombs
5f86e5a1d6
Re-use always_iterable
2016-09-03 15:23:08 -04:00
Jason R. Coombs
c2ce282a51
Add notes in README about attributes exposed.
2016-09-03 15:03:02 -04:00
Jason R. Coombs
e1ae854faf
Return iterables throughout for consistency.
2016-09-03 14:59:58 -04:00
Jason R. Coombs
1a4dc2fc62
Re-use more of the from_doc constructor and attribute type transformation in the Result object. Restore Pod.subpods through an alias property.
2016-09-03 14:56:06 -04:00
Jason R. Coombs
273cd73330
Move result after Pod
2016-09-03 14:40:07 -04:00
Jason R. Coombs
d4e3afe6b0
Use compose to generate the lists where expected
2016-09-03 14:38:10 -04:00
Jason R. Coombs
658183b56c
Move from_doc to the Document class
2016-09-03 14:33:17 -04:00
Jason R. Coombs
5d697ade21
Fix test failure on Python 2
2016-09-03 14:31:29 -04:00
Jason R. Coombs
56d015694c
Update docs and changelog to reflect the current state.
2016-09-03 14:30:36 -04:00
Jason R. Coombs
6112882d6b
Remove installation instructions, as they're redundant for the guidance given by warehouse at https://pypi.org/project/wolframalpha .
2016-09-03 14:24:06 -04:00
Jason R. Coombs
8c05a4b376
Update changelog
2016-09-03 14:23:08 -04:00
Jason R. Coombs
9be618cd8c
Now the various objects attributes are derived directly from the data with which they're initialized.
2016-09-03 14:21:06 -04:00
Jason R. Coombs
6abccdc728
Move Image (and Warning and Assumption) ahead of Subpod.
2016-09-03 14:13:10 -04:00
Jason R. Coombs
406967e8e1
Define subpod above pod
2016-09-03 13:54:36 -04:00
Jason R. Coombs
8ed3be43e1
models now derive from a dict (via Document), and store their content natively in self.
2016-09-03 13:43:13 -04:00
Jason R. Coombs
be0938dded
Add test ensuring that the type of position is float
2016-09-03 13:32:16 -04:00
Jason R. Coombs
288b13db0f
Rename node and tree to hidden _doc attributes
2016-09-03 12:57:40 -04:00
Jason R. Coombs
d4e09bb905
Convert on-object lists into properties. Add tests for these properties.
2016-09-03 12:49:33 -04:00
Jason R. Coombs
9115d23d83
Restore expectation that results can be an iterator.
2016-09-03 12:33:58 -04:00
Jason R. Coombs
7ab8e44695
Always use map from the future
2016-09-03 12:29:53 -04:00
Jason R. Coombs
946b5d1f4b
Extend test to capture exactly one result with exactly one text.
2016-09-03 12:26:17 -04:00
Jason R. Coombs
14ba338b1e
Restore prior expectation about Pod.text
2016-09-03 12:24:46 -04:00
Jason R. Coombs
b69b312692
urlencode requires a tuple and not an iterable.
2016-09-03 12:06:12 -04:00
Jason R. Coombs
029a0c4288
Remove key from the code. Each client must acquire their own key.
2016-09-03 12:01:16 -04:00
Jason R. Coombs
5452c877e9
Remove Mercurial metadata
2016-09-03 11:51:12 -04:00
Jason R. Coombs
412a04b16b
Rely on presence of 'error' element to detect errors.
2016-09-03 11:50:15 -04:00
Jason R. Coombs
35cc9e035d
Combine error handling
2016-09-03 11:49:01 -04:00
Jason R. Coombs
760a6a6a92
Normalize docstrings per PEP 257.
2016-09-03 11:20:52 -04:00
Jason R. Coombs
bee228a1d5
Provide an interface to supply multiple parameters (even with the same name) to the query. Renamed 'query' to 'input' for clarity and to align with the API.
2016-09-03 11:18:40 -04:00
Jason R. Coombs
788746c595
Allow other query parameters to be passed
2016-09-03 11:08:41 -04:00
Jason R. Coombs
e98b5d74ca
Trim whitespace
2016-09-03 11:05:48 -04:00
Jason R. Coombs
43f656f296
Merge pull request #7 from Zenohm/master
...
Restructuring
2016-09-03 10:55:50 -04:00
Isaac Smith
7d3453ec9a
Grouped Pod and Subpod classes.
2016-05-14 20:19:16 -04:00
Isaac Smith
13c2f7700d
Update CHANGES.rst
2016-05-14 20:12:18 -04:00
Isaac Smith
570998719b
Fix unseen error.
...
Result of one of the previous changes. Almost didn't notice it.
2016-05-14 20:08:00 -04:00
Isaac Smith
1d8d2451bb
Fix unseen error.
...
Praised be rubber ducky.
2016-05-14 20:00:16 -04:00
Isaac Smith
5675e1ec2c
Nevermind.
...
Yeah, it'll break some stuff.
2016-05-14 19:33:27 -04:00
Isaac Smith
07a8a2d804
Update example
2016-05-14 19:28:50 -04:00
Isaac Smith
d3046c7ede
Make tests reflect changes
2016-05-14 19:24:48 -04:00
Isaac Smith
a784c88fa1
Simplify naming convetion
...
Aligns more with the original implementation.
2016-05-14 19:23:50 -04:00
Isaac Smith
9331558340
Align with original methods
...
Rewrote the results method a bit so it returned something similar to the original result, which will make the transition easier.
2016-05-14 19:13:58 -04:00
Zenohm
48ff24daa9
It's a change. :D
...
Contrary to what I thought, this update appears to be mostly compatible with all the code listed that came before. All generators have been switched out for lists so that information can be used from one location. If this is determined to somehow have an impact despite Wolfram Alpha not being expected to return oodles of information, then the code can be easily rewritten to use generators instead of lists. Lists are simply more convenient when experimenting with the source code.
2016-05-14 18:50:56 -04:00
Zenohm
643934b950
Explained limitations, offered alternative
...
Added a section at the bottom explaining what a developer should do if they need access to information that the Wolfram Alpha API provides but that isn't built into the interface. Because of the way this update handles the API's replies the information is easy to access using builtin data types.
2016-05-14 18:37:44 -04:00
Zenohm
363ccf248d
Noted severe change.
...
These changes will most likely break most code that relies on this library.
Using generators is great and all, but if you want to query Wolfram Alpha for more complex information with
more context this library needs to be able to do that and be expandable at the same time. There's a lot more to Wolfram Alpha and the Python API should be able to access that content in a uniform way.
2016-05-14 18:27:38 -04:00
Zenohm
8ee1dd0e09
Update readme and add information.
2016-05-14 18:09:28 -04:00
Zenohm
bb3ee3cdc3
Documentation
2016-05-14 17:49:26 -04:00
Zenohm
8b31e9701d
Merge pull request #1 from Zenohm/Zenohm-redesign
...
Consistency matters.
2016-05-14 17:28:24 -04:00
Zenohm
55567d4732
Add dependency
2016-05-14 17:28:10 -04:00