Skip to content

Commit

Permalink
build: use poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
MDavidson17 committed Sep 12, 2024
1 parent c61290f commit 4d1651b
Show file tree
Hide file tree
Showing 7 changed files with 713 additions and 58 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade setuptools
pip install --upgrade poetry
- name: Install
run: |
python setup.py install
poetry install
- name: Run tests
run: |
cd tests
python -m unittest tests
poetry run python -m unittest tests
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ the key is to be assigned to must be `LDS_APIKEY=<lds_apikey>`
### Execute metadata_update.py
Once the config.yaml file has been updated simply run

```metadata_updater``` (if installed via the recommended setup.py method)
```poetry shell```

```metadata_updater```

### Output

Expand Down
14 changes: 4 additions & 10 deletions metadata_updater/INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Installation instructions

## Requirements
* **Linux** - Operating System. In theory works with others OSs but not tested
* **Git** - Source code storage and versioning
* **Python 3** - Programming language. Version > 3.2 required
* **setuptools** - download, build, install, upgrade, and uninstall Python packages
* **Python 3** - Programming language. Version > 3.9 required
* **Poetry** - [Python packaging and dependency](https://python-poetry.org/)


### Get source code
Expand All @@ -20,11 +19,6 @@ change to git dir
Clone lds-metadata-updater project
* `git clone https://github.com/linz/lds-metadata-updater.git`

### Install metadata_updater package

### Setup.py

ensure you are in the lds-metadata-updater project directiry
* `cd ~/git/lds-metadata-updater`

install metadata_updaer and its dependencies see (requirements.txt)[requirements.txt])
* `python3 setup.py install`
`poetry install`
682 changes: 682 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[tool.poetry]
name = "metadata_updater"
version = "0.0.dev0"
description = "Edit Data Service metadata"
authors = [
"Megan Davidson <[email protected]>",
"Elvira Cheng <[email protected]>",
"Ian Harrison <[email protected]>",
"Pooja Khosla <[email protected]>"
]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.9"
requests = ">=2.18.4"
PyYAML = ">=3.12"
koordinates = ">=0.4.1"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

41 changes: 0 additions & 41 deletions setup.py

This file was deleted.

0 comments on commit 4d1651b

Please sign in to comment.