Skip to content
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
32 changes: 21 additions & 11 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
pull_request:
branches:
- main
- develop_v2xx
workflow_dispatch:
schedule:
- cron: 0 0 * * 1
Expand All @@ -25,16 +26,26 @@ jobs:
strategy:
fail-fast: false
matrix:
version:
- 'lts'
- '1'
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
include:
- version: 'lts'
os: ubuntu-latest
arch: x64
- version: '1'
os: ubuntu-latest
arch: x64
- version: 'lts'
os: macOS-latest
arch: arm64
- version: '1'
os: macOS-latest
arch: arm64
# libsparseir is not yet tested on Windows
#- version: 'lts'
#os: windows-latest
#arch: x64
#- version: '1'
#os: windows-latest
#arch: x64
steps:
- uses: actions/checkout@v5
- uses: julia-actions/setup-julia@v2
Expand All @@ -44,7 +55,6 @@ jobs:
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
continue-on-error: ${{ matrix.version == 'nightly' }}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
docs:
Expand Down
37 changes: 25 additions & 12 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
name = "SparseIR"
uuid = "4fe2279e-80f0-4adb-8463-ee114ff56b7d"
authors = ["Samuel Badr <samuel.badr@gmail.com>", "Hiroshi Shinaoka <h.shinaoka@gmail.com>", "Markus Wallerberger <markus.wallerberger@tuwien.ac.at>"]
version = "1.1.4"
authors = ["SatoshiTerasaki <terasakisatoshi.math@gmail.com>", "Samuel Badr <samuel.badr@gmail.com>", "Hiroshi Shinaoka <h.shinaoka@gmail.com>", "Markus Wallerberger <markus.wallerberger@tuwien.ac.at>"]
version = "2.0.0-alpha.1"

[deps]
Bessels = "0e736298-9ec6-45e8-9647-e4fc86a2fe38"
GenericLinearAlgebra = "14197337-ba66-59df-a3e3-ca00e7dcff7a"
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MultiFloats = "bdf0d083-296b-4888-a5b6-7498122e68a5"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
libsparseir_jll = "e5bf0e3f-5e75-5bb8-9f3f-2c07620468a3"

