PASTAplus / seo

Generate schema.org metadata from PASTA+ data package metadata
Apache License 2.0
3 stars 1 forks source link

Prevent Test-Generated JSON-LD File from Version Control #34

Open clnsmth opened 1 month ago

clnsmth commented 1 month ago

Description

The dataset function within the schema_org module writes a copy of Schema.org markup to a cache path for potential future use (see here). During testing, if the cache path isn't explicitly defined in the configuration file, this file gets written to the package's tests/ directory.

To avoid accidentally committing this test-generated file to the version control system and having to manually remove it later, we could add a rule to the .gitignore file.

Proposed Solution

We can target the potential cache file patterns:

cache location for {PASTA environment} json files{pid}.json

utilizing the .gitignore syntax with wildcards:

cache location for * json files*.json

Note: This solution only addresses the test scenario. If the cache path is set to a different location, this rule won't prevent the file from being committed.