Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assignees: ''

---

Thank you for taking the time to file a bug report. Before creating a new issue, please ensure you have read [our bug reporting guidelines](https://gsscogs.github.io/csvcubeddocs/external/guides/raise-issue/#report-bugs) as well as checking the open issues for existing issues regarding your bug.
Thank you for taking the time to file a bug report. Before creating a new issue, please ensure you have read [our bug reporting guidelines](https://onsdigital.github.io/csvcubeddocs/external/guides/raise-issue/#report-bugs) as well as checking the open issues for existing issues regarding your bug.

**Describe the issue:**
Please briefly describe the issue.
Expand All @@ -16,7 +16,7 @@ Please briefly describe the issue.
Please provide a minimal, self-contained and reproducible example or example steps which demonstrates the issue.

**Error message obtained / Resulting behaviour:**
Include the full error message, if any. Detailed error logging can be obtained by following [this guide](https://gss-cogs.github.io/csvcubed-docs/external/guides/raise-issue/#obtaining-error-logs).
Include the full error message, if any. Detailed error logging can be obtained by following [this guide](https://onsdigital.github.io/csvcubed-docs/external/guides/raise-issue/#obtaining-error-logs).

**Expected behaviour:**
Describe the expected outcome of the issue causing action.
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/request-further-guidance.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ assignees: ''

---

Thank you for taking the time to seek further support. Before submitting a new ticket, please ensure you have read [our documentation guides](https://gss-cogs.github.io/csvcubed-docs/external/guides/) as well as checked the open issues, just in case your problem is bug related.
Thank you for taking the time to seek further support. Before submitting a new ticket, please ensure you have read [our documentation guides](https://onsdigital.github.io/csvcubed-docs/external/guides/) as well as checked the open issues, just in case your problem is bug related.

**Describe the issue:**
Please describe the issue including any error messages you are receiving and steps you have already taken. Detailed error logging can be obtained by following [this guide](https://gss-cogs.github.io/csvcubed-docs/external/guides/raise-issue/#obtaining-error-logs).
Please describe the issue including any error messages you are receiving and steps you have already taken. Detailed error logging can be obtained by following [this guide](https://onsdigital.github.io/csvcubed-docs/external/guides/raise-issue/#obtaining-error-logs).

**Version information + Operating System:**
Please state to which version of csvcubed this issue relates and on which operating system it has occurred.
2 changes: 1 addition & 1 deletion .github/workflows/reusable-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: |
git config --global user.email "[email protected]" && git config --global user.name "csvcubed"

git clone 'https://csvcubed:${{ secrets.CSVCUBED_GIT_COMMIT_TOKEN }}@github.com/GSS-Cogs/csvcubed-docs.git' --depth 1 --branch gh-pages-test
git clone 'https://csvcubed:${{ secrets.CSVCUBED_GIT_COMMIT_TOKEN }}@github.com/ONSDigital/csvcubed-docs.git' --depth 1 --branch gh-pages-test
cd csvcubed-docs

git rm -rf . --ignore-unmatch
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y default-jre

# Install Apache JENA CLI tools for this.
WORKDIR /
ADD https://downloads.apache.org/jena/binaries/apache-jena-5.0.0.tar.gz /apache-jena.tar.gz
ADD https://downloads.apache.org/jena/binaries/apache-jena-5.2.0.tar.gz /apache-jena.tar.gz
RUN tar xvfz /apache-jena.tar.gz && \
cd /apache-jena-* && \
cp -r * /usr/local/ && \
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ pip install csvcubed

From there you'll have access to the `csvcubed` command line tool which features sub commands `build` and `inspect` to create CSV-Ws from CSV and inspect CSV-Ws.

Become well acquainted to csvcubed with our [quick start](https://gss-cogs.github.io/csvcubed-docs/external/quick-start/), which includes written instructions as well as transcribed videos.
Become well acquainted to csvcubed with our [quick start](https://onsdigital.github.io/csvcubed-docs/external/quick-start/), which includes written instructions as well as transcribed videos.

## User Documentation

csvcubed has extensive user documentation which tracks the release of csvcubed while it is in its beta phase. Our [documentation](https://gss-cogs.github.io/csvcubed-docs/external/) can always be improved, so treat bad docs as a bug report.
csvcubed has extensive user documentation which tracks the release of csvcubed while it is in its beta phase. Our [documentation](https://onsdigital.github.io/csvcubed-docs/external/) can always be improved, so treat bad docs as a bug report.

## Related Packages

| Name | Description |
| :----------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- |
| [csvcubed](./README.md) | The key library helping to transform tidy-data into qb-flavoured CSV-W cubes. |
| [csvcubed-models](https://github.com/gss-Cogs/csvcubed-models) | Models and RDF serialisation functionality required by the csvcubed and csvcubed-pmd packages. |
| [csvcubed-pmd](https://github.com/gss-Cogs/csvcubed-pmd) | Transforms a CSV-qb into RDF which is compatible with the Publish My Data platform. |
| [csvcubed-devtools](https://github.com/gss-Cogs/csvcubed-devtools) | Shared test functionality & dev dependencies which are commonly required. |
| [csvcubed-models](https://github.com/ONSdigital/csvcubed-models) | Models and RDF serialisation functionality required by the csvcubed and csvcubed-pmd packages. |
| [csvcubed-pmd](https://github.com/ONSdigital/csvcubed-pmd) | Transforms a CSV-qb into RDF which is compatible with the Publish My Data platform. |
| [csvcubed-devtools](https://github.com/ONSdigital/csvcubed-devtools) | Shared test functionality & dev dependencies which are commonly required. |

## Developer Documentation

More detailed developer documentation for this project can be found [here](https://github.com/GSS-Cogs/csvcubed/blob/main/docs/developer.md).
More detailed developer documentation for this project can be found [here](https://github.com/ONSdigital/csvcubed/blob/main/docs/developer.md).

## How to report bugs

We welcome and appreciate bug reports. As we are trying to make this tool useful for all levels of experience, any level of bug or improvement helps others. To contribute to making csvcubed better, check out our [bug reporting instructions](https://gss-cogs.github.io/csvcubed-docs/external/guides/raise-issue/).
We welcome and appreciate bug reports. As we are trying to make this tool useful for all levels of experience, any level of bug or improvement helps others. To contribute to making csvcubed better, check out our [bug reporting instructions](https://onsdigital.github.io/csvcubed-docs/external/guides/raise-issue/).

Copyright 2024 Office for National Statistics, under Crown Copyright
Copyright 2024 Office for National Statistics, under Crown Copyright
4 changes: 2 additions & 2 deletions docs/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Below we'll explore how we're using some of these libraries along with some key

Python's [dataclasses module](https://docs.python.org/3/library/dataclasses.html) was added to python 3.7 as per [PEP557](https://www.python.org/dev/peps/pep-0557/). It provides some key functionality that reduces the amount of boiler-plate code that it is necessary to write when defining a class. If you annotate a class as a `@dataclass`, then you only have to define the below code and you no longer need to write an `__init__` function and get free sensible defaults for `__eq__`, `__str__` and `__repr__` too (among others). Importantly, the functionality brings with it the ability to more easily reflect over the fields defined inside a class which makes it easier to do things like serialising to/from JSON.

If we write the following class using the `@dataclass` decorator and extending from [sharedmodels.dataclassbase.DataClassBase](https://github.com/GSS-Cogs/csvwlib/blob/main/sharedmodels/sharedmodels/dataclassbase.py):
If we write the following class using the `@dataclass` decorator and extending from [sharedmodels.dataclassbase.DataClassBase](https://github.com/ONSdigital/csvwlib/blob/main/sharedmodels/sharedmodels/dataclassbase.py):

```python
from dataclasses import dataclass
Expand Down Expand Up @@ -211,7 +211,7 @@ class NewResourceWithLabel(NewResource):

Here we see that the `label` property is mapped to the `rdfs:label` predicate which means that when serialised we get a triple of the form `<http://uri/of/this/entity> rdfs:label "The label's value for this entity"@en`

When you inherit from [sharedmodels.models.resource.NewResource](https://github.com/GSS-Cogs/csvwlib/blob/main/sharedmodels/sharedmodels/rdf/resource.py), you gain the functionality to easily serialise your model into an rdflib graph:
When you inherit from [sharedmodels.models.resource.NewResource](https://github.com/ONSdigital/csvwlib/blob/main/sharedmodels/sharedmodels/rdf/resource.py), you gain the functionality to easily serialise your model into an rdflib graph:

```python
thing = NewResourceWithLabel("http://uri/of/this/entity")
Expand Down
2 changes: 1 addition & 1 deletion external-docs/docs/glossary/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Examples:

* `http://some-uri`
* `http://base-uri/concept-scheme/this-concept-scheme-name`
* `https://gss-cogs.github.io/csvcubed-docs/external/glossary/`
* `https://onsdigital.github.io/csvcubed-docs/external/glossary/`
* `ftp://example.example/example/example.txt`
* `mailto:[email protected]`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ The `definition_uri` fields allows you to refer to external resources that furth
"values": [
{
"label": "confidential",
"definition_uri": "https://github.com/GSS-Cogs/reusable-rdf-resources/blob/main/rdf-definitions/attributes/analyst-function-obs-marker.csv"
"definition_uri": "https://github.com/ONSdigital/reusable-rdf-resources/blob/main/rdf-definitions/attributes/analyst-function-obs-marker.csv"
},
{
"label": "estimated",
"definition_uri": "https://github.com/GSS-Cogs/reusable-rdf-resources/blob/main/rdf-definitions/attributes/analyst-function-obs-marker.csv"
"definition_uri": "https://github.com/ONSdigital/reusable-rdf-resources/blob/main/rdf-definitions/attributes/analyst-function-obs-marker.csv"
},
{
"label": "forecast",
"definition_uri": "https://github.com/GSS-Cogs/reusable-rdf-resources/blob/main/rdf-definitions/attributes/analyst-function-obs-marker.csv"
"definition_uri": "https://github.com/ONSdigital/reusable-rdf-resources/blob/main/rdf-definitions/attributes/analyst-function-obs-marker.csv"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ In the above example, we have reused the `year` template, but given the dimensio

## Available templates

The templates are currently in version 1.0; with future development planned. You can see the entire list of the templates inline below or on [csvcubed GitHub](https://github.com/GSS-Cogs/csvcubed/tree/main/src/csvcubed/readers/cubeconfig/v1_0/templates). The `from_template` functionality fetches the most recent version of our templates from the web.
The templates are currently in version 1.0; with future development planned. You can see the entire list of the templates inline below or on [csvcubed GitHub](https://github.com/ONSdigital/csvcubed/tree/main/src/csvcubed/readers/cubeconfig/v1_0/templates). The `from_template` functionality fetches the most recent version of our templates from the web.

### Date/Time period template

Expand Down
2 changes: 1 addition & 1 deletion external-docs/docs/guides/csv-to-csvw-github-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

The csv-to-csvw GitHub action enables you to build CSV-Ws by pushing CSV and qube-config.json files to a Git repository configured with GitHub Actions. It is designed to bring csvcubed to users who have difficulty installing software in corporate environments, or for those who want to keep a versioned history of their publications.

To learn about how to use the csv-to-csvw GitHub action, please follow our [csv-to-csvw GitHub action guide](https://GitHub.com/GSS-Cogs/csv-to-csvw-action).
To learn about how to use the csv-to-csvw GitHub action, please follow our [csv-to-csvw GitHub action guide](https://github.com/ONSdigital/csv-to-csvw-action).
2 changes: 1 addition & 1 deletion external-docs/docs/guides/raise-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ Feel free to consult these for more detailed retrospective debugging.

## Requesting Further Guidance

If you are having difficulties using csvcubed, please do not hesitate to submit a ticket to the issue tracker in the same manner as you would submit a bug report. A template has been put in place for this purpose. Before submitting a new ticket, please ensure you have read [our documentation guides](https://gss-cogs.github.io/csvcubed-docs/external/guides/) as well as checked the open issues, just in case your problem is bug related.
If you are having difficulties using csvcubed, please do not hesitate to submit a ticket to the issue tracker in the same manner as you would submit a bug report. A template has been put in place for this purpose. Before submitting a new ticket, please ensure you have read [our documentation guides](https://onsdigital.github.io/csvcubed-docs/external/guides/) as well as checked the open issues, just in case your problem is bug related.
2 changes: 1 addition & 1 deletion external-docs/docs/quick-start/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This page is designed to help you build a CSV-W from a properly structured CSV f

## Prerequisites

This page assumes that you have already [installed csvcubed](./installation.md) and have [designed your CSV input](./designing-csv.md). We suggest you follow along with the [example dataset](https://raw.githubusercontent.com/GSS-Cogs/csvcubed-demo/v1.0/sweden_at_eurovision_no_missing.csv). Save this file to your terminal's current working directory.
This page assumes that you have already [installed csvcubed](./installation.md) and have [designed your CSV input](./designing-csv.md). We suggest you follow along with the [example dataset](https://raw.githubusercontent.com/ONSdigital/csvcubed-demo/v1.0/sweden_at_eurovision_no_missing.csv). Save this file to your terminal's current working directory.

## Building a CSV-W

Expand Down
2 changes: 1 addition & 1 deletion external-docs/docs/quick-start/describing-csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ csvcubed makes it straightforward to describe your data. Important information t

This document assumes you have an existing CSV such as the `sweden_at_eurovision_no_missing.csv` data set created as in the [quick start build](./build.md) and have csvcubed installed.

If you don't have the example data set, you can download it [here](https://raw.githubusercontent.com/GSS-Cogs/csvcubed-demo/v1.0/sweden_at_eurovision_no_missing.csv).
If you don't have the example data set, you can download it [here](https://raw.githubusercontent.com/ONSdigital/csvcubed-demo/v1.0/sweden_at_eurovision_no_missing.csv).

## Describing your data set

Expand Down
2 changes: 1 addition & 1 deletion external-docs/docs/quick-start/designing-csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Year,Entrant,Song,Language,Value,Measure,Unit
2008,Charlotte Perrelli,Hero,English,47,Final Points,Unitless
```

You can [download the full CSV](https://raw.githubusercontent.com/GSS-Cogs/csvcubed-demo/v1.0/sweden_at_eurovision_no_missing.csv) from GitHub.
You can [download the full CSV](https://raw.githubusercontent.com/ONSdigital/csvcubed-demo/v1.0/sweden_at_eurovision_no_missing.csv) from GitHub.

## Next

Expand Down
6 changes: 3 additions & 3 deletions external-docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
site_name: csvcubed
site_url: https://gss-cogs.github.io/csvcubed-docs/external
repo_url: https://github.com/GSS-Cogs/csvcubed
repo_name: GSS-Cogs/csvcubed
site_url: https://onsdigital.github.io/csvcubed-docs/external
repo_url: https://github.com/ONSdigital/csvcubed
repo_name: ONSdigital/csvcubed
nav:
- Home:
- index.md
Expand Down
4 changes: 2 additions & 2 deletions src/csvcubed/models/cube/qb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ When mapping a column to a pre-existing code-list or set of attribute values, or

### URI Templates

The URI templates used by the `csv_column_uri_template` property follow the [RFC 6570](https://datatracker.ietf.org/doc/html/rfc6570) standard. The only variable name available within the template URI is the CSV-W column's `name` - this can be deduced by applying the [csvw_column_name_safe](https://github.com/GSS-Cogs/csvcubed/blob/96f37301f7eb056e6048014e4ebfcf5ded37e853/csvcubed/csvcubed/utils/uri.py#L28) transformation to the column's title.
The URI templates used by the `csv_column_uri_template` property follow the [RFC 6570](https://datatracker.ietf.org/doc/html/rfc6570) standard. The only variable name available within the template URI is the CSV-W column's `name` - this can be deduced by applying the [csvw_column_name_safe](https://github.com/ONSdigital/csvcubed/blob/96f37301f7eb056e6048014e4ebfcf5ded37e853/csvcubed/csvcubed/utils/uri.py#L28) transformation to the column's title.

The [csvw_column_name_safe](https://github.com/GSS-Cogs/csvcubed/blob/96f37301f7eb056e6048014e4ebfcf5ded37e853/csvcubed/csvcubed/utils/uri.py#L28) transformation essentialy says to:
The [csvw_column_name_safe](https://github.com/ONSdigital/csvcubed/blob/96f37301f7eb056e6048014e4ebfcf5ded37e853/csvcubed/csvcubed/utils/uri.py#L28) transformation essentialy says to:

* convert the column's title to lower case
* replace any non-alphanumeric characters with `_`
Expand Down
2 changes: 1 addition & 1 deletion src/csvcubed/utils/createlocalcopyresponse.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _get_url_to_file_path_map() -> Dict[str, Path]:
for template_file in template_files:
relative_file_path = str(template_file.relative_to(templates_dir))
github_uri = (
"//raw.githubusercontent.com/GSS-Cogs/csvcubed/main/src/csvcubed/readers/cubeconfig/v1_0/templates/"
"//raw.githubusercontent.com/ONSdigital/csvcubed/main/src/csvcubed/readers/cubeconfig/v1_0/templates/"
+ relative_file_path
)
map_uri_to_file_path[github_uri] = template_file
Expand Down
4 changes: 3 additions & 1 deletion src/csvcubed/utils/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@


def get_csvcubed_version_uri():
version_number = f"https://github.com/GSS-Cogs/csvcubed/releases/tag/v{__version__}"
version_number = (
f"https://github.com/ONSdigital/csvcubed/releases/tag/v{__version__}"
)
return version_number


Expand Down
Loading
Loading