diff --git a/.gitignore b/.gitignore index 076e504..06a8ea5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,5 @@ # /docs/build/ # Jupyter Notebook -*/.ipynb_checkpoints/ +*/.ipynb_checkpoints */.ipynb_checkpoints/* \ No newline at end of file diff --git a/.ipynb_checkpoints/develop-checkpoint.ipynb b/.ipynb_checkpoints/develop-checkpoint.ipynb deleted file mode 100644 index fadf0ef..0000000 --- a/.ipynb_checkpoints/develop-checkpoint.ipynb +++ /dev/null @@ -1,452 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Antiq.jl" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## PkgTemplates.jl\n", - "\n", - "~~https://qiita.com/cometscome_phys/items/989389db3540ebd9e026#%E3%83%AA%E3%83%AA%E3%83%BC%E3%82%B9%E3%81%AE%E7%99%BB%E9%8C%B2~~\n", - "\n", - "https://juliaci.github.io/PkgTemplates.jl/stable/user/#A-More-Complicated-Example-1\n", - "\n", - "```julia\n", - "# using Pkg\n", - "# Pkg.add(\"PkgTemplates\")\n", - "using PkgTemplates\n", - "\n", - "t = Template(;\n", - " user=\"ohno\",\n", - " authors=[\"Shuhei Ohno\"],\n", - " dir=\"../\",\n", - " julia=v\"1.1\",\n", - " plugins=[\n", - " License(; name=\"MIT\"),\n", - " Git(; manifest=true, ssh=true),\n", - " GitHubActions(; x86=true),\n", - " Codecov(),\n", - " Documenter{GitHubActions}(),\n", - " ],\n", - ")\n", - "\n", - "generate(\"Antiq.jl\", t)\n", - "mv(\"Antiq\", \"Antiq.jl\")\n", - "```" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## using Antiq\n", - "\n", - "Please move `./develop.ipynb` into `./Antig.jl/` before run following." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Julia Version 1.8.3\n", - "Commit 0434deb161 (2022-11-14 20:14 UTC)\n", - "Platform Info:\n", - " OS: Windows (x86_64-w64-mingw32)\n", - " CPU: 8 × 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz\n", - " WORD_SIZE: 64\n", - " LIBM: libopenlibm\n", - " LLVM: libLLVM-13.0.1 (ORCJIT, tigerlake)\n", - " Threads: 1 on 8 virtual cores\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[32m\u001b[1m Updating\u001b[22m\u001b[39m registry at `C:\\Users\\user\\.julia\\registries\\General.toml`\n", - "\u001b[32m\u001b[1m Resolving\u001b[22m\u001b[39m package versions...\n", - "\u001b[32m\u001b[1m No Changes\u001b[22m\u001b[39m to `C:\\Users\\user\\Desktop\\GitHub\\Antiq.jl\\Project.toml`\n", - "\u001b[32m\u001b[1m No Changes\u001b[22m\u001b[39m to `C:\\Users\\user\\Desktop\\GitHub\\Antiq.jl\\Manifest.toml`\n", - "\u001b[32m\u001b[1m Activating\u001b[22m\u001b[39m project at `C:\\Users\\user\\Desktop\\GitHub\\Antiq.jl`\n" - ] - } - ], - "source": [ - "versioninfo()\n", - "using Pkg\n", - "Pkg.add(\"Revise\")\n", - "using Revise\n", - "Pkg.activate(\"./\")\n", - "\n", - "# Dependency\n", - "# Pkg.add(\"SpecialFunctions\")\n", - "# using SpecialFunctions\n", - "\n", - "# Antiq.jl\n", - "using Antiq" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Weave.jl & Documenter.jl" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "load" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# import Pkg; Pkg.add(\"Weave\")\n", - "using Weave\n", - "\n", - "@doc \"\"\"\n", - "`save(\"./hello.txt\", \"hello\")` saves the string `text` to the path `path` as a text file.\n", - "\n", - "Examples:\n", - "\n", - "```julia\n", - "julia> save(\"./hello.txt\", \"hello\")\n", - "```\n", - "\"\"\"\n", - "function save(path, text)\n", - "mkpath(dirname(path))\n", - "file = open(path, \"w\")\n", - "Base.write(file, text)\n", - "close(file)\n", - "end\n", - "\n", - "@doc \"\"\"\n", - "`load(path)` returns a string from the file in `path`.\n", - "\n", - "Examples:\n", - "\n", - "```julia\n", - "julia> load(\"./hello.txt\")\n", - "```\n", - "\"\"\"\n", - "function load(path)\n", - "file = open(path, \"r\")\n", - "text = Base.read(file, String)\n", - "close(file)\n", - "return text\n", - "end" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "┌ Info: Weaving chunk 1 from line 17\n", - "│ progress = 0.0\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 2 from line 23\n", - "│ progress = 0.14285714285714285\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 3 from line 30\n", - "│ progress = 0.2857142857142857\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 4 from line 38\n", - "│ progress = 0.42857142857142855\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 5 from line 47\n", - "│ progress = 0.5714285714285714\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 6 from line 59\n", - "│ progress = 0.7142857142857143\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 7 from line 75\n", - "│ progress = 0.8571428571428571\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaved all chunks\n", - "│ progress = 1\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:90\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "m.match = \"\\n```julia\\ninclude(\\\"../../test/InfinitePotentialWell.jl\\\")\\n```\\n\\n```\"\n", - "m.offset = 1636" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "┌ Info: Weaved to C:\\Users\\user\\Desktop\\GitHub\\Antiq.jl\\docs\\src\\InfinitePotentialWell.md\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\Weave.jl:228\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "m.match = \"```\\n```\\n\\n\\n\"\n", - "m.offset = 23943\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "┌ Info: Weaving chunk 1 from line 17\n", - "│ progress = 0.0\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 2 from line 23\n", - "│ progress = 0.14285714285714285\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 3 from line 30\n", - "│ progress = 0.2857142857142857\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 4 from line 38\n", - "│ progress = 0.42857142857142855\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 5 from line 47\n", - "│ progress = 0.5714285714285714\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 6 from line 59\n", - "│ progress = 0.7142857142857143\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 7 from line 75\n", - "│ progress = 0.8571428571428571\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaved all chunks\n", - "│ progress = 1\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:90\n", - "┌ Info: Weaved to C:\\Users\\user\\Desktop\\GitHub\\Antiq.jl\\docs\\src\\HarmonicOscillator.md\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\Weave.jl:228\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "m.match = \"\\n```julia\\ninclude(\\\"../../test/HarmonicOscillator.jl\\\")\\n```\\n\\n```\"\n", - "m.offset = 1645\n", - "m.match = \"```\\n```\\n\\n\\n\"\n", - "m.offset = 26996\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "┌ Info: Weaving chunk 1 from line 17\n", - "│ progress = 0.0\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 2 from line 23\n", - "│ progress = 0.14285714285714285\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 3 from line 30\n", - "│ progress = 0.2857142857142857\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 4 from line 40\n", - "│ progress = 0.42857142857142855\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 5 from line 49\n", - "│ progress = 0.5714285714285714\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 6 from line 62\n", - "│ progress = 0.7142857142857143\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 7 from line 81\n", - "│ progress = 0.8571428571428571\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "m.match = \"\\n```julia\\ninclude(\\\"../../test/MorsePotential.jl\\\")\\n```\\n\\n```\"\n", - "m.offset = 2054\n", - "m.match = \"```\\n```\\n\\n\\n\"\n", - "m.offset = 48991\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "┌ Info: Weaved all chunks\n", - "│ progress = 1\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:90\n", - "┌ Info: Weaved to C:\\Users\\user\\Desktop\\GitHub\\Antiq.jl\\docs\\src\\MorsePotential.md\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\Weave.jl:228\n", - "┌ Info: Weaving chunk 1 from line 17\n", - "│ progress = 0.0\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 2 from line 23\n", - "│ progress = 0.16666666666666666\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 3 from line 30\n", - "│ progress = 0.3333333333333333\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 4 from line 40\n", - "│ progress = 0.5\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 5 from line 49\n", - "│ progress = 0.6666666666666666\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n", - "┌ Info: Weaving chunk 6 from line 62\n", - "│ progress = 0.8333333333333334\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:66\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "m.match = \"\\n```julia\\ninclude(\\\"../../test/HydrogenAtom.jl\\\")\\n```\\n\\n```\"\n", - "m.offset = 1090\n", - "m.match = \"```\\n```\\n\\n\\n\"\n", - "m.offset = 90165\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "┌ Info: Weaved all chunks\n", - "│ progress = 1\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\run.jl:90\n", - "┌ Info: Weaved to C:\\Users\\user\\Desktop\\GitHub\\Antiq.jl\\docs\\src\\HydrogenAtom.md\n", - "└ @ Weave C:\\Users\\user\\.julia\\packages\\Weave\\f7Ly3\\src\\Weave.jl:228\n", - "┌ Info: SetupBuildDirectory: setting up build directory.\n", - "└ @ Documenter.Builder C:\\Users\\user\\.julia\\packages\\Documenter\\H5y27\\src\\Builder.jl:87\n", - "┌ Info: Doctest: running doctests.\n", - "└ @ Documenter.Builder C:\\Users\\user\\.julia\\packages\\Documenter\\H5y27\\src\\Builder.jl:212\n", - "┌ Info: ExpandTemplates: expanding markdown templates.\n", - "└ @ Documenter.Builder C:\\Users\\user\\.julia\\packages\\Documenter\\H5y27\\src\\Builder.jl:225\n", - "┌ Info: CrossReferences: building cross-references.\n", - "└ @ Documenter.Builder C:\\Users\\user\\.julia\\packages\\Documenter\\H5y27\\src\\Builder.jl:231\n", - "┌ Info: CheckDocument: running document checks.\n", - "└ @ Documenter.Builder C:\\Users\\user\\.julia\\packages\\Documenter\\H5y27\\src\\Builder.jl:237\n", - "┌ Info: Populate: populating indices.\n", - "└ @ Documenter.Builder C:\\Users\\user\\.julia\\packages\\Documenter\\H5y27\\src\\Builder.jl:245\n", - "┌ Info: RenderDocument: rendering document.\n", - "└ @ Documenter.Builder C:\\Users\\user\\.julia\\packages\\Documenter\\H5y27\\src\\Builder.jl:260\n", - "┌ Info: HTMLWriter: rendering HTML pages.\n", - "└ @ Documenter.Writers.HTMLWriter C:\\Users\\user\\.julia\\packages\\Documenter\\H5y27\\src\\Writers\\HTMLWriter.jl:714\n", - "┌ Warning: invalid local link: unresolved path in InfinitePotentialWell.md\n", - "│ link.text = Any[\"Install Antiq.jl\"]\n", - "│ link.url = index.html#Install\n", - "└ @ Documenter.Writers.HTMLWriter C:\\Users\\user\\.julia\\packages\\Documenter\\H5y27\\src\\Writers\\HTMLWriter.jl:2081\n", - "┌ Warning: invalid local link: unresolved path in MorsePotential.md\n", - "│ link.text = Any[\"Install Antiq.jl\"]\n", - "│ link.url = index.html#Install\n", - "└ @ Documenter.Writers.HTMLWriter C:\\Users\\user\\.julia\\packages\\Documenter\\H5y27\\src\\Writers\\HTMLWriter.jl:2081\n", - "┌ Warning: invalid local link: unresolved path in HydrogenAtom.md\n", - "│ link.text = Any[\"Install Antiq.jl\"]\n", - "│ link.url = index.html#Install\n", - "└ @ Documenter.Writers.HTMLWriter C:\\Users\\user\\.julia\\packages\\Documenter\\H5y27\\src\\Writers\\HTMLWriter.jl:2081\n", - "┌ Warning: invalid local link: unresolved path in HarmonicOscillator.md\n", - "│ link.text = Any[\"Install Antiq.jl\"]\n", - "│ link.url = index.html#Install\n", - "└ @ Documenter.Writers.HTMLWriter C:\\Users\\user\\.julia\\packages\\Documenter\\H5y27\\src\\Writers\\HTMLWriter.jl:2081\n", - "┌ Warning: Documenter could not auto-detect the building environment Skipping deployment.\n", - "└ @ Documenter C:\\Users\\user\\.julia\\packages\\Documenter\\H5y27\\src\\deployconfig.jl:75\n" - ] - } - ], - "source": [ - "files = [\n", - " \"./docs/src/InfinitePotentialWell\"\n", - " \"./docs/src/HarmonicOscillator\"\n", - " \"./docs/src/MorsePotential\"\n", - " \"./docs/src/HydrogenAtom\"\n", - "]\n", - "\n", - "for file in files\n", - " weave(\"$file.jmd\", doctype=\"github\")\n", - " text = load(\"$file.md\")\n", - " # remove ``` after include(...s)\n", - " for m in eachmatch(r\"\\n```julia\\n.*?jl\\\"\\)\\n```[.\\n]*?```\", text)\n", - " @show m.match\n", - " @show m.offset\n", - " text = replace(text, m.match => \"\")\n", - " end\n", - " # remove ``` at the end of file\n", - " for m in eachmatch(r\"```\\n```[\\s\\n]*?\\z\", text)\n", - " @show m.match\n", - " @show m.offset\n", - " text = replace(text, m.match => \"```\\n\")\n", - " end\n", - " save(\"$file.md\", text)\n", - "end\n", - " \n", - "# run(`cmd /C cd \\& julia ./docs/make.jl`)\n", - "# pwd()\n", - "include(\"./docs/make.jl\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## runtests" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "scrolled": true - }, - "outputs": [], - "source": [ - "# # pwd() |> display\n", - "# include(\"./test/runtests.jl\")" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Julia 1.8.3", - "language": "julia", - "name": "julia-1.8" - }, - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.8.3" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -}