-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
68 changed files
with
508 additions
and
201 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,39 @@ | ||
name: generate-api-docs | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.8' | ||
- run: pip install ./plastron-* | ||
- run: pip install pdoc | ||
- run: pdoc --output-dir apidocs plastron | ||
- uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: apidocs | ||
# Deploy job | ||
deploy: | ||
# Add a dependency to the build job | ||
needs: build | ||
|
||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
|
||
# Deploy to the github-pages environment | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
# Specify runner + deployment step | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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
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
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 |
---|---|---|
|
@@ -4,21 +4,33 @@ Tools for working with a Fedora 4 repository. | |
|
||
## Architecture | ||
|
||
Plastron is composed of several distribution packages: | ||
Plastron is composed of several distribution packages, arranged in three | ||
layers: | ||
|
||
### Applications | ||
|
||
* **[plastron-client](plastron-client)**: The Fedora repository API client | ||
* **[plastron-rdf](plastron-rdf)**: RDF-to-Python property mapping | ||
* **[plastron-models](plastron-models)**: Content models, CSV | ||
serialization | ||
* **[plastron-repo](plastron-repo)**: Repository operations and structural | ||
models (LDP, PCDM, Web Annotations, etc.) | ||
* **[plastron-cli](plastron-cli)**: Command-line tool. Also includes the | ||
handler classes for the `load` command | ||
* **[plastron-stomp](plastron-stomp)**: STOMP daemon for handling | ||
asynchronous operations | ||
* **[plastron-web](plastron-web)**: Web application for handling | ||
synchronous operations | ||
* **[plastron-utils](plastron-utils)**: Miscellaneous utilities | ||
|
||
### High-Level APIs | ||
|
||
* **[plastron-models](plastron-models)**: Content models, CSV | ||
serialization | ||
* **[plastron-repo](plastron-repo)**: Repository operations and structural | ||
models (LDP, PCDM, Web Annotations, etc.) | ||
|
||
### Low-level APIs | ||
|
||
* **[plastron-client](plastron-client)**: The Fedora repository API client | ||
* **[plastron-messaging](plastron-messaging)**: STOMP message models and | ||
message broker connection handling | ||
* **[plastron-rdf](plastron-rdf)**: RDF-to-Python property mapping | ||
* **[plastron-utils](plastron-utils)**: Namespace definitions | ||
and miscellaneous utilities | ||
|
||
The intent is that these distribution packages are independently useful, | ||
either as tools that can be run or libraries to be included in other projects. | ||
|
@@ -27,23 +39,48 @@ either as tools that can be run or libraries to be included in other projects. | |
|
||
Requires Python 3.8+ | ||
|
||
To install just the API libraries (low- and high-level): | ||
|
||
```zsh | ||
pip install plastron | ||
``` | ||
|
||
To install the applications as well: | ||
|
||
```zsh | ||
# individually | ||
pip install 'plastron[cli]' | ||
pip install 'plastron[stomp]' | ||
pip install 'plastron[web]' | ||
|
||
# all together | ||
pip install 'plastron[cli,stomp,web]' | ||
``` | ||
|
||
## Running | ||
|
||
* [Command-line client](plastron-cli/README.md) | ||
* [STOMP daemon](plastron-stomp/README.md) | ||
* [HTTP webapp](plastron-web/README.md) | ||
|
||
## Development | ||
|
||
This repository includes a [.python-version](.python-version) file. If you are | ||
using a tool like [pyenv] to manage your Python versions, it will select | ||
an installed Python 3.8 for you. | ||
|
||
### Install for development | ||
|
||
To install Plastron in [development mode], do the following: | ||
|
||
```bash | ||
```zsh | ||
git clone [email protected]:umd-lib/plastron.git | ||
cd plastron | ||
python -m venv .venv | ||
python -m venv --prompt "plastron-py$(cat .python-version)" .venv | ||
source .venv/bin/activate | ||
pip install \ | ||
-e './plastron-utils[test]' \ | ||
-e './plastron-client[test]' \ | ||
-e './plastron-rdf[test]' \ | ||
-e './plastron-messaging[test]' \ | ||
-e './plastron-models[test]' \ | ||
-e './plastron-repo[test]' \ | ||
-e './plastron-web[test]' \ | ||
|
@@ -66,12 +103,6 @@ pytest | |
See the [testing documentation](docs/testing.md) for more | ||
information. | ||
|
||
## Running | ||
|
||
* [Command-line client](plastron-cli/README.md) | ||
* [STOMP daemon](plastron-stomp/README.md) | ||
* [HTTP webapp](plastron-web/README.md) | ||
|
||
## API Documentation | ||
|
||
To generate API documentation from the code, use [pdoc]: | ||
|
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 @@ | ||
4.3.2 |
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,24 @@ | ||
#!/bin/bash | ||
|
||
VERSION=$(cat VERSION) | ||
|
||
cat >dependencies.txt <<END | ||
plastron-client==$VERSION | ||
plastron-messaging==$VERSION | ||
plastron-models==$VERSION | ||
plastron-rdf==$VERSION | ||
plastron-repo==$VERSION | ||
plastron-utils==$VERSION | ||
END | ||
|
||
cat >dependencies-cli.txt <<END | ||
plastron-cli==$VERSION | ||
END | ||
|
||
cat >dependencies-stomp.txt <<END | ||
plastron-stomp==$VERSION | ||
END | ||
|
||
cat >dependencies-web.txt <<END | ||
plastron-web==$VERSION | ||
END |
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 @@ | ||
../VERSION |
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 |
---|---|---|
@@ -1,16 +1,30 @@ | ||
[project] | ||
name = "plastron-cli" | ||
version = "4.3.1" | ||
description = "Plastron command line client" | ||
authors = [ | ||
{ name='University of Maryland Libraries', email='[email protected]' }, | ||
{ name='Josh Westgard', email='[email protected]' }, | ||
{ name='Peter Eichman', email='[email protected]' }, | ||
{ name='Mohamed Abdul Rasheed', email='[email protected]' }, | ||
{ name='Ben Wallberg', email='[email protected]' }, | ||
{ name='David Steelman', email='[email protected]' }, | ||
{ name='Marc Andreu Grillo Aguilar', email='[email protected]' }, | ||
] | ||
readme = "README.md" | ||
requires-python = ">= 3.8" | ||
dependencies = [ | ||
"BeautifulSoup4", | ||
"lxml==4.9.2", | ||
"lxml", | ||
"Pillow", | ||
"plastron-models", | ||
"plastron-repo", | ||
"plastron-utils", | ||
"pyparsing", | ||
"pysolr", | ||
"PyYAML", | ||
"rdflib", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.optional-dependencies] | ||
test = [ | ||
|
@@ -21,5 +35,12 @@ test = [ | |
[project.scripts] | ||
plastron = "plastron.cli:main" | ||
|
||
[build-system] | ||
requires = ["setuptools>=66.1.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools.dynamic] | ||
version = { "file" = "VERSION" } | ||
|
||
[tool.pytest.ini_options] | ||
markers = ['jobs_dir'] |
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
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
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
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
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
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
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
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
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
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
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 @@ | ||
../VERSION |
Oops, something went wrong.