Skip to content
Merged
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
9 changes: 0 additions & 9 deletions .github/actionlint.yaml

This file was deleted.

58 changes: 2 additions & 56 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ on:

jobs:
lint:
# Mints a dfo-reader token, which prod keeps only in main-limited
# environments, so this runs in ONEcampaign only. The identical tree
# ran it here before it was synced.
if: github.repository_owner == 'ONEcampaign' && github.event.pull_request.draft != true
if: github.event.pull_request.draft != true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
Expand All @@ -35,29 +32,6 @@ jobs:
- name: Set up Python 3.13
run: uv python install '3.13'

# Temporary: dfo-ontology is a private repository, so uv cannot resolve the
# git dependency with the token a workflow is given. The lockfile pins it in
# ONEcampaign, so the token is read-only on that repository whichever
# organisation runs this. Rewriting the URL rather than depending over ssh
# keeps the dependency installable locally as it is declared, and narrowing
# it to ONEcampaign keeps the token off every other fetch. Remove these two
# steps once the repository is public.
- name: Mint a read-only token for dfo-ontology
id: reader
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.READER_APP_CLIENT_ID }}
private-key: ${{ secrets.READER_APP_PRIVATE_KEY }}
owner: ONEcampaign
repositories: dfo-ontology
permission-contents: read

- name: Authenticate to private repositories
run: >
git config --global
url."https://x-access-token:${{ steps.reader.outputs.token }}@github.com/ONEcampaign/".insteadOf
"https://github.com/ONEcampaign/"

- name: Install dependencies
run: uv sync --frozen

Expand All @@ -82,10 +56,7 @@ jobs:


test:
# Mints a dfo-reader token, which prod keeps only in main-limited
# environments, so this runs in ONEcampaign only. The identical tree
# ran it here before it was synced.
if: github.repository_owner == 'ONEcampaign' && github.event.pull_request.draft != true
if: github.event.pull_request.draft != true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
Expand All @@ -104,29 +75,6 @@ jobs:
- name: Set up Python 3.13
run: uv python install '3.13'

# Temporary: dfo-ontology is a private repository, so uv cannot resolve the
# git dependency with the token a workflow is given. The lockfile pins it in
# ONEcampaign, so the token is read-only on that repository whichever
# organisation runs this. Rewriting the URL rather than depending over ssh
# keeps the dependency installable locally as it is declared, and narrowing
# it to ONEcampaign keeps the token off every other fetch. Remove these two
# steps once the repository is public.
- name: Mint a read-only token for dfo-ontology
id: reader
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.READER_APP_CLIENT_ID }}
private-key: ${{ secrets.READER_APP_PRIVATE_KEY }}
owner: ONEcampaign
repositories: dfo-ontology
permission-contents: read

- name: Authenticate to private repositories
run: >
git config --global
url."https://x-access-token:${{ steps.reader.outputs.token }}@github.com/ONEcampaign/".insteadOf
"https://github.com/ONEcampaign/"

- name: Install dependencies
run: uv sync --frozen

Expand All @@ -152,8 +100,6 @@ jobs:
run: uv run pytest --cov='src/dfo_pipelines' --cov-report=xml --cov-report=term

- name: Upload coverage
# Coverage reports to ONEcampaign's Codecov project only.
if: github.repository_owner == 'ONEcampaign'
uses: codecov/codecov-action@v6
with:
files: ./coverage.xml
45 changes: 0 additions & 45 deletions .github/workflows/sync-guard.yml

This file was deleted.

3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ Data pipelines for the [Development Finance Observatory](https://developmentfina

This project uses [uv](https://docs.astral.sh/uv/) for dependency management. Install uv first, and `uv sync` installs the Python version the project needs along with its dependencies. `dbt deps` then installs the dbt packages the models use.

> [!IMPORTANT]
> One dependency, `dfo-ontology`, is installed from a repository that is not yet public, so `uv sync` only succeeds with access to it.

```bash
uv sync
uv run dbt deps --project-dir dbt --profiles-dir dbt
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies = [
"universal-pathlib>=0.3.10",
"pandas>=3.0.5",
"imf-reader>=2.2.0",
"dcp-tools>=1.0.0a5",
"dcp-tools>=1.0.1",
"dfo-ontology",
"oda-data==2.8.1",
"pyyaml>=6.0",
Expand Down Expand Up @@ -158,4 +158,4 @@ show_missing = true
precision = 2

[tool.uv.sources]
dfo-ontology = { git = "https://github.com/ONEcampaign/dfo-ontology", rev = "v0.2.1" }
dfo-ontology = { git = "https://github.com/DevelopmentFinanceObservatory/ontology", rev = "617bdb685e79022494132ef3614674c232b395fc" }
12 changes: 6 additions & 6 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading