pc

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

README

PC - Package Checker

This program aims to improve the quality of data publications via running a few simple tests to ensure best practices for publishing data are being followed.

Checks are run by file / respository (data package). Currently only a few checks are implemented:

By file:

  • HasOnlyASCII (for filenames)
  • HasNoWhiteSpace (for filenames)
  • IsFreeOfKeywords (checking file contents); non binary, .xlsx and .docx are supported
  • IsValidName (checking if nonsense files are present eg: .Rhistory)

Archives (.zip, .tar, .7z) are also supported. On these the content (IsFreeOfKeywords) on each file is not checked. As .tar.gz files require complete unpacking of the archive to access the list of contained files it is not supported as it would be too slow for large archives.

By respository:

  • HasReadme (a readme file exists in the repository)
  • ReadMeContainsTOC (readme mentions each file containted in the repository)

How the files are passed to the tool is defined via collectors. Currently only the LocaleCollector can be used. Work on the a collector from CKAN via package_id is underway.

Run

cp pc.toml.example pc.toml
go run main.go

Building

To build (https://github.com/confluentinc/confluent-kafka-go/issues/1092#issuecomment-2373681430):

go build -ldflags="-s -w" . && ./pc

Testing

go test ./...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL