Skip to content

Commit 770acc9

Browse files
committed
SolverTools refactor leaving only the core
1 parent 58f739f commit 770acc9

26 files changed

+137
-836
lines changed

.github/workflows/CommentPR.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Ref: https://securitylab.github.com/research/github-actions-preventing-pwn-requests
2+
name: Comment on the pull request
3+
4+
# read-write repo token
5+
# access to secrets
6+
on:
7+
workflow_run:
8+
workflows: ["Breakage"]
9+
types:
10+
- completed
11+
12+
jobs:
13+
upload:
14+
runs-on: ubuntu-latest
15+
if: >
16+
${{ github.event.workflow_run.event == 'pull_request' &&
17+
github.event.workflow_run.conclusion == 'success' }}
18+
steps:
19+
- name: 'Download artifact'
20+
uses: actions/[email protected]
21+
with:
22+
script: |
23+
var artifacts = await github.actions.listWorkflowRunArtifacts({
24+
owner: context.repo.owner,
25+
repo: context.repo.repo,
26+
run_id: ${{github.event.workflow_run.id }},
27+
});
28+
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
29+
return artifact.name == "pr"
30+
})[0];
31+
var download = await github.actions.downloadArtifact({
32+
owner: context.repo.owner,
33+
repo: context.repo.repo,
34+
artifact_id: matchArtifact.id,
35+
archive_format: 'zip',
36+
});
37+
var fs = require('fs');
38+
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
39+
- run: unzip pr.zip
40+
41+
- name: 'Comment on PR'
42+
uses: actions/github-script@v3
43+
with:
44+
github-token: ${{ secrets.GITHUB_TOKEN }}
45+
script: |
46+
var fs = require('fs');
47+
var issue_number = Number(fs.readFileSync('./NR'));
48+
var msg = fs.readFileSync('./MSG', 'utf8');
49+
await github.issues.createComment({
50+
owner: context.repo.owner,
51+
repo: context.repo.repo,
52+
issue_number: issue_number,
53+
body: msg
54+
});

.zenodo.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"description": "Tools for developing nonlinear optimization solvers in Julia",
3-
"title": "SolverTools.jl",
2+
"description": "Core Definitions for Developing Nonlinear Optimization Solvers",
3+
"title": "SolverCore.jl",
44
"upload_type": "software",
55
"license": "MPL-2.0",
66
"creators": [
@@ -17,7 +17,7 @@
1717
"related_identifiers": [
1818
{
1919
"scheme": "url",
20-
"identifier": "https://github.com/JuliaSmoothOptimizers/SolverTools.jl/releases/latest",
20+
"identifier": "https://github.com/JuliaSmoothOptimizers/SolverCore.jl/releases/latest",
2121
"relation": "isSupplementTo"
2222
}
2323
],

CITATION.bib

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
@Misc{orban-siqueira-solvertools-2020,
1+
@Misc{orban-siqueira-solvercore-2021,
22
author = {D. Orban and A. S. Siqueira and {contributors}},
3-
title = {{SolverTools.jl}: Tools for Developing Nonlinear Optimization Solvers},
4-
month = {December},
5-
howpublished = {\url{https://github.com/JuliaSmoothOptimizers/SolverTools.jl}},
6-
year = {2020},
7-
DOI = {10.5281/zenodo.3937408}
3+
title = {{SolverCore.jl}: Core Definitions for Developing Nonlinear Optimization Solvers},
4+
month = {March},
5+
howpublished = {\url{https://github.com/JuliaSmoothOptimizers/SolverCore.jl}},
6+
year = {2021},
7+
DOI = {---}
88
}

Project.toml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
1-
name = "SolverTools"
2-
uuid = "b5612192-2639-5dc1-abfe-fbedd65fab29"
3-
version = "0.4.0"
1+
name = "SolverCore"
2+
uuid = "ff4d7338-4cf1-434d-91df-b86cb86fb843"
3+
version = "0.1.0"
44

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

139
[compat]
14-
DataFrames = "^0.20, 0.21, 0.22"
15-
JLD2 = "0.1.12, 0.2, 0.3, 0.4"
16-
LinearOperators = "0.4.0, 0.5.0, 0.6.0, 0.7.0, 1.0"
1710
NLPModels = "0.14"
1811
julia = "^1.3.0"
1912

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

2619
[targets]
27-
test = ["ADNLPModels", "Logging", "NLPModels", "Test"]
20+
test = ["ADNLPModels", "LinearAlgebra", "Logging", "Test"]

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
# SolverTools
1+
# SolverCore
22

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

9-
A framework to build novel optimization algorithms in Julia.
10+
Core package to build novel optimization algorithms in Julia.
1011

11-
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).
12+
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).
1213

1314
# Installation
1415

1516
```
16-
add SolverTools
17+
add SolverCore
1718
```

docs/make.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
using Documenter, SolverTools
1+
using Documenter, SolverCore
22

33
makedocs(
4-
modules = [SolverTools],
4+
modules = [SolverCore],
55
doctest = true,
66
linkcheck = true,
77
strict = true,
88
format = Documenter.HTML(assets = ["assets/style.css"], prettyurls = get(ENV, "CI", nothing) == "true"),
9-
sitename = "SolverTools.jl",
9+
sitename = "SolverCore.jl",
1010
pages = ["Home" => "index.md",
1111
"API" => "api.md",
1212
"Reference" => "reference.md",
1313
]
1414
)
1515

1616
deploydocs(
17-
repo = "github.com/JuliaSmoothOptimizers/SolverTools.jl.git",
17+
repo = "github.com/JuliaSmoothOptimizers/SolverCore.jl.git",
1818
push_preview = true,
1919
devbranch = "master"
2020
)

docs/src/api.md

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,11 @@
33
```@contents
44
Pages = ["api.md"]
55
```
6-
## Auxiliary
6+
## Logging
77

88
```@docs
9-
active
10-
breakpoints
11-
compute_Hs_slope_qs!
129
log_header
1310
log_row
14-
project!
15-
project_step!
16-
```
17-
18-
## Line-Search
19-
20-
```@docs
21-
LineModel
22-
obj
23-
grad
24-
grad!
25-
objgrad
26-
objgrad!
27-
hess
28-
redirect!
29-
armijo_wolfe
3011
```
3112

3213
## Stats
@@ -35,18 +16,3 @@ armijo_wolfe
3516
GenericExecutionStats
3617
show_statuses
3718
```
38-
39-
## Trust-Region
40-
41-
```@docs
42-
TrustRegionException
43-
SolverTools.AbstractTrustRegion
44-
aredpred
45-
acceptable
46-
reset!
47-
get_property
48-
set_property!
49-
update!
50-
TrustRegion
51-
TRONTrustRegion
52-
```

docs/src/index.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# [SolverTools.jl documentation](@id Home)
2-
3-
This package provides tools for developing nonlinear optimization solvers.
1+
# [SolverCore.jl documentation](@id Home)
42

3+
Core package to build novel optimization algorithms in Julia.

src/SolverCore.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module SolverCore
2+
3+
# stdlib
4+
using Printf
5+
6+
# our packages
7+
using NLPModels
8+
9+
include("logger.jl")
10+
include("stats.jl")
11+
12+
end

src/SolverTools.jl

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)