-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Example documentation and alignment of the code with the documentation
- Loading branch information
Showing
4 changed files
with
62 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
Example | ||
======= | ||
|
||
Initializing the example | ||
------------------------ | ||
|
||
Along side the ``pkgmeta`` package will is an example directory which contains | ||
an example configuration and a small script to populate the repository with | ||
faux distributions. | ||
|
||
To initialize the example, change directories to the project root:: | ||
|
||
$ cd [where ever pkgmeta is located] | ||
$ ls | ||
README.rst docs example pkgmeta | ||
|
||
Run the ``make.py`` script:: | ||
|
||
$ PYTHONPATH=. python3.2 example/make.py | ||
Creating the repository directory: ~/example-repo | ||
Populating repository with example data... | ||
Using configuration: ./example/example.cfg | ||
Reading configuration... | ||
Loaded 9 distributions into the repository | ||
|
||
Walk through | ||
------------ | ||
|
||
Now that we've created an example repository, we can probe it for information. | ||
|
||
A brief example might be to search for distributions containing the term | ||
``cal``:: | ||
|
||
$ PYTHONPATH=. python3.2 pkgmeta/cli.py -c example/example.cfg search cal | ||
p solarcal - Calendar based on solar dates. | ||
p webcal - Web calendaring application | ||
|
||
Notice that we passed in the example configuration with the ``-c`` option. | ||
|
||
Now that we've found some distributions, let's try showing the distributions | ||
metadata:: | ||
|
||
$ PYTHONPATH=. python3.2 pkgmeta/cli.py -c example/example.cfg show webcal | ||
Metadata-Version: 1.2 | ||
Name: webcal | ||
Version: 3.0 | ||
Summary: Web calendaring application | ||
Description: UNKNOWN | ||
Home-page: UNKNOWN | ||
Author: Hathor | ||
Author-email: UNKNOWN | ||
Maintainer: UNKNOWN | ||
Maintainer-email: UNKNOWN | ||
License: UNKNOWN | ||
Download-URL: UNKNOWN | ||
Requires-Dist: solarcal, sandbox (>=4.0), waterweb (>=8.0), soapbar (>=6.1) | ||
Requires-Python: UNKNOWN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ Contents: | |
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
example | ||
config | ||
tests | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ default = main | |
|
||
[main] | ||
type = filesystem | ||
location = ~/example-main | ||
location = ~/example-repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters