From 748e08219835f0f908a469f1521fde507d1794b8 Mon Sep 17 00:00:00 2001 From: Bryn Pickering <17178478+brynpickering@users.noreply.github.com> Date: Fri, 29 Sep 2023 17:21:27 +0100 Subject: [PATCH] Post-release updates & fixes --- .github/workflows/pre-release.yml | 6 ++++++ .github/workflows/release.yml | 8 ++++++++ CHANGELOG.md | 15 +++++++++++++++ README.md | 12 +++++++----- docs/installation.md | 19 +++++++++++-------- pam/__init__.py | 2 +- requirements/base.txt | 1 + 7 files changed, 49 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index ed330122..aa122e2d 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -9,5 +9,11 @@ jobs: conda-build: uses: arup-group/actions-city-modelling-lab/.github/workflows/conda-build.yml@main secrets: inherit + with: + package_name: cml-pam + + pip-build: + uses: arup-group/actions-city-modelling-lab/.github/workflows/pip-build.yml@main + secrets: inherit with: package_name: cml-pam \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 35b90f74..ee4edd55 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,14 @@ jobs: secrets: inherit with: package_name: cml-pam + build_workflow: pre-release.yml + + pip-upload: + uses: arup-group/actions-city-modelling-lab/.github/workflows/pip-upload.yml@main + secrets: inherit + with: + package_name: cml-pam + build_workflow: pre-release.yml docs-stable: permissions: diff --git a/CHANGELOG.md b/CHANGELOG.md index f6e211d1..d3e4a991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- **internal** conda upload CI script. + +### Added + +- **internal** PyPI build and upload CI scripts (triggered on tagging and releasing new versions). + +### Changed + +- User install instructions to prefer direct install from mamba (or PyPI if a user is willing to deal with installing non-python libs themselves). + ## [v0.3.0] - 2023-09-27 ### Fixed @@ -95,6 +109,7 @@ This version is a pre-release This is the first version of PAM which follows semantic versioning and can be considered the first _official_ release of the package. +[Unreleased]: https://github.com/arup-group/pam/compare/v0.3.0...main [v0.3.0]: https://github.com/arup-group/pam/compare/v0.2.4...v0.3.0 [v0.2.4]: https://github.com/arup-group/pam/compare/v0.2.3...v0.2.4 [v0.2.3]: https://github.com/arup-group/pam/compare/v0.2.2...v0.2.3 diff --git a/README.md b/README.md index a2a03674..b5e1881d 100644 --- a/README.md +++ b/README.md @@ -65,11 +65,8 @@ To install PAM, we recommend using the [mamba](https://mamba.readthedocs.io/en/l ### As a user ``` shell -git clone git@github.com:arup-group/pam.git -cd pam -mamba create -n pam -c conda-forge -c city-modelling-lab --file requirements/base.txt +mamba create -n pam -c conda-forge -c city-modelling-lab cml-pam mamba activate pam -pip install --no-deps . ``` ### As a developer @@ -82,6 +79,11 @@ mamba activate pam pip install --no-deps -e . ``` + +### Installing with pip + +Installing directly with pip as a user (`pip install cml-pam`) or as a developer (`pip install -e '.[dev]'`) is also possible, but you will need the `libgdal` & `libspatialindex` geospatial non-python libraries pre-installed. + For more detailed instructions, see our [documentation](https://arup-group.github.io/pam/latest/installation/). ## Contributing @@ -111,4 +113,4 @@ mike deploy 0.2 mike serve ``` -Then you can view the documentation in a browser at http://localhost:8000/. \ No newline at end of file +Then you can view the documentation in a browser at . diff --git a/docs/installation.md b/docs/installation.md index 718fa24b..5593a6af 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -7,27 +7,29 @@ As a PAM user, it is easiest to install PAM using the [mamba](https://mamba.read 1. Install mamba with the [Mambaforge](https://github.com/conda-forge/miniforge#mambaforge) executable for your operating system. 2. Open the command line (or the "miniforge prompt" in Windows). -3. Download (a.k.a., clone) the PAM repository: `git clone git@github.com:arup-group/pam.git` -4. Change into the `pam` directory: `cd pam` -5. Create the PAM mamba environment: `mamba create -n pam -c conda-forge -c city-modelling-lab --file requirements/base.txt` -6. Activate the PAM mamba environment: `mamba activate pam` -7. Install the PAM package into the environment, ignoring dependencies (we have dealt with those when creating the mamba environment): `pip install --no-deps .` +3. Create the PAM mamba environment and install `cml-pam` into it: `mamba create -n pam -c conda-forge -c city-modelling-lab cml-pam` +4. Activate the PAM mamba environment: `mamba activate pam` All together: --8<-- "README.md:docs-install-user" We do not recommend trying to install PAM directly with pip (e.g. in a virtual environment) as you need to first install underlying native geospatial libraries, the method for which differs by operating system. -If you choose to install into a virtual environment, ensure you have `libgdal` and `libspatialindex` installed on your device before installing with pip. +If you choose to install into a virtual environment, ensure you have `libgdal` and `libspatialindex` installed on your device before installing with pip: + +``` bash +pip install cml-pam +``` ### Running the example notebooks + If you have followed the non-developer installation instructions above, you will need to install `jupyter` into your `pam` environment to run the [example notebooks](https://github.com/arup-group/pam/tree/main/examples): ``` shell mamba install -n pam jupyter ``` -With Jupyter installed, it's easiest to then add the environment as a jupyter kernel: +With Jupyter installed, it's easiest to then add the environment as a jupyter kernel: ``` shell mamba activate pam @@ -36,10 +38,11 @@ jupyter notebook ``` ### Choosing a different environment name + If you would like to use a different name to `pam` for your mamba environment, the installation becomes (where `[my-env-name]` is your preferred name for the environment): ``` shell -mamba create -n [my-env-name] -c conda-forge -c city-modelling-lab --file requirements/base.txt +mamba create -n [my-env-name] -c conda-forge -c city-modelling-lab cml-pam mamba activate [my-env-name] ipython kernel install --user --name=[my-env-name] ``` diff --git a/pam/__init__.py b/pam/__init__.py index 903fe5c5..7b2a87e0 100644 --- a/pam/__init__.py +++ b/pam/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.3.0" +__version__ = "0.3.1.dev" class PAMValidationError(Exception): diff --git a/requirements/base.txt b/requirements/base.txt index cf5bfa6f..a1be6dd0 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,6 +1,7 @@ click < 9 gdal < 3.6 geopandas >= 0.13, < 0.14 +importlib_resources >= 6, < 7 ipykernel < 7 lxml < 5 matplotlib >= 3, < 4