Skip to content

Commit

Permalink
Merge pull request #18 from AP6YC/release/v0.1.1
Browse files Browse the repository at this point in the history
Release/v0.1.1
  • Loading branch information
AP6YC committed Oct 10, 2023
2 parents bed1b1f + 4fbe7e5 commit 6a4c8f8
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# Development/scratch folder
_dev/

# IDE ignores
.vscode/

# -----------------------------------------------------------------------------
# JULIA IGNORES
# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "PyCallJLD2"
uuid = "07b0ad8c-101f-43fe-82b6-eff101a491e1"
authors = ["Sasha Petrenko <sap625@mst.edu>"]
description = "A Julia package for saving and loading PyCall.PyObjects with JLD2."
version = "0.1.0"
version = "0.1.1"

[deps]
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Expand Down
45 changes: 31 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
# PyCallJLD2.jl

[![pycalljld2-header](docs/src/assets/logo.png)][docs-dev-url]
[![pycalljld2-header](https://github.com/AP6YC/FileStorage/blob/main/PyCallJLD2/header.png?raw=true)][docs-dev-url]

This package is to [JLD2][jld2] what [PyCallJLD][pycalljld] is to [JLD][jld], implementing a serializer for saving and loading [PyCall][pycall] [`PyObject`][pyobject-readme]s with JLD2.

Please see the official [documentation][docs-dev-url] for usage and contribution guidelines.

| **Documentation** | **Coverage** | **CI Status** |
|:-----------------:|:------------:|:-------------:|
| [![Dev][docs-dev-img]][docs-dev-url] | [![Codecov][codecov-img]][codecov-url] | [![CI Status][ci-img]][ci-url] |
| [![Stable][docs-stable-img]][docs-stable-url] | [![Coveralls][coveralls-img]][coveralls-url] | [![Documentation][doc-status-img]][doc-status-url] |
| **Documentation** | **Coverage** | **CI Status** | **Releases** |
|:-----------------:|:------------:|:-------------:|:-----------:|
| [![Dev][docs-dev-img]][docs-dev-url] | [![Codecov][codecov-img]][codecov-url] | [![CI Status][ci-img]][ci-url] | [![Zenodo][zenodo-img]][zenodo-url] |
| [![Stable][docs-stable-img]][docs-stable-url] | [![Coveralls][coveralls-img]][coveralls-url] | [![Documentation][doc-status-img]][doc-status-url] | [![version][version-img]][version-url] |
| **Dependents** | **Issues** | **JuliaHub Status** | **Downloads** |
| [![deps][deps-img]][deps-url] | [![GitHubIssues][issues-img]][issues-url] | [![JuliaHub][pkgeval-img]][pkgeval-url] | [![Downloads][downloads-img]][downloads-url] |

[version-img]: https://juliahub.com/docs/General/PyCallJLD2/stable/version.svg
[version-url]: https://juliahub.com/ui/Packages/General/PyCallJLD2

[deps-img]: https://juliahub.com/docs/General/PyCallJLD2/stable/deps.svg
[deps-url]: https://juliahub.com/ui/Packages/General/PyCallJLD2?t=2

[downloads-img]: https://shields.io/endpoint?url=https://pkgs.genieframework.com/api/v1/badge/PyCallJLD2
[downloads-url]: https://pkgs.genieframework.com?packages=PyCallJLD2

[issues-img]: https://img.shields.io/github/issues/AP6YC/PyCallJLD2.jl
[issues-url]: https://github.com/AP6YC/PyCallJLD2.jl/issues

[zenodo-img]: https://zenodo.org/badge/DOI/10.5281/zenodo.8333905.svg
[zenodo-url]: https://doi.org/10.5281/zenodo.8333905

[pkgeval-img]: https://juliahub.com/docs/PyCallJLD2/pkgeval.svg
[pkgeval-url]: https://juliahub.com/ui/Packages/PyCallJLD2

[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-stable-url]: https://AP6YC.github.io/PyCallJLD2.jl/stable
Expand Down Expand Up @@ -38,13 +56,12 @@ Please see the official [documentation][docs-dev-url] for usage and contribution

## Table of Contents

- [PyCallJLD2.jl](#pycalljld2jl)
- [Table of Contents](#table-of-contents)
- [Usage](#usage)
- [Attribution](#attribution)
- [Authors](#authors)
- [Packages](#packages)
- [License](#license)
- [Table of Contents](#table-of-contents)
- [Usage](#usage)
- [Attribution](#attribution)
- [Authors](#authors)
- [Packages](#packages)
- [License](#license)

## Usage

Expand Down
7 changes: 7 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
build/
site/

# DemoCards intermediate compilation directories
src/democards/
src/examples/

# Downloads folder for files grabbed during docs generation
src/assets/downloads/
2 changes: 1 addition & 1 deletion docs/examples/tutorials/config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"title": "Tutorials",
"description": "These examples demonstrate some low-level usage of the Julia programming language and subroutines of the CFAR project itself."
"description": "These practical examples demonstrate how to use the `PyCallJLD2.jl` package in various contexts."
}
52 changes: 52 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,58 @@ if haskey(ENV, "DOCSARGS")
end
end


# -----------------------------------------------------------------------------
# DOWNLOAD LARGE ASSETS
# -----------------------------------------------------------------------------

# Point to the raw FileStorage location on GitHub
top_url = raw"https://media.githubusercontent.com/media/AP6YC/FileStorage/main/PyCallJLD2/"

# List all of the files that we need to use in the docs
files = [
"header.png",
]

# Make a destination for the files, accounting for when folder is AdaptiveResonance.jl
assets_folder = joinpath("src", "assets")
if basename(pwd()) == PROJECT_NAME || basename(pwd()) == PROJECT_NAME * ".jl"
assets_folder = joinpath(DOCS_NAME, assets_folder)
end

download_folder = joinpath(assets_folder, "downloads")
mkpath(download_folder)
download_list = []

# Download the files one at a time
for file in files
# Point to the correct file that we wish to download
src_file = top_url * file * "?raw=true"
# Point to the correct local destination file to download to
dest_file = joinpath(download_folder, file)
# Add the file to the list that we will append to assets
push!(download_list, dest_file)
# If the file isn't already here, download it
if !isfile(dest_file)
download(src_file, dest_file)
@info "Downloaded $dest_file, isfile: $(isfile(dest_file))"
else
@info "File already exists: $dest_file"
end
end

# Downloads debugging
detailed_logger = Logging.ConsoleLogger(stdout, Info, show_limited=false)
with_logger(detailed_logger) do
@info "Current working directory is $(pwd())"
@info "Assets folder is:" readdir(assets_folder, join=true)
# full_download_folder = joinpath(pwd(), "src", "assets", "downloads")
@info "Downloads folder exists: $(isdir(download_folder))"
if isdir(download_folder)
@info "Downloads folder contains:" readdir(download_folder, join=true)
end
end

# -----------------------------------------------------------------------------
# GENERATE
# -----------------------------------------------------------------------------
Expand Down
4 changes: 1 addition & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ DocTestSetup = quote
end
```

```@raw html
<img src="assets/logo.png" width="300">
```
![header](assets/downloads/header.png)

# PyCallJLD2.jl

Expand Down
31 changes: 31 additions & 0 deletions docs/src/man/guide.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# [Package Guide](@id package-guide)

To work with the `PyCallJLD2.jl` package, you should know:

- [How to install the package](@ref installation)
- [How to use the package](@ref basic-usage)

## [Installation](@id installation)

The `PyCallJLD2.jl` package can be installed using the Julia package manager.
From the Julia REPL, type `]` to enter the Pkg REPL mode and run

```julia-repl
julia> ]
(@v1.9) pkg> add PyCallJLD2
```

Alternatively, it can be added to your environment in a script with

```julia
using Pkg
Pkg.add("PyCallJLD2")
```

If you wish to have the latest changes between releases, you can directly add the GitHub repo at an arbitrary branch (such as `develop`) as a dependency with

```julia-repl
julia> ]
(@v1.9) pkg> add https://github.com/AP6YC/PyCallJLD2.jl#develop
```

## [Basic Usage](@id basic-usage)

To save and load `JLD2`, load `PyCall`, `JLD2`, and `PyCallJLD2` in the same scope as where you intend to use the `JLD2.save` and `JLD2.load` functions.
If you are coming from `PyCallJLD`, simply replace `JLD` with `JLD2` everywhere in your usage:

Expand Down

2 comments on commit 6a4c8f8

@AP6YC
Copy link
Owner Author

@AP6YC AP6YC commented on 6a4c8f8 Oct 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

This patch adds content to the documentation and README along with fixing existing links.

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

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.1 -m "<description of version>" 6a4c8f89daa047da5c0cddafe5e0416469a9c0c8
git push origin v0.1.1

Please sign in to comment.