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

CompatHelper: bump compat for LazyArrays to 1, (keep existing compat) #26

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
21 changes: 7 additions & 14 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
- uses: actions/cache@v3
env:
cache-name: cache-artifacts
with:
Expand All @@ -45,38 +45,31 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
- uses: codecov/codecov-action@v3
with:
files: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- run: |
julia --project=docs -e '
using Pkg
pkg"add https://github.com/jagot/Jagot.jl"'
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
pkg"build PyPlot"'
env:
PYTHON: ""
- run: julia --project=docs docs/make.jl
pkg"add https://github.com/jagot/Jagot.jl"'
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
doctests:
name: Doctests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: '1'
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
*.jl.mem
*~
/docs/src/figures/
Manifest.toml
.CondaPkg
10 changes: 5 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "AtomicStructure"
uuid = "e24b7630-0518-11e9-1346-1188d3abce50"
authors = ["Stefanos Carlström <[email protected]>"]
version = "0.1.7"
version = "0.1.8"

[deps]
AngularMomentumAlgebra = "0bb1b1ac-0216-11e9-361b-bb110c659ce1"
Expand Down Expand Up @@ -40,22 +40,22 @@ WignerSymbols = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b"
[compat]
AngularMomentumAlgebra = "0.1, 0.2, 0.3"
ArnoldiMethod = "0.2"
ArrayLayouts = "0.7, 0.8"
ArrayLayouts = "0.7, 0.8, 1"
AtomicLevels = "0.1.3"
BandedMatrices = "0.16, 0.17"
BlockBandedMatrices = "0.11"
BlockBandedMatrices = "0.11, 0.12"
CompactBases = "0.3.9"
Compat = "3.27, 4"
ContinuumArrays = "0.10, 0.11, 0.12"
CoulombIntegrals = "0.1.1"
Crayons = "4.0"
EnergyExpressions = "0.1"
FillArrays = "0.12, 0.13"
FillArrays = "0.12, 0.13, 1"
Formatting = "0.4"
HalfIntegers = "1.3"
IntervalSets = "0.5, 0.6, 0.7"
IterativeSolvers = "0.9"
LazyArrays = "0.22"
LazyArrays = "0.22, 1"
LineSearches = "7"
Optim = "1.7"
PrettyTables = "2"
Expand Down
2 changes: 2 additions & 0 deletions docs/CondaPkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[deps]
matplotlib = ">=3"
19 changes: 16 additions & 3 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,30 @@
AngularMomentumAlgebra = "0bb1b1ac-0216-11e9-361b-bb110c659ce1"
AtomicLevels = "10933b4c-d60f-11e8-1fc6-bd9035a249a1"
CompactBases = "2c0377a8-7469-4ebd-be0f-82e501f20078"
CondaPkg = "992eb4ea-22a4-4c89-a5bb-47a3300528ab"
ContinuumArrays = "7ae1f121-cc2c-504b-ac30-9b923412ae5c"
CoulombIntegrals = "42e5845a-f9f1-11e8-0afe-795ea56ed153"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
EnergyExpressions = "f4b57a2e-27c7-11e9-0cb0-edd185b706f6"
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"
Jagot = "84fb645a-ffa8-56cf-983b-ade63a92b20c"
LazyArrays = "5078a376-72f3-5289-bfd5-ec5146d43c02"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"
PythonPlot = "274fc56d-3b97-40fa-a1cd-1b4a50311bf9"
QuasiArrays = "c4ea9172-b204-11e9-377d-29865faadc5c"
SolverTraces = "619b3e1a-df4a-11e8-3b0b-a997e0925a8d"

[compat]
AngularMomentumAlgebra = "0.1, 0.2, 0.3"
AtomicLevels = "0.1.3"
CompactBases = "0.3"
CondaPkg = "0.2"
ContinuumArrays = "0.10, 0.11, 0.12"
CoulombIntegrals = "0.1.1"
Documenter = "0.27"
EnergyExpressions = "0.1"
IntervalSets = "0.7"
LazyArrays = "0.22, 1"
PythonCall = "0.9"
PythonPlot = "1"
QuasiArrays = "0.9"
SolverTraces = "0.1"
48 changes: 22 additions & 26 deletions docs/plots.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using PyPlot
using PythonPlot
using Jagot.plotting
plot_style("ggplot")

using PyCall
using PythonCall
Cycler = pyimport("cycler")
plt.rc("axes", prop_cycle=(plt.rcParams["axes.prop_cycle"] +
Cycler.cycler("linestyle", ["-","--",":","-.",":","-","--"])))
pyplot.rc("axes", prop_cycle=(pyplot.rcParams["axes.prop_cycle"] +
Cycler.cycler("linestyle", ["-","--",":","-.",":","-","--"])))

using Statistics
using Random
Expand All @@ -23,29 +23,24 @@ function mean_color(color::String)
mean([c.r,c.g,c.b])
end

mean_color(color::Py) = mean_color(pyconvert(String, color))

lerp(a,b,t) = (1-t)*a + t*b

mean_position(x, ϕ) = ϕ'*Diagonal(x)*ϕ/(ϕ'ϕ)

function cfigure(fun::Function, figname; clear=true, tight=true, kwargs...)
figure(figname; kwargs...)
clear && clf()
fun()
tight && tight_layout()
end

function csubplot(fun::Function, args...; nox=false, noy=false)
ax = subplot(args...)
fun()
if nox
no_tick_labels(:x)
xlabel("")
end
if noy
no_tick_labels(:y)
ylabel("")
function savedocfig(name,dir="figures")
fig = gcf()
filename = joinpath(@__DIR__, "src", dir, "$(name).svg")
savefig(filename,
transparent=true,
facecolor=fig.get_facecolor())
PythonPlot.close("all")
if isfile(filename)
println("Saved $(name) to $(filename)")
else
@warn "Saving $(name) to $(filename) failed"
end
ax
end

function plot_orbitals(atom::Atom; nrplot=1000, plot_basis=false,
Expand Down Expand Up @@ -120,7 +115,7 @@ function hydrogen()
gst = ground_state(nucleus)
atom = Atom(R, [spin_configurations(gst)[1]], nucleus)
plot_orbitals(atom)
savefig("docs/src/figures/hydrogen.svg")
savedocfig("hydrogen")
end

function helium()
Expand All @@ -142,7 +137,7 @@ function helium()
end
legend(framealpha=0.75,ncol=2)
end
savefig("docs/src/figures/helium.svg")
savedocfig("helium")
end

function beryllium(grid_type)
Expand All @@ -153,7 +148,7 @@ function beryllium(grid_type)
fock = Fock(atom)
optimize!(fock,ω=0.999,ωmax=1-1e-3,scf_method=:arnoldi)
plot_orbitals(atom)
savefig("docs/src/figures/beryllium-$(grid_type).svg")
savedocfig("beryllium-$(grid_type)")
end

macro echo(expr)
Expand All @@ -162,7 +157,8 @@ macro echo(expr)
end

@info "Documentation plots"
mkpath("docs/src/figures")
fig_dir = joinpath(@__DIR__, "src", "figures")
mkpath(fig_dir)
@echo hydrogen()
@echo helium()
@echo beryllium(:fedvr)
Expand Down