From 4ac523910b5b5ff559cc6e226facf53a4544b029 Mon Sep 17 00:00:00 2001 From: Sasha Petrenko Date: Mon, 24 Jul 2023 16:57:58 -0500 Subject: [PATCH 1/7] Add installation to guide --- docs/src/man/guide.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/src/man/guide.md b/docs/src/man/guide.md index 47832a7..d53a2d0 100644 --- a/docs/src/man/guide.md +++ b/docs/src/man/guide.md @@ -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: From e223f896b03359e3fec2cce54a28bf812408bc50 Mon Sep 17 00:00:00 2001 From: Sasha Petrenko Date: Mon, 24 Jul 2023 16:59:03 -0500 Subject: [PATCH 2/7] Fix tutorials section header in examples --- docs/examples/tutorials/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/tutorials/config.json b/docs/examples/tutorials/config.json index beee9b6..58026e5 100644 --- a/docs/examples/tutorials/config.json +++ b/docs/examples/tutorials/config.json @@ -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." } \ No newline at end of file From 49e569b2acba7a2a4a6029e5a393be658ccb7d99 Mon Sep 17 00:00:00 2001 From: Sasha Petrenko Date: Mon, 24 Jul 2023 17:27:03 -0500 Subject: [PATCH 3/7] Ignore vscode files --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index a51c11f..aea3968 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,9 @@ # Development/scratch folder _dev/ +# IDE ignores +.vscode/ + # ----------------------------------------------------------------------------- # JULIA IGNORES # ----------------------------------------------------------------------------- From 2bdcdfe7638e7be62404bfda6c8a473cdc9fce95 Mon Sep 17 00:00:00 2001 From: Sasha Petrenko Date: Wed, 26 Jul 2023 10:45:35 -0500 Subject: [PATCH 4/7] Add docs assets download, header in readme, docs --- README.md | 17 +++++++--------- docs/make.jl | 52 +++++++++++++++++++++++++++++++++++++++++++++++ docs/src/index.md | 4 +--- 3 files changed, 60 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 9068717..71ffb20 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ -# 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. @@ -38,13 +36,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 diff --git a/docs/make.jl b/docs/make.jl index 2f13ce2..d24b0ee 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -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/AdaptiveResonance/" + +# 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 # ----------------------------------------------------------------------------- diff --git a/docs/src/index.md b/docs/src/index.md index a9a0dc0..1124be2 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -4,9 +4,7 @@ DocTestSetup = quote end ``` -```@raw html - -``` +![header](assets/downloads/header.png) # PyCallJLD2.jl From 03eb7d1d86afcf3573f56c6ee059c54bbfac472b Mon Sep 17 00:00:00 2001 From: Sasha Petrenko Date: Wed, 26 Jul 2023 10:54:27 -0500 Subject: [PATCH 5/7] Fix download url, ignores --- docs/.gitignore | 7 +++++++ docs/make.jl | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/.gitignore b/docs/.gitignore index a303fff..0457f7f 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -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/ diff --git a/docs/make.jl b/docs/make.jl index d24b0ee..6b6790e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -59,7 +59,7 @@ end # ----------------------------------------------------------------------------- # Point to the raw FileStorage location on GitHub -top_url = raw"https://media.githubusercontent.com/media/AP6YC/FileStorage/main/AdaptiveResonance/" +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 = [ From 3a5e63eb6a97bf0a8fc109906ac688552d7f66a4 Mon Sep 17 00:00:00 2001 From: Sasha Petrenko Date: Sun, 1 Oct 2023 13:23:25 -0500 Subject: [PATCH 6/7] Dev readme badges, add zenodo --- README.md | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 71ffb20..7761764 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,30 @@ This package is to [JLD2][jld2] what [PyCallJLD][pycalljld] is to [JLD][jld], im 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 From 4fbe7e5fde9a4ea6aab4ac05f0c26faf08e1fca7 Mon Sep 17 00:00:00 2001 From: Sasha Petrenko Date: Tue, 10 Oct 2023 16:36:43 -0500 Subject: [PATCH 7/7] Bump to v0.1.1 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 6c058d0..87ae36a 100644 --- a/Project.toml +++ b/Project.toml @@ -2,7 +2,7 @@ name = "PyCallJLD2" uuid = "07b0ad8c-101f-43fe-82b6-eff101a491e1" authors = ["Sasha Petrenko "] 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"