Skip to content

Releases: fedi-libs/apmodel

0.5.2

31 Dec 09:55
9a0fe48

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.5.1...0.5.2

0.5.1

23 Dec 07:46
9a9c00f

Choose a tag to compare

What's Changed

  • feat(actor): Add key retrieval functionality to Actor class by @AmaseCocoa in #16

Full Changelog: 0.5.0...0.5.1

0.5.0 - next

23 Dec 05:14
26f40ca

Choose a tag to compare

apmodel 0.5.0 ("Next")

This release introduces a major migration to Pydantic, enhancing data validation and serialization. It also includes several new features, bug fixes, and significant improvements to the testing framework and documentation.

💥 Breaking Changes

  • The underlying model implementation has been migrated from dataclasses to Pydantic. This is a significant change that may affect how models are instantiated and manipulated. Please
    review the documentation for details on the new Pydantic-based models.

✨ Features

  • Pydantic Integration: All models are now based on Pydantic, providing robust data validation, serialization, and type hinting.
  • Actor Endpoints: Added endpoints field to the Actor model to store a dictionary of endpoint URLs (e.g., proxyUrl, oauthTokenEndpoint).
  • Likes and Shares: The base Object model now includes likes and shares fields, allowing for easy access to these common collections.
  • LitePub Support: Added support for the EmojiReact object from the LitePub vocabulary.
  • to_dict() Method: A new to_dict() method has been added to models for easy conversion to a dictionary.
  • Performance Improvements:
    • Implemented lazy loading for the ModelRegistry to improve initial import times.
    • Core models are now preloaded for faster resolution.

🐛 Bug Fixes

  • JSON-LD Context: The @context is now always serialized as a list to improve compatibility.
  • Multibase Encoding: Fixed an issue with public key encoding format to use PKCS#8.
  • Collection Handling: Correctly load OrderedCollectionPage and its items.
  • Numerous type annotation fixes to improve static analysis and developer experience.

🧪 Testing

  • Increased Coverage: Expanded test coverage, especially for model properties and serialization.
  • Real-World Data: Added new tests using real-world data from Akkoma, Mastodon, and Misskey to ensure compatibility.
  • Registry Tests: Implemented comprehensive tests for the ModelRegistry.

📚 Documentation

  • New Documentation Site: A new documentation site has been created with mkdocs.
  • Updated README: The project's README.md has been overhauled with more detailed information.
  • API Documentation: Added detailed API documentation for models, functions, and the registry.

⚙️ Internal

  • Developer Environment:
    • Introduced pre-commit hooks to automate dependency synchronization and code analysis with pyrefly.
    • CI workflows have been updated and improved.

0.4.5

28 Nov 07:18
97021e6

Choose a tag to compare

0.4.4

04 Oct 00:01

Choose a tag to compare

🐛 Bug Fixes

  • (text) Assert with str
  • Object compression should be performed after conversion to dict
  • Mastodon not provide type field of publicKey
  • Remove CryptographicKey from legacy loader list

0.4.3

14 Sep 16:53
1dd20a1

Choose a tag to compare

Full Changelog: 0.4.2...0.4.3

0.4.2

12 Sep 18:18
265db7f

Choose a tag to compare

fix: re re fix: #2

to me: 2回ともForce Pushで消失してたぞ

0.4.1

12 Sep 16:07

Choose a tag to compare

🚀 Features

  • (actor) Add extension field
  • Auto convert to LDContext
  • Auto convert actor/object to id

🐛 Bug Fixes

  • Set SETUPTOOLS_SCM_PRETEND_VERSION env variable
  • Add assertionMethod to dynamic_context
  • Don't use Undefined for assertionMethod field
  • Remove Union from assertionMethod

Full Changelog: 0.4.0...0.4.1

0.4.0

02 Sep 10:06

Choose a tag to compare

🚀 Features

  • Implement core models
  • Add test
  • Nodeinfo parser
  • Extra models
  • Context parser
  • Hashtag type
  • Automatically add the URL to the context based on the value
  • LCContext test
  • Test cid
  • Enforce keyword-only arguments for NodeinfoServices
  • Add support for extra types
  • Ruff rule
  • Autochange version with vcs

🐛 Bug Fixes

  • Setup uv before setup python
  • Incorrect Link values
  • Type hint
  • Fix the code error causing the TypeError and use ctx.full_context instead of ctx.json.
  • Use rmdir in windows
  • Changes from gemini code assist's suggestions
  • Check if the expected keys are a subset of the data's keys
  • (actor) Resolve side effects and context handling in Actor.to_json
  • (link) Fix context aggregation in Link.to_json
  • (question) Prevent side effects in Question.to_json
  • (tombstone) Prevent side effects in Tombstone.to_json
  • Use ctx.full_context instead of ctx.json
  • Initialize aggregated_context as a new LDContext instance, copied from self._context
  • Use PrivateFormat.PKCS1 instead of PrivateFormat.Raw in rsa-priv
  • (cid) Handle 'Z' timezone in DataIntegrityProof
  • Fixes for violation of the Liskov Substitution Principle
  • Use is instead of isinstance
  • Use InvalidField instead of Exception
  • (cid) Import InvalidField from exceptions.py
  • (cid) Remove type: ignore
  • Replace +00:00 with Z
  • Use fromisoformat
  • Include timezone information
  • Use InvalidField instead of Exception
  • Use InvalidField instead of Exception
  • Use InvalidField instead of Exception
  • Add Z in text end
  • (ci) Set checkout branch
  • (ci) Run in release branch

🚜 Refactor

  • (loader) Refactor Nodeinfo detection logic
  • Centralize JSON serialization logic
  • (cid) Use central serializer for CID models
  • Remove unused imports
  • Remove whitespace in init.py
  • Remove whitespace in init.py

⚙️ Miscellaneous Tasks

  • Use context parser
  • Context parser
  • Context parser
  • Styleguide
  • Instructions for code review (likely, gemini code assist).
  • Edit style guide
  • Ignore git_commit_msg_tmp.txt
  • Add classifiers
  • Add dataclass decorator in ActivityPubModel
  • Add styleguide
  • Changelog auto generate
  • Update changelog [skip ci]
  • Update changelog [skip ci]

0.3.1

16 Mar 13:10
1b2d349

Choose a tag to compare

What's new

  • feat: Activity.accept() can now generate an Accept activity for the activity and Activity.reject() can generate a Reject activity for the activity

Full Changelog: AmaseCocoa/apmodel@0.2.4...0.3.1