Skip to content

Commit

Permalink
fixed attributes, added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
e-duar-do committed Jul 26, 2024
1 parent a269639 commit c790e57
Show file tree
Hide file tree
Showing 23 changed files with 329 additions and 440 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DynOptInterface"
uuid = "6c38235a-427b-4736-80fa-cf75909744ec"
authors = ["Eduardo M. G. Vila <[email protected]> and contributors"]
version = "0.0.0"
version = "0.1.0"

[deps]
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
Expand Down
4 changes: 2 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using DocumenterMermaid
DocMeta.setdocmeta!(DynOptInterface, :DocTestSetup, :(import DynOptInterface as DOI); recursive=true)

const _PAGES = [
#"Home" => "index.md",
"Home" => "index.md",
"API Reference" => [
"Dynamic Functions" => [
"reference/dynamic_functions/abstraction.md",
Expand All @@ -17,9 +17,9 @@ const _PAGES = [
],
"reference/boundary_functions.md",
"reference/nonlinear_support.md",
"reference/attributes.md",
"reference/solutions.md",
],
"Changelog" => "changelog.md",
]

links = InterLinks(
Expand Down
12 changes: 12 additions & 0 deletions docs/src/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```@meta
CurrentModule = DynOptInterface
```

# Changelog

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v0.1.0 (July 26, 2024)

- Initial release
22 changes: 0 additions & 22 deletions docs/src/reference/attributes.md

This file was deleted.

15 changes: 14 additions & 1 deletion docs/src/reference/dynamic_functions/dynamic_variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,21 @@ CurrentModule = DynOptInterface
DynamicVariableIndex
supports_dynamic_variable
UnsupportedDynamicVariable
add_dynamic_variable
AddDynamicVariableNotAllowed
add_dynamic_variable
MOI.is_valid(::MOI.ModelLike, ::DynamicVariableIndex)
InvalidDynamicVariableIndex
```

# Attributes

The [`DynamicVariableIndex`](@ref) object is compatible with the following attributes:
* [`MOI.VariableName`](@extref MathOptInterface.VariableName) with value types `String`
* [`MOI.VariablePrimal`](@extref MathOptInterface.VariablePrimal) with value types [`AbstractDynamicSolution`](@ref)
* [`MOI.VariablePrimalStart`](@extref MathOptInterface.VariablePrimalStart) with value types [`AbstractDynamicSolution`](@ref)

```@docs
MOI.supports(::MOI.ModelLike, ::MOI.AbstractVariableAttribute, ::Type{DynamicVariableIndex})
MOI.set(::MOI.ModelLike, ::MOI.AbstractVariableAttribute, ::DynamicVariableIndex, ::Any)
MOI.get(::MOI.ModelLike, ::MOI.AbstractVariableAttribute, ::DynamicVariableIndex)
```
6 changes: 3 additions & 3 deletions docs/src/reference/dynamic_functions/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ LinearDynamicTerm
LinearDynamicFunction
```

## Squared
## Pure Quadratic
```@docs
SquaredDynamicTerm
SquaredDynamicFunction
PureQuadraticDynamicTerm
PureQuadraticDynamicFunction
```

## Nonlinear
Expand Down
13 changes: 13 additions & 0 deletions docs/src/reference/dynamic_functions/phases.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,17 @@ AddPhaseNotAllowed
add_phase
MOI.is_valid(::MOI.ModelLike, ::PhaseIndex)
InvalidPhaseIndex
```

# Attributes

The [`PhaseIndex`](@ref) object is compatible with the following attributes:
* [`MOI.VariableName`](@extref MathOptInterface.VariableName) with value types `String`
* [`MOI.VariablePrimal`](@extref MathOptInterface.VariablePrimal) with value types `Tuple{<:Real,<:Real}`
* [`MOI.VariablePrimalStart`](@extref MathOptInterface.VariablePrimalStart) with value types `Tuple{<:Real,<:Real}`

```@docs
MOI.supports(::MOI.ModelLike, ::MOI.AbstractVariableAttribute, ::Type{PhaseIndex})
MOI.set(::MOI.ModelLike, ::MOI.AbstractVariableAttribute, ::PhaseIndex, ::Any)
MOI.get(::MOI.ModelLike, ::MOI.AbstractVariableAttribute, ::PhaseIndex)
```
2 changes: 0 additions & 2 deletions src/DynOptInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ include("boundary_functions.jl")

include("nonlinear_support.jl")

include("attributes.jl")

include("solutions.jl")

end
257 changes: 0 additions & 257 deletions src/attributes.jl

This file was deleted.

Loading

2 comments on commit c790e57

@e-duar-do
Copy link
Member 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/111841

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.1.0 -m "<description of version>" c790e5761d89fc768a100999ade8b0f340201a7f
git push origin v0.1.0

Please sign in to comment.