Skip to content

Refactor to module layout #32

Merged
merged 76 commits into from
Jun 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
57b3c5b
Update README.md
campb303 Feb 22, 2021
846fe08
Merge pull request #3 from ECN/staging
benne238 Mar 12, 2021
0bb672a
Add installation instructions to readme
benne238 Mar 12, 2021
4e47118
Create Item module in webqueue2api package
campb303 May 28, 2021
98d0544
Create Queue module in webqueue2api package
campb303 May 28, 2021
2ed1489
Move isValidItemName func to Utilities module
campb303 Jun 1, 2021
7972440
Move Item and Queue classes to parser subpackage
campb303 Jun 2, 2021
45813b6
Add getValidQueues function to parser utilities
campb303 Jun 2, 2021
487f9df
Add getQueueCounts and loadQueues functions to utilities
campb303 Jun 2, 2021
6786acf
Move utility functions to queue module
campb303 Jun 7, 2021
77d286f
Add section comments to item module
campb303 Jun 7, 2021
92f7377
Refine exports
campb303 Jun 7, 2021
f060381
Simplify import statement
campb303 Jun 9, 2021
e3164aa
Remove logging and allow packages installed from src directory
campb303 Jun 9, 2021
9f545fe
Create config module for parser package
campb303 Jun 10, 2021
b67ee91
Replace hardcoded config in Item with package config value
campb303 Jun 10, 2021
b834d86
Add queues_to_ignore to parser config
campb303 Jun 10, 2021
4685c30
Replace hardcoded config in Queue with package config value
campb303 Jun 10, 2021
7234882
Correct parser config class
campb303 Jun 10, 2021
3aca5fe
Export parser package config
campb303 Jun 10, 2021
57de1c5
Create webqueue2api package config
campb303 Jun 10, 2021
d1682ca
Export webqueue2api package config
campb303 Jun 10, 2021
5d09a1d
Add dataclasses library to setup file
campb303 Jun 10, 2021
90abd36
Create api sub-package skeleton with blank config
campb303 Jun 15, 2021
c17647d
Add api config to webqueue2api config
campb303 Jun 15, 2021
0d38b4f
Add generate_random_string function to API config
campb303 Jun 16, 2021
b452e15
Add jwt_secret_key and environment options to api config with defaults
campb303 Jun 16, 2021
cae26be
Create app module in api package with Flask config
campb303 Jun 16, 2021
a7c325f
create resources package
campb303 Jun 16, 2021
a4a669b
Create auth module in api package and add user_is_valid function
campb303 Jun 16, 2021
86ec831
Create login resource
campb303 Jun 16, 2021
b50ce98
Add login resource to api at /api/login
campb303 Jun 16, 2021
146a192
Export app in api package
campb303 Jun 16, 2021
6810fde
Add docstring to parser config
campb303 Jun 16, 2021
544375a
Create RefreshAccessToken resource
campb303 Jun 16, 2021
9b95871
Export RefreshAccessToken from resources
campb303 Jun 16, 2021
a32b46e
Add RefreshAccessToken resource to /api/token/refresh endpoint
campb303 Jun 16, 2021
107828a
Convert item path from string to Path object
campb303 Jun 16, 2021
7e966e9
Create parser errors module and add ItemDoesNotExistError
campb303 Jun 16, 2021
afecc47
Raise ItemDoesNotExistError if Item is not found
campb303 Jun 16, 2021
9e4c10d
Create ItemResource resource
campb303 Jun 16, 2021
48f3795
Export ItemResource from resources
campb303 Jun 16, 2021
90a67cb
Add ItemResource to /api/data/ path
campb303 Jun 16, 2021
10de49f
Import parser.Item as _Item and rename ItemResource to Item
campb303 Jun 16, 2021
f9713fe
Re-enable authentication
campb303 Jun 17, 2021
08748d9
Create QueueDoesNotExistError
campb303 Jun 17, 2021
ab40762
Replace self.__directory with Path object and raise QueueDoesNotExist…
campb303 Jun 17, 2021
ff13266
Change self.__directory to self.path
campb303 Jun 17, 2021
89e3ef1
Rename self._getItems to self.get_items
campb303 Jun 17, 2021
3846d2d
Refactor to snake case
campb303 Jun 17, 2021
daf5b98
Update imports from parser.Queue
campb303 Jun 17, 2021
1469b01
Create Queue resource with error handling
campb303 Jun 17, 2021
7a1c7b8
Export Queue from resources
campb303 Jun 17, 2021
20bdc00
Add Queue resource to /api/data/queue path
campb303 Jun 17, 2021
b8a53e1
Update docstring and rename jsonData/toJson to json_data/to_json
campb303 Jun 17, 2021
1d878b3
Update Queue.to_json reference
campb303 Jun 17, 2021
6dcab81
Refactor params to snake_case and update docstring
campb303 Jun 17, 2021
840931c
Refactor Item module to snake case
campb303 Jun 21, 2021
e85592b
Refactored to snake case
campb303 Jun 21, 2021
c82240c
Create QueueList resource
campb303 Jun 21, 2021
30be281
Export QueueList resource
campb303 Jun 21, 2021
74c7453
Export get_queue_counts for QueueList resource
campb303 Jun 21, 2021
82ac80a
Add QueueList resource to API
campb303 Jun 21, 2021
48a4d17
Delete old modules
campb303 Jun 21, 2021
17e60e7
Remove unnecceary __init__=
campb303 Jun 21, 2021
f8cf5b8
Re-enable authentication for Item in API
campb303 Jun 21, 2021
13a4093
Fix broken reference
campb303 Jun 21, 2021
a171acc
Add docstring format
campb303 Jun 21, 2021
c4e8532
Auto populate Item.json_data
campb303 Jun 21, 2021
b72ae74
Correct mis-spelled parse_eaders to parse_headers and added header on…
campb303 Jun 21, 2021
48318ac
Correct docstring
campb303 Jun 21, 2021
51bddfa
Add headers only loading to Queue
campb303 Jun 21, 2021
fb8b46e
Add headers_only query string parsing to Item resource
campb303 Jun 21, 2021
83be4a2
Add headers_only query string parsing to Queue resource
campb303 Jun 21, 2021
3a87891
Automate generation of json_data in Queue module
campb303 Jun 21, 2021
ef7104d
Re-enable authentication
campb303 Jun 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
# webqueue2-api
# webqueue2 API
A Python based parser and RESTful API for ECN's webqueue.

