Skip to content

Commit

Permalink
Merge pull request #261 from arup-group/fixes-post-release
Browse files Browse the repository at this point in the history
Post-release updates & fixes
  • Loading branch information
Theodore-Chatziioannou authored Oct 2, 2023
2 parents 1b00bfa + 748e082 commit 8dcdd0f
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,8 @@ To install PAM, we recommend using the [mamba](https://mamba.readthedocs.io/en/l
### As a user
<!--- --8<-- [start:docs-install-user] -->
``` shell
git clone [email protected]: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 .
```
<!--- --8<-- [end:docs-install-user] -->
### As a developer
Expand All @@ -82,6 +79,11 @@ mamba activate pam
pip install --no-deps -e .
```
<!--- --8<-- [end:docs-install-dev] -->

### 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
Expand Down Expand Up @@ -111,4 +113,4 @@ mike deploy 0.2
mike serve
```

Then you can view the documentation in a browser at http://localhost:8000/.
Then you can view the documentation in a browser at <http://localhost:8000/>.
19 changes: 11 additions & 8 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]: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
Expand All @@ -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]
```
Expand Down
2 changes: 1 addition & 1 deletion pam/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.3.0"
__version__ = "0.3.1.dev"


class PAMValidationError(Exception):
Expand Down
1 change: 1 addition & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 8dcdd0f

Please sign in to comment.