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

Update docs #88

Merged
merged 12 commits into from
Mar 25, 2024
Merged

Update docs #88

merged 12 commits into from
Mar 25, 2024

Conversation

charlottekostelic
Copy link
Contributor

@charlottekostelic charlottekostelic commented Mar 21, 2024

Changed:

  • changed Retry args in MetadataSession and WorldcatSession to camel case (all args should now be in camel case per Camel case in methods' arguments #17)
  • updated links to OCLC documentation/website per Update OCLC links #57
  • split index.md into multiple files to allow for multiple pages on https://bookops-cat.github.io/bookops-worldcat (new pages listed below)
  • theme of docs: readthedocs > material
  • typos in multiple files (I added the Code Spell Checker extension in VS Code which identified a bunch of typos)
  • target-version for black in pyproject.toml

Added:

  • bytes and BytesIO as types for MetadataSession methods that send MARC record in request body
  • mkdocs-material as dev-dependency
  • extra.css to customize theme with NYPL colors
  • Separate pages in documentation for different functionality:
    • Get Started (start.md)
    • Search WorldCat (search.md)
    • Manage Bibliographic Records (manage_bibs.md)
    • Manage Institution Holdings (manage_holdings.md)
    • Search and Manage Local Data (local.md)
    • Advanced Usage (advanced.md)
  • Draft contribution guidelines per Add contribution guidelines/instructions #86 (contributing.md, there's still more to add here in a future PR)
  • how to add RegistryID as context in WorldcatAccessToken per Required RegistryID in scopes context (API 2.0 - releases/v1.0.0) #83 (this is in the Advanced Usage > WorldcatAccessToken section)
  • 1.0 to changelog
  • sections in README and docs on changes in version 1.0
  • py.typed file and updated pyproject.toml

Removed:

  • content from tutorials.md. The page is there as a placeholder and I will update it in a future PR.

Copy link
Member

@klinga klinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@charlottekostelic You took the documentation to entirely another level 👏
I'm looking forward to seeing these published and in action. I see a lot of mkdocs-material markdown syntax that I'm super curious to experience.
Have only a minor suggestions/questions.

<Response [200]>
>>> print(result.json())
with MetadataSession(authorization=token) as session:
response = session.brief_bibs_search(q="ti:The Power Broker AND au: Caro, Robert")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting choice for a query 🚚 🚛 🚗 🚕 🚚 ...

README.md Show resolved Hide resolved
@@ -152,7 +152,7 @@ def _url_search_lbd(self) -> str:

def bib_create(
self,
record: str,
record: Union[str, bytes, BinaryIO],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were you able to confirm utf-8 encoded str that includes diacritical marks works with the API?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bib_match and bib_validate work when passed a str but I still haven't tested bib_create or bib_replace.

BookOps-Worldcat was glued together by [Tomasz Kalata](mailto:klingaroo@gmail.com) and [Charlotte Kostelic](mailto:charlottekostelic@gmail.com) with contributions by [Miriam Gloger]().
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we ask Miriam for her email?

@@ -337,7 +337,7 @@ def bib_match(
def bib_replace(
self,
oclcNumber: Union[int, str],
record: str,
record: Union[str, bytes, BinaryIO],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

docs/advanced.md Outdated Show resolved Hide resolved
docs/contributing.md Show resolved Hide resolved
docs/index.md Outdated Show resolved Hide resolved
docs/index.md Show resolved Hide resolved
docs/search.md Show resolved Hide resolved
@charlottekostelic charlottekostelic merged commit fe797d5 into releases/v1.0.0 Mar 25, 2024
6 checks passed
@charlottekostelic charlottekostelic deleted the update-docs branch March 25, 2024 19:28
charlottekostelic added a commit that referenced this pull request Mar 26, 2024
* move cov & pytest config to pyproject.toml

* remove temp file

* remove pytest-recording

* add py311

* dependencies updates

* drop py3.7

* copy main config

* drop py3.7

* add requests to dev dependencies

* fix missing dependencies

* dependencies final update

* version bump to 1.0.0

* adds all dependencies

* add py3.12

* typing cleanup & tests refactoring

* Authentication updates (#69)

* ingnore E501 in tests

* add types-requests to dev dependencies

* scopes as str

* scopes as str & types cleanup

* dev dependencies moved to tool.poetry.group.dev.dependencies section

* token_expires_at as datetime obj

* token_expires_at as datetime

* changed utcnow to now(timezone.utc) (#71)

* Ocn-parsing-refactor (#72)

* prep_oclc_numbe_strr refactor

* oclcNumber stripped

* verification refactor

* utc fixes (#73)

* fixed datetime type errors

* moved datetime edits to _hasten_expiration_time

* Errors-refactor (#74)

* removed WorldcatSessionError

* incorrect AttributeError replaced with TypeError

* replaces WorldcatAuthorizationError with TypeError and ValueError for configuration

* removed unused WorldcatAuthorizationError import

* removed unused WorldcatRequestError import

* added safe decoding for bytes-str

* ignore F401

* None type added to possible timeout types

* added type ingnore

* removed unused InvalidOclcNumber import & typing fixes

* changed endpoints in metadata api 2.0 (#77)

* changed endpoints in metadata api 2.0

* fixed tests with typos

* changed response_format default in get_full_bib

* Changed search endpoints (#78)

* changed search endpoints in metadata api 2.0

* fixed types

* fixed spacing and indentation

* type hint fixes and refactored test

* Removed principalID and principalIDNS from token requests (#79)

* removed unnecessary params from token requests

* fixed docstring

* MetadataSession cleanup (#80)

* reordered methods in MetadataSession

* removed obsolete 409 error handling from query.py

* simplified changes

* added new api endpoints (#81)

* added new api endpoints

* added tests

* added test

* added to doc string, fixed typos (#82)

@charlottekostelic This is something that should be brought to users attention in the documentation. Will create an issue as a reminder.
Besides that, looks good. Thanks!

* Query updates (#84)

* work in progress

* added retries to query

* removed test with stale token

* added stale token test back in

* added stale token test back in

* moved retries to _session module, added tests

* added retry status_forcelist tests

* added custom adapter test

* changed default retry behavior

* added another test

* more testing

* Reordered metadata methods (#85)

* renamed/reordered metadata_api methods

* fixed optional/required args, added to doc strings

* fixed default values to match API defaults

* fixed error in live test

* dev status update to 5, removes py3.7 & adds py3.11 & py3.12 (#87)

* Update docs (#88)

* reorganized docs, added mkdocs-material theme

* added css for NYPL colors

* reorganized docs, added examples

* changed structure of docs, added to docs

* changed snake case to camel case in args

* typo fixes

* added contributing.md, python versions for black

* added 1.0 to changelog, migration section in docs

* Added migration section to README

* typo fixes, link fixes

* added py.typed file

* fixed links, made edits per PR 88

* added mkdocstrings, removed mkapi, doc edits (#91)

* edited changelog

* pyproject.toml edits

* update unit-tests.yaml

* fixed unit-tests.yaml

* unit-tests.yaml indentation issues

---------

Co-authored-by: klinga <klingaroo@gmail.com>
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.

2 participants