Skip to content

Commit

Permalink
SolverTools refactor leaving only the core
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsiqueira committed Mar 24, 2021
1 parent 58f739f commit 770acc9
Show file tree
Hide file tree
Showing 26 changed files with 137 additions and 836 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/CommentPR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Ref: https://securitylab.github.com/research/github-actions-preventing-pwn-requests
name: Comment on the pull request

# read-write repo token
# access to secrets
on:
workflow_run:
workflows: ["Breakage"]
types:
- completed

jobs:
upload:
runs-on: ubuntu-latest
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: 'Download artifact'
uses: actions/[email protected]
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr"
})[0];
var download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
- run: unzip pr.zip

- name: 'Comment on PR'
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
var fs = require('fs');
var issue_number = Number(fs.readFileSync('./NR'));
var msg = fs.readFileSync('./MSG', 'utf8');
await github.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: msg
});
6 changes: 3 additions & 3 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"description": "Tools for developing nonlinear optimization solvers in Julia",
"title": "SolverTools.jl",
"description": "Core Definitions for Developing Nonlinear Optimization Solvers",
"title": "SolverCore.jl",
"upload_type": "software",
"license": "MPL-2.0",
"creators": [
Expand All @@ -17,7 +17,7 @@
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/JuliaSmoothOptimizers/SolverTools.jl/releases/latest",
"identifier": "https://github.com/JuliaSmoothOptimizers/SolverCore.jl/releases/latest",
"relation": "isSupplementTo"
}
],
Expand Down
12 changes: 6 additions & 6 deletions CITATION.bib
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@Misc{orban-siqueira-solvertools-2020,
@Misc{orban-siqueira-solvercore-2021,
author = {D. Orban and A. S. Siqueira and {contributors}},
title = {{SolverTools.jl}: Tools for Developing Nonlinear Optimization Solvers},
month = {December},
howpublished = {\url{https://github.com/JuliaSmoothOptimizers/SolverTools.jl}},
year = {2020},
DOI = {10.5281/zenodo.3937408}
title = {{SolverCore.jl}: Core Definitions for Developing Nonlinear Optimization Solvers},
month = {March},
howpublished = {\url{https://github.com/JuliaSmoothOptimizers/SolverCore.jl}},
year = {2021},
DOI = {---}
}
17 changes: 5 additions & 12 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
name = "SolverTools"
uuid = "b5612192-2639-5dc1-abfe-fbedd65fab29"
version = "0.4.0"
name = "SolverCore"
uuid = "ff4d7338-4cf1-434d-91df-b86cb86fb843"
version = "0.1.0"

[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LinearOperators = "5c8ed15e-5a4c-59e4-a42b-c7e8811fb125"
NLPModels = "a4795742-8479-5a88-8948-cc11e1c8c1a6"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[compat]
DataFrames = "^0.20, 0.21, 0.22"
JLD2 = "0.1.12, 0.2, 0.3, 0.4"
LinearOperators = "0.4.0, 0.5.0, 0.6.0, 0.7.0, 1.0"
NLPModels = "0.14"
julia = "^1.3.0"

[extras]
ADNLPModels = "54578032-b7ea-4c30-94aa-7cbd1cce6c9a"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
NLPModels = "a4795742-8479-5a88-8948-cc11e1c8c1a6"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["ADNLPModels", "Logging", "NLPModels", "Test"]
test = ["ADNLPModels", "LinearAlgebra", "Logging", "Test"]
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# SolverTools
# SolverCore

![CI](https://github.com/JuliaSmoothOptimizers/SolverTools.jl/workflows/CI/badge.svg?branch=master)
[![Build Status](https://api.cirrus-ci.com/github/JuliaSmoothOptimizers/SolverTools.jl.svg)](https://cirrus-ci.com/github/JuliaSmoothOptimizers/SolverTools.jl)
[![](https://img.shields.io/badge/docs-stable-3f51b5.svg)](https://JuliaSmoothOptimizers.github.io/SolverTools.jl/stable)
[![codecov](https://codecov.io/gh/JuliaSmoothOptimizers/SolverTools.jl/branch/master/graph/badge.svg?token=KEKgV7oF2t)](https://codecov.io/gh/JuliaSmoothOptimizers/SolverTools.jl)
[![DOI](https://zenodo.org/badge/54757404.svg)](https://zenodo.org/badge/latestdoi/54757404)
[![DOI](https://zenodo.org/badge/---.svg)](https://zenodo.org/badge/---)
![CI](https://github.com/JuliaSmoothOptimizers/SolverCore.jl/workflows/CI/badge.svg?branch=master)
[![Build Status](https://api.cirrus-ci.com/github/JuliaSmoothOptimizers/SolverCore.jl.svg)](https://cirrus-ci.com/github/JuliaSmoothOptimizers/SolverCore.jl)
[![](https://img.shields.io/badge/docs-stable-3f51b5.svg)](https://JuliaSmoothOptimizers.github.io/SolverCore.jl/stable)
[![](https://img.shields.io/badge/docs-lattest-3f51b5.svg)](https://JuliaSmoothOptimizers.github.io/SolverCore.jl/dev)
[![codecov](https://codecov.io/gh/JuliaSmoothOptimizers/SolverCore.jl/branch/master/graph/badge.svg?token=KEKgV7oF2t)](https://codecov.io/gh/JuliaSmoothOptimizers/SolverCore.jl)

A framework to build novel optimization algorithms in Julia.
Core package to build novel optimization algorithms in Julia.

Please cite this repository if you use SolverTools.jl in your work: see [`CITATION.bib`](https://github.com/JuliaSmoothOptimizers/SolverTools.jl/blob/master/CITATION.bib).
Please cite this repository if you use SolverCore.jl in your work: see [`CITATION.bib`](https://github.com/JuliaSmoothOptimizers/SolverCore.jl/blob/master/CITATION.bib).

# Installation

```
add SolverTools
add SolverCore
```
8 changes: 4 additions & 4 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
using Documenter, SolverTools
using Documenter, SolverCore

makedocs(
modules = [SolverTools],
modules = [SolverCore],
doctest = true,
linkcheck = true,
strict = true,
format = Documenter.HTML(assets = ["assets/style.css"], prettyurls = get(ENV, "CI", nothing) == "true"),
sitename = "SolverTools.jl",
sitename = "SolverCore.jl",
pages = ["Home" => "index.md",
"API" => "api.md",
"Reference" => "reference.md",
]
)

deploydocs(
repo = "github.com/JuliaSmoothOptimizers/SolverTools.jl.git",
repo = "github.com/JuliaSmoothOptimizers/SolverCore.jl.git",
push_preview = true,
devbranch = "master"
)
36 changes: 1 addition & 35 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,11 @@
```@contents
Pages = ["api.md"]
```
## Auxiliary
## Logging

```@docs
active
breakpoints
compute_Hs_slope_qs!
log_header
log_row
project!
project_step!
```

## Line-Search

```@docs
LineModel
obj
grad
grad!
objgrad
objgrad!
hess
redirect!
armijo_wolfe
```

## Stats
Expand All @@ -35,18 +16,3 @@ armijo_wolfe
GenericExecutionStats
show_statuses
```

## Trust-Region

```@docs
TrustRegionException
SolverTools.AbstractTrustRegion
aredpred
acceptable
reset!
get_property
set_property!
update!
TrustRegion
TRONTrustRegion
```
5 changes: 2 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# [SolverTools.jl documentation](@id Home)

This package provides tools for developing nonlinear optimization solvers.
# [SolverCore.jl documentation](@id Home)

Core package to build novel optimization algorithms in Julia.
12 changes: 12 additions & 0 deletions src/SolverCore.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module SolverCore

# stdlib
using Printf

# our packages
using NLPModels

include("logger.jl")
include("stats.jl")

end
22 changes: 0 additions & 22 deletions src/SolverTools.jl

This file was deleted.

29 changes: 0 additions & 29 deletions src/auxiliary/blas.jl

This file was deleted.

98 changes: 0 additions & 98 deletions src/auxiliary/bounds.jl

This file was deleted.

Loading

2 comments on commit 770acc9

@abelsiqueira
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 register()

@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/32681

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>" 770acc97bddea45964f7b17a9b104024483a15d3
git push origin v0.1.0

Please sign in to comment.