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

187 oc upgrade #192

Merged
merged 16 commits into from
Jul 3, 2024
Merged

187 oc upgrade #192

merged 16 commits into from
Jul 3, 2024

Conversation

ocots
Copy link
Member

@ocots ocots commented Jul 1, 2024

I propose to make the PR since I have updated things for the CI and the documentation.

We will make a new PR followed by a release when the initialisation will be ok:

  • We have to put the code in CTBase.jl instead of CTDirect.jl and update the docstrings.
  • We have to update the tutorial in OptimalControl.jl

Copy link

codecov bot commented Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.66%. Comparing base (a1d04a6) to head (be17d8e).
Report is 31 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #192   +/-   ##
=======================================
  Coverage   91.66%   91.66%           
=======================================
  Files           2        2           
  Lines          12       12           
=======================================
  Hits           11       11           
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ocots
Copy link
Member Author

ocots commented Jul 1, 2024

Project.toml:

name = "OptimalControl"
uuid = "5f98b655-cc9a-415a-b60e-744165666948"
authors = ["Olivier Cots <[email protected]>"]
version = "0.8.2"

[deps]
CTBase = "54762871-cc72-4466-b8e8-f6c8b58076cd"
CTDirect = "790bbbee-bee9-49ee-8912-a9de031322d5"
CTFlows = "1c39547c-7794-42f7-af83-d98194f657c2"
CTProblems = "45d9ea3f-a92f-411f-833f-222dd4fb9cd8"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"

[compat]
CTBase = "0.10"
CTDirect = "0.7"
CTFlows = "0.4"
CTProblems = "0.7"
julia = "1.8"

I don't see it in the "Files changed".

@ocots
Copy link
Member Author

ocots commented Jul 1, 2024

Same for CI.yml

# [.github/workflows/CI.yml]
name: CI
on:
  push:
    branches:
      - main
    tags: '*'
  pull_request:
jobs:
  test:
    name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        version:
          - '1.10'
        os:
          - ubuntu-latest
          #- macOS-latest
          ##- windows-latest
        arch:
          - x64
    steps:
      - uses: actions/checkout@v4
      - uses: julia-actions/setup-julia@latest
        with:
          version: ${{ matrix.version }}
          arch: ${{ matrix.arch }}
      - uses: julia-actions/add-julia-registry@v2
        with:
          key: ${{ secrets.SSH_KEY }}
          registry: control-toolbox/ct-registry
      - uses: julia-actions/julia-runtest@latest
      - uses: julia-actions/julia-uploadcodecov@latest
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

@ocots
Copy link
Member Author

ocots commented Jul 1, 2024

Documentation.yml

# [.github/workflows/Documentation.yml]
name: Documentation

on:
  push:
    branches:
      - main
    tags: '*'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: julia-actions/setup-julia@latest
      - uses: julia-actions/add-julia-registry@v2
        with:
          key: ${{ secrets.SSH_KEY }}
          registry: control-toolbox/ct-registry
      - uses: julia-actions/julia-buildpkg@v1
        with:
          version: '1.10'
      - name: Install dependencies
        run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
      - name: Build and deploy
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
          DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
          GKSwstype: 100 # To make GitHub Action work, disable showing a plot window with the GR backend of the Plots package
        run: julia --project=docs/ docs/make.jl

@ocots
Copy link
Member Author

ocots commented Jul 1, 2024

test/Project.toml

[deps]
CTProblems = "45d9ea3f-a92f-411f-833f-222dd4fb9cd8"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
julia = "1.8"

@ocots
Copy link
Member Author

ocots commented Jul 1, 2024

test/runtests.jl

using OptimalControl
using Test
using LinearAlgebra
using CTProblems
using SciMLBase
using NonlinearSolve
using DifferentialEquations

#
@testset verbose = true showtiming = true "Optimal control tests" begin
    for name  (
        :basic,
        :goddard_direct,
        :goddard_indirect,
        :init,
        )
        @testset "$(name)" begin
            test_name = Symbol(:test_, name)
            println("\nTesting: "*string(name))
            include("$(test_name).jl")
            @eval $test_name()
        end
    end
end

@jbcaillau jbcaillau merged commit 04ee817 into main Jul 3, 2024
1 check passed
@jbcaillau jbcaillau deleted the 187-oc-upgrade branch July 3, 2024 14:43
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.

OptimalControl.jl upgrade: CTBase.jl v0.10, CTFlows.jl v0.4, CTDirect.jl v0.7, CTProblems.jl v0.7
2 participants