## Usage
### Install via pip:
```
pip install git+https://github.itap.purdue.edu/ECN/webqueue2-api@<VERSION>#egg=webqueue2-api
```
For example, to install version 0.9.1:
```
pip install git+https://github.itap.purdue.edu/ECN/webqueue2-api@0.9.1#egg=webqueue2-api
```

### Install via requirements file:
```
git+https://github.itap.purdue.edu/ECN/webqueue2-api@<VERSION>#egg=webqueue2-api
```
For example, to install version 0.9.1:
```
git+https://github.itap.purdue.edu/ECN/webqueue2-api@0.9.1#egg=webqueue2-api
```
Empty file removed __init__.py
Empty file.
248 changes: 0 additions & 248 deletions api.py

This file was deleted.

38 changes: 38 additions & 0 deletions docstring-format.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{{! Google Docstring Template }}
{{summaryPlaceholder}}

{{extendedSummaryPlaceholder}}

Example:
[example]

{{#parametersExist}}
Args:
{{#args}}
{{var}} ({{typePlaceholder}}): {{descriptionPlaceholder}}
{{/args}}
{{#kwargs}}
{{var}} ({{typePlaceholder}}, optional): {{descriptionPlaceholder}}. Defaults to {{&default}}.
{{/kwargs}}
{{/parametersExist}}

{{#exceptionsExist}}
Raises:
{{#exceptions}}
{{type}}: {{descriptionPlaceholder}}
{{/exceptions}}
{{/exceptionsExist}}

{{#returnsExist}}
Returns:
{{#returns}}
{{typePlaceholder}}: {{descriptionPlaceholder}}
{{/returns}}
{{/returnsExist}}

{{#yieldsExist}}
Yields:
{{#yields}}
{{typePlaceholder}}: {{descriptionPlaceholder}}
{{/yields}}
{{/yieldsExist}}
Loading