4
4
5
5
SDK for kilroy modules using PyTorch 🧰
6
6
7
- [ ![ Tests] ( https://github.com/kilroybot/kilroy-module-pytorch-py-sdk/actions/workflows/test-multiplatform.yml/badge.svg )] ( https://github.com/kilroybot/kilroy-module-pytorch-py-sdk/actions/workflows/test-multiplatform.yml )
8
- [ ![ Docs] ( https://github.com/kilroybot/kilroy-module-pytorch-py-sdk/actions/workflows/docs.yml/badge.svg )] ( https://github.com/kilroybot/kilroy-module-pytorch-py-sdk/actions/workflows/docs.yml )
7
+ [ ![ Lint] ( https://github.com/kilroybot/kilroy-module-pytorch-py-sdk/actions/workflows/lint.yaml/badge.svg )] ( https://github.com/kilroybot/kilroy-module-pytorch-py-sdk/actions/workflows/lint.yaml )
8
+ [ ![ Tests] ( https://github.com/kilroybot/kilroy-module-pytorch-py-sdk/actions/workflows/test-multiplatform.yaml/badge.svg )] ( https://github.com/kilroybot/kilroy-module-pytorch-py-sdk/actions/workflows/test-multiplatform.yaml )
9
+ [ ![ Docs] ( https://github.com/kilroybot/kilroy-module-pytorch-py-sdk/actions/workflows/docs.yaml/badge.svg )] ( https://github.com/kilroybot/kilroy-module-pytorch-py-sdk/actions/workflows/docs.yaml )
9
10
10
11
</div >
11
12
@@ -27,10 +28,10 @@ $ curl -sSL https://repo.anaconda.com/miniconda/Miniconda3-py39_4.10.3-Linux-x86
27
28
$ bash miniconda.sh && exec bash
28
29
(base) $ git clone https://github.com/kilroybot/kilroy-module-pytorch-py-sdk
29
30
(base) $ cd kilroy_module_pytorch_py_sdk
30
- (base) $ conda env create -f environment.yml
31
+ (base) $ conda env create -f environment.yaml
31
32
(base) $ conda activate kilroy-module-pytorch-py-sdk
32
33
(kilroy-module-pytorch-py-sdk) $ cd kilroy_module_pytorch_py_sdk
33
- (kilroy-module-pytorch-py-sdk) $ poetry install --extras dev
34
+ (kilroy-module-pytorch-py-sdk) $ poetry install --sync
34
35
```
35
36
36
37
## Quickerstart
@@ -54,7 +55,7 @@ The first step is of course to install [`conda`](https://conda.io).
54
55
To create an environment, run from project root:
55
56
56
57
``` sh
57
- conda env create -f environment.yml
58
+ conda env create -f environment.yaml
58
59
```
59
60
60
61
And then activate it by:
@@ -66,11 +67,11 @@ conda activate kilroy-module-pytorch-py-sdk
66
67
Creating the environment is performed only once, but you need to activate it
67
68
every time you start a new shell.
68
69
69
- If the configuration file ` environment.yml ` changes, you can update the
70
+ If the configuration file ` environment.yaml ` changes, you can update the
70
71
environment by:
71
72
72
73
``` sh
73
- conda env update -f environment.yml
74
+ conda env update -f environment.yaml
74
75
```
75
76
76
77
## Package management
@@ -83,12 +84,11 @@ To install the package, you need to `cd`
83
84
into ` kilroy_module_pytorch_py_sdk ` directory and run:
84
85
85
86
``` sh
86
- poetry install --extras dev --remove-untracked
87
+ poetry install --sync
87
88
```
88
89
89
- This will download and install all package dependencies (including optional
90
- development ones) and install the package in editable mode into the activated
91
- environment.
90
+ This will download and install all package dependencies (including development
91
+ ones) and install the package in editable mode into the activated environment.
92
92
93
93
Editable mode means that you don't have to reinstall the package if you change
94
94
something in the code. The changes are reflected automatically.
@@ -108,10 +108,10 @@ We are using [`pytest`](https://pytest.org) for tests. It's already installed
108
108
in the environment, because it's a development-time dependency. To start first
109
109
write the tests and put them in ` kilroy_module_pytorch_py_sdk/tests ` .
110
110
111
- To execute the tests, run from project root :
111
+ To execute the tests, ` cd ` into ` kilroy_module_pytorch_py_sdk ` and run :
112
112
113
113
``` sh
114
- pytest kilroy_module_pytorch_py_sdk
114
+ poe test
115
115
```
116
116
117
117
## Building docs
@@ -124,14 +124,14 @@ creates a nice webpage for them.
124
124
Docs should be placed in ` kilroy_module_pytorch_py_sdk/docs/docs ` . They
125
125
are pretty straightforward to write.
126
126
127
- To build the docs,
128
- ` cd ` into ` kilroy_module_pytorch_py_sdk/docs ` and run:
127
+ To build and serve the docs,
128
+ ` cd ` into ` kilroy_module_pytorch_py_sdk ` and run:
129
129
130
130
``` sh
131
- mkdocs build
131
+ poe docs
132
132
```
133
133
134
- It will generate ` site ` directory with the webpage source.
134
+ It will generate ` site ` directory with the webpage source and serve it .
135
135
136
136
## Adding new dependencies
137
137
@@ -144,7 +144,7 @@ After that update the installation by running
144
144
from ` kilroy_module_pytorch_py_sdk ` directory:
145
145
146
146
``` sh
147
- poetry update
147
+ poe update
148
148
```
149
149
150
150
This will install anything new in your environment and update the ` poetry.lock `
@@ -172,8 +172,8 @@ it means the commit broke something (or workflows themselves are broken).
172
172
173
173
Every time you merge a pull request into main, a draft release is automatically
174
174
updated, adding the pull request to changelog. Changes can be categorized by
175
- using labels. You can configure that in ` .github/release-drafter.yml ` file.
175
+ using labels. You can configure that in ` .github/release-drafter.yaml ` file.
176
176
177
- Every time you publish a release the package is uploaded to PyPI
178
- with version taken from release tag
177
+ Every time you publish a release the package is uploaded to PyPI
178
+ with version taken from release tag
179
179
(you should store your PyPI token in ` PYPI_TOKEN ` secret).
0 commit comments