[compat]
Bessels = "0.2"
GenericLinearAlgebra = "0.3.1"
LinearAlgebra = "1.6"
MultiFloats = "2"
PrecompileTools = "1"
QuadGK = "2"
Aqua = "0.8.14"
CEnum = "0.5.0"
Clang = "0.19.1"
Libdl = "1"
LinearAlgebra = "1"
QuadGK = "2.11.2"
StableRNGs = "1.0.3"
julia = "1.6"
libsparseir_jll = "0.6.0"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Clang = "40e3b903-d033-50b4-a0cc-940c62c95e31"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
ReTestItems = "817f1d60-ba6b-4fd5-9520-3cf149f6a823"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "Test", "ReTestItems", "Random", "StableRNGs"]
dev = ["Clang"]
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ intermediate representation of correlation functions. It provides:
> Refer also to the accompanying paper:<br>
> **[sparse-ir: Optimal compression and sparse sampling of many-body propagators](https://doi.org/10.1016/j.softx.2022.101266)**

This is a Julia wrapper for the [libsparseir](https://github.com/SpM-lab/libsparseir) C library.

Installation
------------
SparseIR can be installed with the Julia package manager. Simply run the following from the command line:
Expand All @@ -37,6 +39,13 @@ julia -e 'import Pkg; Pkg.develop(url="https://github.com/SpM-lab/SparseIR.jl")'
> **Warning**
> This is recommended only for developers - you won't get automatic updates!

You can also control debug output at runtime using the `SPARSEIR_DEBUG` environment variable:

```bash
export SPARSEIR_DEBUG=1
julia
```

Documentation and tutorial
--------------------------
Check out our [comprehensive tutorial], where self-contained
Expand All @@ -46,8 +55,8 @@ Lichtenstein formula, FLEX, ... - are presented.
Refer to the [API documentation] for more details on how to work
with the Julia library.

There is also a [Python library] and (currently somewhat restricted)
[Fortran library] available for the IR basis and sparse sampling.
This library is built upon the [libsparseir C library](https://github.com/SpM-lab/libsparseir) with Fortran bindings.
There is also a [Python library].

[comprehensive tutorial]: https://spm-lab.github.io/sparse-ir-tutorial
[API documentation]: https://spm-lab.github.io/SparseIR.jl/stable/
Expand Down Expand Up @@ -157,3 +166,7 @@ MINIMAX isometry method (Merzuk Kaltak and Georg Kresse,
[aqua-url]: https://github.com/JuliaTesting/Aqua.jl

[issues-url]: https://github.com/SpM-lab/SparseIR.jl/issues

Development
-----------
See [development.md](development.md) for more information on how to contribute to the project.
146 changes: 146 additions & 0 deletions development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# Development Guide

This document describes how to set up and use the development environment for SparseIR.jl.

## Prerequisites

- Julia 1.6 or later
- Git

## Setting up the Development Environment

### 1. Clone the Repository

```bash
git clone https://github.com/SpM-lab/SparseIR.jl.git
cd SparseIR.jl
```

### 2. Activate the Project Environment

```bash
# Activate the project environment
julia --project=.
```

Or from within Julia:

```julia
using Pkg
Pkg.activate(".")
```

### 3. Install Dependencies

#### Install Main Dependencies

```julia
# Install main dependencies (automatically done with --project=.)
Pkg.instantiate()
```

#### Install Development Dependencies

```julia
# Install development dependencies (includes Clang for code generation)
Pkg.instantiate(; target="dev")
```

#### Install Test Dependencies

```julia
# Install test dependencies
Pkg.instantiate(; target="test")
```

### 4. Verify Installation

```julia
# Check installed packages
Pkg.status()

# Check development dependencies
Pkg.status(; target="dev")

# Check test dependencies
Pkg.status(; target="test")
```

## Development Workflow

### Running Tests

```bash
# Run all tests
julia --project=. -e "using Pkg; Pkg.test()"

# Or run tests with specific target
julia --project=. --target=test -e "using Pkg; Pkg.test()"
```

### Code Generation

The project uses Clang.jl for generating C API bindings.

```julia
# Activate development environment
cd utils
julia --project=@. -e "import Pkg; Pkg.instantiate()"
julia --project=@. generate_C_API.jl
```

Then, `src/C_API.jl` is generated.

### Building Documentation

```bash
# Navigate to docs directory
cd docs

# Activate docs environment and build
julia --project=. -e "using Pkg; Pkg.instantiate()"
julia --project=. docs/make.jl
```

## Project Structure

- `src/` - Main source code
- `test/` - Test files
- `deps/` - Build dependencies and code generation scripts
- `docs/` - Documentation source
- `assets/` - Static assets for documentation

## Troubleshooting

1. **Package not found**: Make sure you've activated the correct target:
```julia
Pkg.instantiate(; target="dev") # for development dependencies
Pkg.instantiate(; target="test") # for test dependencies
```

2. **Clang.jl issues**: Ensure you have the development target activated:
```bash
julia --project=. --target=dev
```

3. **Build failures**: Check that all dependencies are properly installed:
```julia
Pkg.status()
Pkg.status(; target="dev")
```

### Getting Help

- Check the [main documentation](README.md)
- Open an issue on GitHub
- Check Julia's package manager documentation

## Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run tests to ensure everything works
5. Submit a pull request

For more detailed contribution guidelines, see the main repository documentation.
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ SparseIR = "4fe2279e-80f0-4adb-8463-ee114ff56b7d"

[compat]
Documenter = "1"
SparseIR = "1"
SparseIR = "2"
julia = "1.6"
5 changes: 3 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ bib = CitationBibliography(
)

makedocs(; modules=[SparseIR],
authors="Samuel Badr <samuel.badr@gmail.com> and contributors",
# repo="https://github.com/SpM-lab/SparseIR.jl/blob/{commit}{path}#{line}",
checkdocs=:none,
authors="SatoshiTerasaki <terasakisatoshi.math@gmail.com>, Samuel Badr <samuel.badr@gmail.com>, Hiroshi Shinaoka <h.shinaoka@gmail.com>, Markus Wallerberger <markus.wallerberger@tuwien.ac.at>",
repo="https://github.com/SpM-lab/SparseIR.jl/blob/{commit}{path}#{line}",
sitename="SparseIR.jl",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
Expand Down
5 changes: 0 additions & 5 deletions docs/src/private.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,3 @@ Private = true
Public = false
```

```@autodocs
Modules = [SparseIR._LinAlg]
Private = true
Public = true
```
Loading
Loading