-
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.
Merge pull request #8 from cedadev/sparql_test2
Poetry Update and SPARQL Query Removal
- Loading branch information
Showing
16 changed files
with
6,042 additions
and
1,347 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,25 @@ | ||
name: Automatic Test | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip3 install . | ||
pip3 install -r requirements_fix.txt | ||
- name: Run tests | ||
run: pytest |
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,44 @@ | ||
# Notes for removing triple store | ||
|
||
## SPARQL Query requests: | ||
|
||
### get_concepts_in_scheme | ||
|
||
From all items, verify in scheme, pull out ID and verify in endpoints list, then get prefLabel. | ||
|
||
### get_alt_concepts_in_scheme | ||
|
||
From all items, verify in scheme, pull out ID and verify in endpoints list, then get altLabel. | ||
|
||
### get_broader | ||
|
||
Does something interesting with a request for 'narrower' | ||
|
||
### get_alt_label | ||
|
||
Links to get nerc or get ceda alt_label. Still just getting alt or pref labels. | ||
|
||
## Facet Object Components | ||
|
||
### __facets private attribute | ||
- `facets[facet]` = dict of concepts arranged by label/concept (@value - prefLabel/@id) | ||
- `facets[facet-alt]` = same as above but with (@value - altLabel/@id) | ||
- `facets[broader-processing-level]` = get alt level for proc level mappings. | ||
|
||
## __proc_level_mappings | ||
- `proc_level_mappings[proc_level.uri]` - @id from above facet = single item(concept) from records that contain a 'narrower' option. | ||
|
||
## __platform_program_mappings | ||
- `platform_program_mappings[platform.uri]` - @id from above facet = single item(label) from records that contain a 'narrower' option. | ||
|
||
## __programme_group_mappings | ||
- `programme_group_mappings[single item(concept)]` - from above = single item(label) from other records that contain a 'narrower' option. | ||
|
||
## __reversible_facet_mappings | ||
- Reversed mappings for each facet, makes construction of mappings easier. | ||
|
||
## FACET_ENDPOINTS | ||
- Defined config values | ||
|
||
## LABEL_SOURCE | ||
- Defined config values |
Large diffs are not rendered by default.
Oops, something went wrong.
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,45 +1,46 @@ | ||
[tool.poetry] | ||
[project] | ||
name = "tag-scanner" | ||
|
||
version = "2.1.9" | ||
version = "2.2.0" | ||
description = "This package provides a command line tool moles_esgf_tag to generate dataset tags for both MOLES and ESGF." | ||
license = "{file='LICENSE'}" | ||
license = "BSD 3" | ||
readme = "README.md" | ||
|
||
authors = ["Daniel Westwood <[email protected]>", "Antony Wilson <[email protected]>"] | ||
|
||
authors = [ | ||
{ name = "Daniel Westwood", email = "[email protected]"}, | ||
{ name = "Antony Wilson", email = "[email protected]"} | ||
] | ||
classifiers = [ | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: BSD License', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3", | ||
] | ||
|
||
include = [ | ||
{ path = "templates/*.html" }, | ||
{ path = "conf/tag_check.conf" } | ||
{ path = "conf/tag_check.conf" }, | ||
{ path = "tag_scanner/tests/*"} | ||
] | ||
dependencies = [ | ||
"verboselogs>=1.7", | ||
"elasticsearch (>=7.6.0,<7.7)", | ||
"tqdm (>=4.45.0,<5)", | ||
"pytest<8.3.3", | ||
"jinja2 (>=3,<4)", | ||
"numpy (>=1.25,<2.0)", | ||
"netcdf4 (>=1.7.2,<2.0.0)", | ||
"six (>=1.16.0,<2.0.0)", | ||
"requests (>=2.32.3,<3.0.0)", | ||
# "directory-tree @ https://github.com/cedadev/ceda-directory-tree.git" | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.8,<4.0" | ||
verboselogs = "1.7" | ||
elasticsearch = "7.6.0" | ||
tqdm = "^4.45.0" | ||
pytest = "^8.3.3" | ||
jinja2 = "^3" | ||
directory-tree = { git = "https://github.com/cedadev/ceda-directory-tree.git", tag = "v1.1.4"} | ||
|
||
sparqlwrapper = "^2.0.0" | ||
netcdf4 = "^1.7.2" | ||
six = "^1.16.0" | ||
requires-python = ">=3.9,<4" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry.scripts] | ||
[project.scripts] | ||
moles_esgf_tag = "tag_scanner.scripts:CCITaggerCommandLineClient.main" | ||
cci_json_check = "tag_scanner.scripts:TestJSONFile.cmd" | ||
cci_check_tags = "tag_scanner.scripts.check_tags:main" | ||
|
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 @@ | ||
https://github.com/cedadev/ceda-directory-tree/archive/v1.1.5.tar.gz |
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 |
---|---|---|
|
@@ -5,3 +5,5 @@ | |
__copyright__ = 'Copyright 2024 United Kingdom Research and Innovation' | ||
__license__ = 'BSD - see LICENSE file in top-level package directory' | ||
__contact__ = '[email protected]' | ||
|
||
from .dataset import Dataset |
Oops, something went wrong.