Skip to content

Commit

Permalink
Add information about default repository to README.
Browse files Browse the repository at this point in the history
  • Loading branch information
ztangent committed Feb 18, 2022
1 parent 114cc3a commit 80f4282
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A (meta)-repository of PDDL domains and problems. The following repositories are

## Usage

#### Listing
### Listing

To list the domains provided by a repository, run `list_domains`:

Expand Down Expand Up @@ -44,7 +44,7 @@ julia> list_domains(IPCInstancesRepo, "ipc-2000")
"schedule-adl-untyped"
```

#### Loading
### Loading

To load a domain, specify the repository and domain name as arguments to `load_domain`. To load a problem, specify either the problem name or its index:
```julia
Expand All @@ -53,7 +53,7 @@ problem_1 = load_problem(JuliaPlannersRepo, "blocksworld", "problem-1")
problem_2 = load_problem(JuliaPlannersRepo, "blocksworld", 2)
```

#### Searching
### Searching

Collections, domains and problems can also be searched for using
`find_collections`, `find_domains`, and `find_problems`, by providing a (sub)string or regular expression as a query:
Expand All @@ -76,6 +76,20 @@ julia> find_problems(PlanningDomainsRepo, "112-blocks", r"BLOCKS-4-\d.pddl")
"3966-probBLOCKS-4-0.pddl"
```

#### Cache Management
### Default Repository

All of the above functions can also be called with the first argument omitted, and with the domain name specified as a Symbol, in which case the default repository (`JuliaPlannersRepo`) will be assumed. Note that underscores in symbols will automatically be converted to hyphens:

```julia
# The following two functions load the same domain
load_domain(:doors_keys_gems)
load_domain(JuliaPlannersRepo, "doors-keys-gems")

# The following two functions load the same problem
load_problem(:zeno_travel, 1)
load_problem(JuliaPlannersRepo, "zeno-travel", 1)
```

### Cache Management

For repositories hosted online, PlanningDomains.jl maintains a local cache to reduce load times. However, this cache is not automatically updated if the remote repositories change. To manually clear the cache for a particular repository use `PlanningDomains.clear_cache!`. To clear all caches, use `PlanningDomains.clear_all_caches!`.

2 comments on commit 80f4282

@ztangent
Copy link
Member Author

Choose a reason for hiding this comment

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

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

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.0 -m "<description of version>" 80f42826e2829b6df1a292835a98de08735599d3
git push origin v0.1.0

Please sign in to comment.