Skip to content

Commit

Permalink
@dynamicstruct and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
nsiccha committed Dec 19, 2024
1 parent 7e6f695 commit 5f11058
Show file tree
Hide file tree
Showing 14 changed files with 125 additions and 2,304 deletions.
64 changes: 0 additions & 64 deletions .github/workflows/CI.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DynamicObjects"
uuid = "23d02862-63fe-4c6e-8fdb-1d52cbbd39d5"
authors = ["Nikolas Siccha <nikolassiccha@gmail.com> and contributors"]
version = "0.1.7"
version = "0.2.0"

[deps]
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
Expand Down
26 changes: 2 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,4 @@
# DynamicObjects.jl

Implements a dynamic object type which can be redefined with convenient/confusing `.`-syntax and caching.

See [https://nsiccha.github.io/examples/DynamicObjects.jl/](https://nsiccha.github.io/examples/DynamicObjects.jl/) for examples.

```julia
using DynamicObjects

"""
A fancy rectangle.
"""
@dynamic_object Rectangle height width
area(what::Rectangle) = what.height * what.width

rect = Rectangle(10, 20)
println("A $(rect) has an area of $(rect.area).")
```

```
A Rectangle(height = 10, width = 20) has an area of 200.
```

## To add/fix:

* Defining a single argument type without a type on that argument (e.g. `@dynamic_object Circle radius`)
Provides an `@dynamicstruct` macro, allowing quickly defining structs with cached properties.
See [https://nsiccha.github.io/DynamicObjects.jl](https://nsiccha.github.io/DynamicObjects.jl) for a non-minimal example.
1 change: 0 additions & 1 deletion examples/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions examples/_freeze/index/execute-results/html.json

This file was deleted.

7 changes: 0 additions & 7 deletions examples/_freeze/site_libs/clipboard/clipboard.min.js

This file was deleted.

12 changes: 0 additions & 12 deletions examples/_quarto.yml

This file was deleted.

Binary file not shown.
Binary file not shown.
57 changes: 0 additions & 57 deletions examples/index.qmd

This file was deleted.

Loading

4 comments on commit 5f11058

@nsiccha
Copy link
Owner Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/121653

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.0 -m "<description of version>" 5f1105808115f6d8c367a17cdc97d885c537a301
git push origin v0.2.0

@nsiccha
Copy link
Owner Author

Choose a reason for hiding this comment

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

@JuliaRegistrator register

Release notes:

Breaking changes

  • Removed everything that came before
  • added @dynamicstruct macro

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request updated: JuliaRegistries/General/121653

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.0 -m "<description of version>" 5f1105808115f6d8c367a17cdc97d885c537a301
git push origin v0.2.0

Please sign in to comment.