From af5b92e5a82a99e1e54e88aaafef1649c8b4c210 Mon Sep 17 00:00:00 2001 From: Reno <25192197+singularitti@users.noreply.github.com> Date: Mon, 5 Jul 2021 03:19:53 -0400 Subject: [PATCH 01/13] Remove Spglib.jl from deps --- Project.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Project.toml b/Project.toml index 38e380b..2ba4472 100644 --- a/Project.toml +++ b/Project.toml @@ -7,13 +7,11 @@ version = "0.1.1" CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298" CrystallographyBase = "93b1d1cd-a8ea-4aa5-adb1-b2407ea0ba8d" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -Spglib = "f761d5c5-86db-4880-b97f-9680a7cccfb5" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [compat] CoordinateTransformations = "0.5, 0.6" CrystallographyBase = "0.1" -Spglib = "0.1, 0.2" StaticArrays = "0.8.3, 0.9, 0.10, 0.11, 0.12, 1" julia = "1" From 79ebf58ff95ec9f300e945924cba7cf522ec9b25 Mon Sep 17 00:00:00 2001 From: Reno <25192197+singularitti@users.noreply.github.com> Date: Mon, 5 Jul 2021 03:23:45 -0400 Subject: [PATCH 02/13] Fix imports from CrystallographyBase.jl --- src/Crystallography.jl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Crystallography.jl b/src/Crystallography.jl index a3acae8..7153f7b 100644 --- a/src/Crystallography.jl +++ b/src/Crystallography.jl @@ -41,8 +41,8 @@ using CrystallographyBase: ReciprocalLattice, Miller, MillerBravais, - RealSpace, - ReciprocalSpace, + ReciprocalMiller, + ReciprocalMillerBravais, FractionalFromCartesian, CartesianFromFractional, FractionalToCartesian, @@ -62,9 +62,9 @@ using CrystallographyBase: reciprocal_mesh, coordinates, weights, + family, cellvolume, - @m_str, - @mb_str + @m_str export CrystalSystem, Triclinic, @@ -107,8 +107,8 @@ export CrystalSystem, ReciprocalLattice, Miller, MillerBravais, - RealSpace, - ReciprocalSpace, + ReciprocalMiller, + ReciprocalMillerBravais, FractionalFromCartesian, CartesianFromFractional, FractionalToCartesian, @@ -128,9 +128,9 @@ export centering, reciprocal_mesh, coordinates, weights, + family, cellvolume, - @m_str, - @mb_str + @m_str include("Symmetry.jl") From 9e153ea448b723fdca7ab2bac7cece6ed1ccbb1e Mon Sep 17 00:00:00 2001 From: Reno <25192197+singularitti@users.noreply.github.com> Date: Mon, 5 Jul 2021 03:24:57 -0400 Subject: [PATCH 03/13] Comment Symmetry.jl --- src/Crystallography.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Crystallography.jl b/src/Crystallography.jl index 7153f7b..e7de4b4 100644 --- a/src/Crystallography.jl +++ b/src/Crystallography.jl @@ -132,6 +132,6 @@ export centering, cellvolume, @m_str -include("Symmetry.jl") +# include("Symmetry.jl") end From 1ef5d6c4da0952249a0b6bab72b9beea7d4a350c Mon Sep 17 00:00:00 2001 From: Reno <25192197+singularitti@users.noreply.github.com> Date: Mon, 5 Jul 2021 03:32:14 -0400 Subject: [PATCH 04/13] Fix UUID in docs/Project.toml --- docs/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Project.toml b/docs/Project.toml index ea07c29..4155109 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,3 +1,3 @@ [deps] -Crystallography = "06308cd2-f292-494b-9308-80930bf85278" +Crystallography = "3bff3928-7a76-11e9-2089-d112443085a5" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" From 279636247106f666b9d0a55ae6e6a74e23af7412 Mon Sep 17 00:00:00 2001 From: Reno <25192197+singularitti@users.noreply.github.com> Date: Mon, 5 Jul 2021 03:33:02 -0400 Subject: [PATCH 05/13] Fix make.jl --- docs/make.jl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index cfc39b7..a7d496e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -15,10 +15,9 @@ makedocs(; ), pages=[ "Home" => "index.md", - "Manual" => Any["Installation"=>"install.md", "Development"=>"develop.md"], + "Manual" => Any["Installation"=>"installation.md", "Development"=>"develop.md"], "API by modules" => Any[ - "`Crystallography` module"=>"Crystallography.md", - "`Crystallography.Symmetry` module"=>"Symmetry.md", + "`Crystallography` module"=>"api.md", ], ], ) From b27599de942463334727dbf3254b942cb9b7b279 Mon Sep 17 00:00:00 2001 From: Reno <25192197+singularitti@users.noreply.github.com> Date: Mon, 5 Jul 2021 03:33:15 -0400 Subject: [PATCH 06/13] Update docs/src/installation.md --- docs/src/{install.md => installation.md} | 27 ++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) rename docs/src/{install.md => installation.md} (63%) diff --git a/docs/src/install.md b/docs/src/installation.md similarity index 63% rename from docs/src/install.md rename to docs/src/installation.md index 295e620..46cbb6b 100644 --- a/docs/src/install.md +++ b/docs/src/installation.md @@ -1,9 +1,18 @@ # Installation +```@contents +Pages = ["installation.md"] +Depth = 3 +``` + To install this package, first, you need to install a `julia` executable from -[its official website](https://julialang.org/downloads/). Version `v1.0.0` and +[its official website](https://julialang.org/downloads/). Version `v1.3.0` and above is required. This package may not work on `v0.7` and below. +## Installing Julia + +### on macOS + If you are using a Mac, and have [Homebrew](https://brew.sh) installed, open `Terminal.app` and type: @@ -11,6 +20,20 @@ If you are using a Mac, and have [Homebrew](https://brew.sh) installed, open brew cask install julia ``` +### on Linux + +On Linux, the best way to install Julia is to use the Generic Linux Binaries. The +[JILL](https://github.com/abelsiqueira/jill) script does this for you. Just run + +```shell +bash -ci "$(curl -fsSL https://raw.githubusercontent.com/abelsiqueira/jill/master/jill.sh)" +``` + +installs Julia into `$HOME/.local/bin`. This script also has a Python version, +[JILL.py](https://github.com/johnnychen94/jill.py). It can also be used on macOS. + +## Installing the package + Now I am using [macOS](https://en.wikipedia.org/wiki/MacOS) as a standard platform to explain the following steps: @@ -21,7 +44,7 @@ platform to explain the following steps: ```julia julia> using Pkg; Pkg.update() - julia> Pkg.add(PackageSpec(url="https://github.com/MineralsCloud/Crystallography.jl.git")) + julia> Pkg.add("Crystallography") ``` and wait for its finish. From 5b787cdbc32e6d4eee428dab7f6cf3d62673beb9 Mon Sep 17 00:00:00 2001 From: Reno <25192197+singularitti@users.noreply.github.com> Date: Mon, 5 Jul 2021 03:33:38 -0400 Subject: [PATCH 07/13] Rename docs/src/Crystallography.md to api.md --- docs/src/Crystallography.md | 8 ---- docs/src/api.md | 86 +++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 8 deletions(-) delete mode 100644 docs/src/Crystallography.md create mode 100644 docs/src/api.md diff --git a/docs/src/Crystallography.md b/docs/src/Crystallography.md deleted file mode 100644 index 2bc797f..0000000 --- a/docs/src/Crystallography.md +++ /dev/null @@ -1,8 +0,0 @@ -```@contents -Pages = ["Crystals.md"] -Depth = 3 -``` - -```@autodocs -Modules = [Crystallography] -``` diff --git a/docs/src/api.md b/docs/src/api.md new file mode 100644 index 0000000..eec6f8e --- /dev/null +++ b/docs/src/api.md @@ -0,0 +1,86 @@ +```@meta +CurrentModule = Crystallography +``` + +# API + +```@contents +Pages = ["api.md"] +Depth = 3 +``` + +### Lattice + +```@docs +CrystalSystem +Triclinic +Monoclinic +Orthorhombic +Tetragonal +Cubic +Trigonal +Hexagonal +Centering +BaseCentering +Primitive +BodyCentering +FaceCentering +RhombohedralCentering +BaseCentering +Bravais +Lattice +centering +crystalsystem +basis_vectors +cellparameters +supercell +``` + +### Reciprocal space + +Note that we take ``2pi`` as ``1``, not the solid-state physics convention. + +```@docs +ReciprocalPoint +ReciprocalLattice +inv +reciprocal_mesh +coordinates +weights +``` + +### Miller and Miller–Bravais indices + +```@docs +Miller +MillerBravais +ReciprocalMiller +ReciprocalMillerBravais +family +@m_str +``` + +### Metric tensor + +```@docs +MetricTensor +directioncosine +directionangle +distance +interplanar_spacing +``` + +### Transformations + +```@docs +CartesianFromFractional +FractionalFromCartesian +PrimitiveFromStandardized +StandardizedFromPrimitive +``` + +### Others + +```@docs +cellvolume +``` From b799f31da93ab691c035e6ce5604e6d0ed062ab7 Mon Sep 17 00:00:00 2001 From: Reno <25192197+singularitti@users.noreply.github.com> Date: Mon, 5 Jul 2021 03:33:45 -0400 Subject: [PATCH 08/13] Remove docs/src/Symmetry.md --- docs/src/Symmetry.md | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 docs/src/Symmetry.md diff --git a/docs/src/Symmetry.md b/docs/src/Symmetry.md deleted file mode 100644 index 0bd516d..0000000 --- a/docs/src/Symmetry.md +++ /dev/null @@ -1,8 +0,0 @@ -```@contents -Pages = ["Symmetry.md"] -Depth = 3 -``` - -```@autodocs -Modules = [Crystallography.Symmetry] -``` From 9baae130824ef802e4a09021819e8b7a892d88d4 Mon Sep 17 00:00:00 2001 From: Reno <25192197+singularitti@users.noreply.github.com> Date: Mon, 5 Jul 2021 03:34:00 -0400 Subject: [PATCH 09/13] Fix docs/src/develop.md --- docs/src/develop.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/src/develop.md b/docs/src/develop.md index 27f5d66..75f1b01 100644 --- a/docs/src/develop.md +++ b/docs/src/develop.md @@ -1,23 +1,20 @@ -# How to develop this package by yourself +# How to contribute ## Download the project -Similar to what we have mentioned in section "[Installation](@ref)", instead of running +Similar to section "[Installation](@ref)", run ```julia -julia> Pkg.add(PackageSpec(url="https://github.com/MineralsCloud/Crystallography.jl.git")) -``` - -run +julia> using Pkg -```julia -julia> Pkg.dev(PackageSpec(url="https://github.com/MineralsCloud/Crystallography.jl.git")) +julia> pkg"dev Crystallography" ``` +in Julia REPL. + Then the package will be cloned to your local machine at a path. On macOS, by default is located at `~/.julia/dev/Crystallography` unless you modify the `JULIA_DEPOT_PATH` -environment variable. (See [Julia's official -documentation](http://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_DEPOT_PATH-1) +environment variable. (See [Julia's official documentation](http://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_DEPOT_PATH-1) on how to do this.) In the following text, we will call it `PKGROOT`. ## [Instantiate the project](@id instantiating) @@ -30,6 +27,10 @@ julia> using Pkg; Pkg.instantiate() ## How to build docs +Usually, the up-to-state doc is available in +[here](https://mineralscloud.github.io/Crystallography.jl/dev/), but there are cases +where users need to build the doc themselves. + After [instantiating](@ref) the project, go to `PKGROOT`, run (without the `$` prompt) ```bash From ee7cc974a7e17381ffd0b9f77dcab3f356e26b41 Mon Sep 17 00:00:00 2001 From: Reno <25192197+singularitti@users.noreply.github.com> Date: Mon, 5 Jul 2021 03:34:13 -0400 Subject: [PATCH 10/13] Fix docs/src/index.md --- docs/src/index.md | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 9eb17ce..c295e02 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -6,9 +6,41 @@ CurrentModule = Crystallography Documentation for [Crystallography](https://github.com/MineralsCloud/Crystallography.jl). -```@index +## Package Features + +Provides some types and methods for crystallography calculations. + +See the [Index](@ref main-index) for the complete list of documented functions +and types. + +The code is [hosted on GitHub](https://github.com/MineralsCloud/Crystallography.jl), +with some continuous integration services to test its validity. + +This repository is created and maintained by [singularitti](https://github.com/singularitti). +You are very welcome to contribute. + +## Compatibility + +- [Julia version: `v1.3.0` to `v1.6.1`](https://julialang.org/downloads/) +- Dependencies: + - [`CoordinateTransformations.jl`](https://github.com/JuliaGeometry/CoordinateTransformations.jl) `v0.5.1` and above + - [`CrystallographyBase.jl`](https://github.com/MineralsCloud/CrystallographyBase.jl) `v0.1.0` and above + - [`StaticArrays.jl`](https://github.com/JuliaArrays/StaticArrays.jl) `v0.8.3` and above +- OS: macOS, Linux, Windows, and FreeBSD +- Architecture: x86, x64, ARM + +## Manual Outline + +```@contents +Pages = [ + "installation.md", + "develop.md", + "api.md", +] +Depth = 3 ``` -```@autodocs -Modules = [Crystallography] +## [Index](@id main-index) + +```@index ``` From 95a1f898be4474ab32da56b94715684c3b4e1ccf Mon Sep 17 00:00:00 2001 From: Reno <25192197+singularitti@users.noreply.github.com> Date: Mon, 5 Jul 2021 03:36:45 -0400 Subject: [PATCH 11/13] Add CONTRIBUTING.md --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) create mode 120000 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 120000 index 0000000..e3019c3 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1 @@ +docs/src/develop.md \ No newline at end of file From b183c98f9013fc6b4df9ad518dab31a5f11a0560 Mon Sep 17 00:00:00 2001 From: Reno <25192197+singularitti@users.noreply.github.com> Date: Mon, 5 Jul 2021 03:38:01 -0400 Subject: [PATCH 12/13] Remove CONTRIBUTING.md --- CONTRIBUTING.md | 1 - 1 file changed, 1 deletion(-) delete mode 120000 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 120000 index e3019c3..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -docs/src/develop.md \ No newline at end of file From 5ec302d224900e2b38e79fcfb2e7f2b1710be445 Mon Sep 17 00:00:00 2001 From: Reno <25192197+singularitti@users.noreply.github.com> Date: Mon, 5 Jul 2021 03:48:02 -0400 Subject: [PATCH 13/13] Fix CrystallographyBase.jl functions won't build --- docs/Project.toml | 1 + docs/make.jl | 3 ++- docs/src/api.md | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/Project.toml b/docs/Project.toml index 4155109..96d9f6a 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,3 +1,4 @@ [deps] Crystallography = "3bff3928-7a76-11e9-2089-d112443085a5" +CrystallographyBase = "93b1d1cd-a8ea-4aa5-adb1-b2407ea0ba8d" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" diff --git a/docs/make.jl b/docs/make.jl index a7d496e..4923fc2 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,10 +1,11 @@ using Crystallography +using CrystallographyBase using Documenter DocMeta.setdocmeta!(Crystallography, :DocTestSetup, :(using Crystallography); recursive=true) makedocs(; - modules=[Crystallography], + modules=[Crystallography,CrystallographyBase], authors="Qi Zhang ", repo="https://github.com/MineralsCloud/Crystallography.jl/blob/{commit}{path}#{line}", sitename="Crystallography.jl", diff --git a/docs/src/api.md b/docs/src/api.md index eec6f8e..4e8131b 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -1,5 +1,5 @@ ```@meta -CurrentModule = Crystallography +CurrentModule = CrystallographyBase ``` # API