You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> See [Documenter.jl: Documentation Versions](https://documenter.juliadocs.org/dev/man/hosting/#Documentation-Versions)
16
-
17
-
## Introduction
18
-
19
-
This is a julia package created using `okatsn`'s preference, and this package is expected to be registered to [okatsn/OkRegistry](https://github.com/okatsn/OkRegistry) for CIs to work properly.
20
-
21
-
!!! note Checklist
22
-
23
-
- [ ] Create an empty repository (namely, `https://github.com/okatsn/HivePaths.jl.git`) on github, and push the local to origin. See [connecting to remote](#tips-for-connecting-to-remote).
24
-
- [ ] Add `ACCESS_OKREGISTRY` secret in the settings of this repository on Github, or delete both `register.yml` and `TagBot.yml` in `/.github/workflows/`. See [Auto-Registration](#auto-registration).
25
-
- [ ] To keep `Manifest.toml` being tracked, delete the lines in `.gitignore`.
26
-
- [ ] You might like to register `v0.0.0` in order to `pkg> dev HivePaths` in your environment.
27
-
28
-
29
-
### Go to [OkPkgTemplates](https://github.com/okatsn/OkPkgTemplates.jl) for more information
30
-
31
-
-[How TagBot works and trouble shooting](https://github.com/okatsn/OkPkgTemplates.jl#tagbot)
32
-
-[Use of Documenter](https://github.com/okatsn/OkPkgTemplates.jl#use-of-documenter)
33
-
34
-
## References
35
-
36
-
### For a remote of different name
37
-
38
-
Example workflow
39
-
40
-
- Create `YourPackage.jl` with `OkPkgTemplates`
41
-
- Create a new Repo on GitHub, saying `Hello-World`
42
-
- Go to local path of YourPackage.jl, `git remote set-url origin https://<git-repo>/Hello-World.git`.
43
-
- Use find all and Replace "YourPackage.jl" with "Hello-World" **EXCEPT** those **NOT** URL such as:
44
-
-`@testset "YourPackage.jl"` in `/test/runtest.jl`
45
-
- The `sitename` field in `/docs/make.jl`
46
-
47
-
### Auto-Registration
48
-
49
-
- You have to add `ACCESS_OKREGISTRY` to the secret under the remote repo (e.g., https://github.com/okatsn/HivePaths.jl).
50
-
-`ACCESS_OKREGISTRY` allows `CI.yml` to automatically register/update this package to [okatsn/OkRegistry](https://github.com/okatsn/OkRegistry).
51
-
52
-
### Test
53
-
#### How to add a new test
54
-
55
-
Add `.jl` files (that has `@testset` block or `@test` inside) in `test/`; `test/runtests.jl` will automatically `include` all the `.jl` scripts there.
13
+
HivePaths provides utilities for working with Hive-style partitioned file hierarchies, where data is organized using `key=value` directory structures.
56
14
57
-
#### Test docstring
15
+
##Purpose
58
16
59
-
`doctest` is executed at the following **two** places:
17
+
When managing datasets partitioned across multiple dimensions (e.g., `criterion=depth/partition=1/k=10/data.arrow`), HivePaths helps you:
18
+
-**Parse** paths to extract partition metadata
19
+
-**Build** paths with consistent hierarchical ordering
20
+
-**Find** all files matching a specific schema
60
21
61
-
1. In `CI.yml`, `jobs: test: ` that runs `test/runtests.jl`
62
-
2. In `CI.yml`, `jobs: docs: ` that runs directly on bash.
22
+
Each `HiveSchema` defines one target filename and the hierarchical structure of its enclosing directories.
63
23
64
-
It is no harm to run both, but you can manually delete either.
65
-
Of course, `pkg> test` will also run `doctest` since it runs also `test/runtests.jl`.
24
+
## Example
66
25
67
-
### Tips for connecting to remote
26
+
```julia
27
+
using HivePaths
68
28
69
-
Connect to remote:
29
+
# Define the schema
30
+
schema = HiveSchema(
31
+
parsers = Dict{String, Function}(
32
+
"criterion"=> identity,
33
+
"partition"=> x -> parse(Int, x),
34
+
"k"=> x -> parse(Int, x)
35
+
),
36
+
order = ["criterion", "partition", "k"],
37
+
filename ="data.arrow"
38
+
)
70
39
71
-
1. Switch to the local directory of this project (HivePaths)
72
-
2. Add an empty repo HivePaths(.jl) on github (without anything!)
0 commit comments