Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #276

Closed
wants to merge 277 commits into from
Closed

Develop #276

wants to merge 277 commits into from

Conversation

nh916
Copy link
Contributor

@nh916 nh916 commented Aug 17, 2023

Description

Changes

Tests

Known Issues

Notes

Checklist

  • My name is on the list of contributors (CONTRIBUTORS.md) in the pull request source branch.
  • I have updated the documentation to reflect my changes.

nh916 and others added 28 commits August 22, 2023 11:36
* refactored all of SDK to use `identifier` instead of `identifiers`

* updated documentation and code examples to use `identifier`
* updated tests to use `identifier`
  * all tests are passing

* removed unneeded test for test_file.py

* fixed broken vocab links within documentation

* fixed broken vocab links within documentation

* formatted with black
A little small section that CRIPT only works in USA, so users are aware
* upgraded mypy, found errors, fixed errors

* formatted with black
* upgraded documentation with many search examples

and changed `value_to_search` from `Union[None, str]` to `Optional[str],`

* added `BIG_SMILES` to `SearchModes` and added documentation

* wrote `test_api_search_bigsmiles`

* added `"BCDB"` to .cspell.json

* feature: search by bigsmiles and test for it are done!

* changing `BIG_SMILES` to `BIGSMILES`

* formatted with black
* Catching and identifying the situations where a duplicate Name is the issue in a save

* introduce an inherent Error for duplicated names

* upgrading reliability and no reference to namespaces anymore.
* fixed `_API_TIMEOUT` circular import error

* formatted with black

* added type hinting to `_API_TIMEOUT`
* fixed SearchMode from `BIG_SMILES` to `BIGSMILES`
  * after refactoring this was left out, but it is now tested and working
* changed timeout from `25` to `90`
  * I think it might still be too small
* formatted file.py attributes table

* updated attributes table for file

added notes
…tting any SearchModes (#305)

Gave some more context as to what could be happening for the user and helping the user report it to us.

Using else instead of an `if` to catch all cases not caught by the `if`
…on (#303)

* added `name` to file node docs attributes table

* updated file docs JSON representation
lowering coverage CI because it does not account for integration tests
* upgrade paginator.py error handling for response JSON conversion

* added new variable for JSON response `api_response`

added comments explaining the error handling

* formatted with trunk
* started working on delete

* wrote basic delete method
  * not tested yet
* wrote basic refresh
  * not tested yet
* wrote test for refresh
  * but not finished yet

* setup `_set_logger` method for `cript.API`

* added `Notes` to delete docstrings

* refactored `logger` and `verbose`

* removed unused imports and formatted with black

* ignoring mypy error

mypy says that the `logger: logging.Logger = None` this cannot be None because you said it should be `logging.Logger` but before it is initialized it would be None.

Don't want to type it as `Optional` because it should always exist and it is not Optional, so just ignoring the error for now.

* formatting with black and removing unused imports

* removing `cript.API.refresh()` method for now

will add in later if needed

* format with trunk

* changed logging format of `cript.API.delete`

* changed the error for paginator from generic `Exception` to `APIError`

* wrote `DELETE` for test_project.py

* wrote out logic for `integrate_delete_node_helper`

* wrote out logic and docstrings for `integrate_delete_node_helper`
* wrote notes for future upgrades
* ready to write tests for every node

* updated `test_project.py` comment

* added type hinting to paginator.py `response`

* wrote out `delete_integration_node_helper`

* wrote out full test function for `delete_integration_node_helper` in integration_test_helper.py
* cleaned up test_project.py test code

> wrote a small snippet for my printing JSON preference

* updated comments

* updated `test_integration_collection`

* wrote Delete integration test for collection

* wrote Delete integration test for experiment

* wrote Delete integration test for process

* wrote Delete integration test for computation

* fixed `delete integration function` imports for tests since it is not a package

* wrote Delete integration test for data

* wrote Delete integration test for inventory

* wrote Delete integration test for file

* wrote Delete integration test for algorithm

* updated docstrings for clarity in `delete_integration_node_helper`

* wrote Delete integration test for citation

passing successfully!

* wrote Delete integration test for condition

passing successfully!

* wrote Delete integration test for equipment

passing successfully!

* wrote Delete integration test for ingredient

passing successfully!

* wrote Delete integration test for parameter

passing successfully!

* wrote Delete integration test for quantity

passing successfully!

* wrote Delete integration test for Software

passing successfully!

* wrote Delete integration test for Software

passing successfully!

* wrote Delete integration test for Software

passing successfully!

* wrote Delete integration test for Reference

passing successfully!

* upgraded/refactored `APIError`

* `APIError` did not have as much information and was unhelpful in debugging
    * gave it more information and made it much more helpful for users to read and for us to debug

* bug fix: changed delete URL to `node_type_snake_case` instead of node_type

* `node_type` was not working for `Computational_Forcefield` because API Endpoint expected snake_case

* wrote and successfully passing computational_forcefield DELETE

* wrote and successfully passing `computational_process` DELETE

* upgraded paginator errors

* wrote DELETE tests for `material`, `project`, `property`

API is having trouble with them

* fixed mypy static typing errors

* formatted with black

* removed unused import

* formatted with trunk

* formatted with trunk

* fixed imports with isort

* formatted with trunk

* working on fixing CI issues

* optimizing imports

* upgraded documentation for `cript.API.delete()`

* trunk fmt

* updated `cript.API.delete()` documentation

* updated host documentation in `cript.API`

* upgraded documentation for `cript.API.verobose`

added example code and example log

* fixed `BIGSMILES` search test

* removed `Navid log style` from integration_test_helper.py

added comments to code for clarity

* formatted with trunk

* importing `Optional` to cript/api/exceptions.py

* formatted with trunk

* added `timeout` to `requests.delete()`

* fixed import error

* formatted with trunk

* making trunk happy

---------

Co-authored-by: Ludwig Schneider <[email protected]>
* upgraded error for `get_vocab_by_category()`

* formatted with trunk
…figuration-test

Updated delete `software_configuration` integration test to expect deletion and not an API error
fixed test_computational_forcefield.py file name typo
upgraded packages in `requirements.txt` and `setup.cfg`
@nh916
Copy link
Contributor Author

nh916 commented Sep 1, 2023

closing this in favor of new PR for a new release of v2.1.0

@nh916 nh916 closed this Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants