Skip to content

Commit 87202d3

Browse files
committed
many more minor changes and version bump
1 parent 62b072e commit 87202d3

File tree

5 files changed

+31
-4
lines changed

5 files changed

+31
-4
lines changed

CHANGELOG.MD

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,15 @@ All notable changes to this project will be documented in this file.
5252
## v1.2.1 - 17/1/2023
5353

5454
### Fixed
55-
- SQL syntax error
55+
- SQL syntax error
56+
57+
## 1.3.0 - 07/6/2023
58+
59+
### Added
60+
- Dynamic categories support
61+
62+
### Removed
63+
- `cached` option in latest circular
64+
65+
### Improved
66+
- `CircularChecker` class now returns a sorted dict of new circulars

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 BPS Circular API
3+
Copyright (c) 2023 BPS Circular API
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.MD

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,21 @@ This package also features a well maintained and tried and tested circular-check
2121
pip install pybpsapi
2222
```
2323

24+
## Building
25+
26+
To build the package, you can use the following command:
27+
28+
```bash
29+
py -m build
30+
```
31+
32+
And to upload,
33+
34+
```bash
35+
py -m twine upload dist/*
36+
```
37+
38+
2439
## Contributing
2540

2641
Contributions are welcome! Please feel free to open an issue or a pull request on the [GitHub repository](https://bpsapi.rajtech.me/r/python-package)

pybpsapi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ def check(self) -> list[dict] or list[None]:
246246

247247
if final_dict != old_cached: # If the old and new dict are not the same
248248
new_circular_objects = [i for i in final_dict if i not in old_cached]
249-
# print(f"{len(new_circular_objects)} new circular(s) found")
250249

251250
for circular in new_circular_objects:
252251
# check if they are in the database
@@ -255,6 +254,8 @@ def check(self) -> list[dict] or list[None]:
255254

256255
return_dict.append(circular)
257256

257+
# sort the return_dict by circular id in ascending order
258+
return_dict.sort(key=lambda x: x['circular_id'])
258259
return return_dict
259260

260261
else:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pybpsapi"
3-
version = "1.2.1"
3+
version = "1.3.0"
44
description = "This package is a Python wrapper for the BPS API. It supports all the five endpoints of the API, and also contains a good circular-checking system."
55
author = "Raj Dave"
66
author-email = "[email protected]"

0 commit comments

Comments
 (0)