Skip to content

Commit 9aaed90

Browse files
committed
Added some docs and ran black/ruff
1 parent b57a661 commit 9aaed90

File tree

10 files changed

+182
-70
lines changed

10 files changed

+182
-70
lines changed

docs/contributing.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Contributing
2+
3+
The following outlines the process to contribute to meorg_client.
4+
5+
## 1. Clone the repository
6+
7+
```shell
8+
# Create a work space for repos
9+
mkdir -p $HOME/work
10+
11+
# Move into it
12+
cd $HOME/work
13+
14+
# Clone the repo
15+
git clone [email protected]:CABLE-LSM/meorg_client.git
16+
17+
# Move into it
18+
cd meorg_client
19+
```
20+
21+
## 2. Set up the dev environment
22+
23+
```shell
24+
# Create the development environment
25+
conda env create -f .conda/meorg_client_dev.yaml
26+
```
27+
28+
## 3. Install meorg_client in editable mode
29+
30+
```shell
31+
# Install as editable
32+
pip install -e .
33+
```
34+
35+
You can now edit the source code in your editor of choice and have changes immediately reflected in your environment for rapid development.
36+
37+
Please follow the standard contribution guidelines in addressing issues for the project.

docs/releasing.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Releasing
2+
3+
Releases are generated from a stable main as needed to reflect developments and community needs.
4+
5+
Release generation is restricted to project administrators.
6+
7+
Releasing the client involves publishing a tagged release on Github:
8+
1. Go to https://github.com/CABLE-LSM/meorg_client/releases/new
9+
2. Under "Choose a tag", start typing a new release, following SemVer (without leading "v") and click "Create new tag X on publish".
10+
3. Ensure Target is set to "main".
11+
4. Generate release notes if applicable.
12+
5. Enter the tag you set in (2) WITH a leading "v".
13+
6. Edit the release description as needed.
14+
7. Set as the latest release.
15+
8. Click "Publish release".
16+
17+
## Testing the release
18+
19+
To test the release prior to actually releasing the code, you can approximate the build and publication process locally.
20+
21+
```shell
22+
# Move into the repo directory
23+
cd $HOME/work/meorg_client
24+
25+
# Create a build environment
26+
conda env create -n meorg_client_build -f .conda/build_env.yaml
27+
28+
# Activate the environment
29+
conda activate meorg_client_build
30+
31+
# Build the project
32+
conda build .
33+
34+
# If it worked, install the local package
35+
conda install --use-local meorg_client
36+
```
37+
38+
The build should exit immediately upon failure, however, there may be silent errors that can occur, such as no version number on either the pip or conda package (see the logs and look for "None" or "0.0.0" in build artefacts). In this case, there would be a failure in the upload to anaconda.org in the Github Action.
39+
40+
Most users will generally not need to test the build and release process for typical development tasks.

meorg_client/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
"""Root init file."""
2+
23
from . import _version
3-
__version__ = _version.get_versions()['version']
4+
5+
__version__ = _version.get_versions()["version"]

0 commit comments

Comments
 (0)