@@ -7,7 +7,7 @@ maps and metrics.
7
7
NOTE: THIS PACKAGE IS UNDER ACTIVE DEVELOPMENT AND NOT CURRENTLY
8
8
FUNCTIONING. BREAKING CHANGES ARE OFTEN INTRODUCED.
9
9
10
- ![ alt text] ( ./images/ExampleWorkflow.png )
10
+ ![ alt text] ( ../../docs /images/ExampleWorkflow.png )
11
11
12
12
# Installation
13
13
@@ -21,18 +21,18 @@ To use this package:
21
21
22
22
## Standards
23
23
24
- - Python 3.10 or higher
25
- - [ Numpy Style Docstrings] ( https://numpydoc.readthedocs.io/en/v1.1.0/format.html#documenting-modules )
26
- - [ Python Type Hints] ( https://docs.python.org/3/library/typing.html )
27
- - [ PEP8] ( https://pep8.org/ ) Styling (and
28
- [ this] ( https://peps.python.org/pep-0008/ ) )
24
+ - Python 3.10 or higher
25
+ - [ Numpy Style Docstrings] ( https://numpydoc.readthedocs.io/en/v1.1.0/format.html#documenting-modules )
26
+ - [ Python Type Hints] ( https://docs.python.org/3/library/typing.html )
27
+ - [ PEP8] ( https://pep8.org/ ) Styling (and
28
+ [ this] ( https://peps.python.org/pep-0008/ ) )
29
29
30
30
## Code Dependencies
31
31
32
- - [ rioxarray] ( https://corteva.github.io/rioxarray/html/index.html )
33
- - [ geopandas] ( https://geopandas.org/en/stable/ )
34
- - [ dask] ( https://www.dask.org )
35
- - [ xarray-spatial] ( https://xarray-spatial.org )
32
+ - [ rioxarray] ( https://corteva.github.io/rioxarray/html/index.html )
33
+ - [ geopandas] ( https://geopandas.org/en/stable/ )
34
+ - [ dask] ( https://www.dask.org )
35
+ - [ xarray-spatial] ( https://xarray-spatial.org )
36
36
37
37
# Contributing
38
38
@@ -44,8 +44,8 @@ To use this package:
44
44
45
45
There are two primary ways to help:
46
46
47
- - Using the issue tracker, and
48
- - Changing the code-base.
47
+ - Using the issue tracker, and
48
+ - Changing the code-base.
49
49
50
50
## Using the issue tracker
51
51
@@ -67,7 +67,7 @@ stylistic and architectural guidelines prescribed by the project. In the
67
67
absence of such guidelines, mimic the styles and patterns in the
68
68
existing code-base.
69
69
70
- ![ alt text] ( ./images/ContributionGraphic.png )
70
+ ![ alt text] ( ../../docs /images/ContributionGraphic.png )
71
71
72
72
### Guidelines
73
73
@@ -87,34 +87,33 @@ If you would like to contribute, please follow the following steps:
87
87
88
88
## Tooling Dependencies
89
89
90
- - Code Checking with [ Flake8] ( https://github.com/PyCQA/flake8 )
91
- - Combines PyFlakes, pycodestyle, and others for linting and style
92
- checking.
93
- - For autoformatting:
94
- [ flake8-black] ( https://pypi.org/project/flake8-black/ )
95
- - Testing with
96
- [ PyTest] ( https://docs.pytest.org/en/7.1.x/contents.html )
97
- - For timed tests:
98
- [ pytest-benchmark] ( https://pypi.org/project/pytest-benchmark/ )
99
- - For code coverage:
100
- [ pytest-cov] ( https://pypi.org/project/pytest-cov/ )
101
- - Profiling
102
- - [ yappi] ( https://github.com/sumerc/yappi/ )
103
- - For memory profiling: [ memray] ( https://pypi.org/project/memray/ )
104
- - Dask memory profiling:
105
- [ dask-memusage] ( https://github.com/itamarst/dask-memusage )
106
- - Dependencies and Packaging
107
- - [ pip] ( https://packaging.python.org/en/latest/key_projects/#pip )
108
- - Docker
109
- - Distribution
110
- - [ PyPI] ( https://pypi.org/ )
111
- - DockerHub
112
- - GitHub (source, packaging, and images)
113
- - Docs
114
- - [ Sphinx] ( https://www.sphinx-doc.org/ )
115
- - [ pandoc] ( https://pypi.org/project/pandoc/ )
116
- - [ ReadTheDocs] ( https://readthedocs.org/ )
117
- - [ Jupyter] ( https://pypi.org/project/jupyter/ )
90
+ - Code Checking with [ Flake8] ( https://github.com/PyCQA/flake8 )
91
+ - Combines PyFlakes, pycodestyle, and others for linting and style
92
+ checking.
93
+ - For autoformatting:
94
+ [ flake8-black] ( https://pypi.org/project/flake8-black/ )
95
+ - Testing with [ PyTest] ( https://docs.pytest.org/en/7.1.x/contents.html )
96
+ - For timed tests:
97
+ [ pytest-benchmark] ( https://pypi.org/project/pytest-benchmark/ )
98
+ - For code coverage:
99
+ [ pytest-cov] ( https://pypi.org/project/pytest-cov/ )
100
+ - Profiling
101
+ - [ yappi] ( https://github.com/sumerc/yappi/ )
102
+ - For memory profiling: [ memray] ( https://pypi.org/project/memray/ )
103
+ - Dask memory profiling:
104
+ [ dask-memusage] ( https://github.com/itamarst/dask-memusage )
105
+ - Dependencies and Packaging
106
+ - [ pip] ( https://packaging.python.org/en/latest/key_projects/#pip )
107
+ - Docker
108
+ - Distribution
109
+ - [ PyPI] ( https://pypi.org/ )
110
+ - DockerHub
111
+ - GitHub (source, packaging, and images)
112
+ - Docs
113
+ - [ Sphinx] ( https://www.sphinx-doc.org/ )
114
+ - [ pandoc] ( https://pypi.org/project/pandoc/ )
115
+ - [ ReadTheDocs] ( https://readthedocs.org/ )
116
+ - [ Jupyter] ( https://pypi.org/project/jupyter/ )
118
117
119
118
## Development Installation
120
119
@@ -125,68 +124,62 @@ choice.)
125
124
126
125
First setup docker instance and in the root directory of the project:
127
126
128
- ` [sudo] docker build -t gval-image --target development . `
127
+ ` [sudo] docker build -t gval-image --target development . `
129
128
130
129
The default user named 'user' with UID 1001 is created. To use the same
131
130
user and permissions you currently have on your machine override with
132
131
build arguments:
133
132
134
- `[ sudo] docker build -t gval-image --build-arg UID=$(id -u) --target
135
- development .`
133
+ ` [sudo] docker build -t gval-image --build-arg UID=$(id -u) --target development . `
136
134
137
135
Standard run examples from the command line (standard, or overriding
138
136
user with root):
139
137
140
- - `[ sudo] docker run -v $(pwd):/home/user/gval --name gval-python
141
- gval-image`
142
- - `[ sudo] docker run -v $(pwd):/home/user/gval --user root --name
143
- gval-python gval-image`
138
+ - ` [sudo] docker run -v $(pwd):/home/user/gval --name gval-python gval-image `
139
+ - ` [sudo] docker run -v $(pwd):/home/user/gval --user root --name gval-python gval-image `
144
140
145
141
If given access keys for retrieving test data you can mount the volume
146
142
as such:
147
143
148
- `[ sudo] docker run -v ~ /.aws:/home/user/.aws -v $(pwd):/home/user/gval
149
- --name gval-python gval-image`
144
+ ` [sudo] docker run -v ~/.aws:/home/user/.aws -v $(pwd):/home/user/gval --name gval-python gval-image `
150
145
151
146
To keep your container running, try adding ` tail -f /dev/null ` as your
152
147
command ensuring to detach with ` -d ` :
153
148
154
- - `[ sudo] docker run -d -v $(pwd):/home/user/gval --name gval-python
155
- gval-image tail -f /dev/null`
149
+ - ` [sudo] docker run -d -v $(pwd):/home/user/gval --name gval-python gval-image tail -f /dev/null `
156
150
157
151
You can also set up your IDE to run this docker image directly:
158
152
159
- - [ PyCharm] ( https://www.jetbrains.com/help/pycharm/using-docker-as-a-remote-interpreter.html#config-docker )
160
- - [ Visual Studio
161
- Code] ( https://code.visualstudio.com/docs/containers/quickstart-python )
153
+ - [ PyCharm] ( https://www.jetbrains.com/help/pycharm/using-docker-as-a-remote-interpreter.html#config-docker )
154
+ - [ Visual Studio
155
+ Code] ( https://code.visualstudio.com/docs/containers/quickstart-python )
162
156
163
157
If the container already exists you can start as follows:
164
158
165
159
` [sudo] docker start gval-python `
166
160
167
- To enter the container interactively: ` [ sudo ] docker exec gval-python
168
- bash`
161
+ To enter the container interactively:
162
+ ` [sudo] docker exec gval-python bash`
169
163
170
164
## Packaging
171
165
172
166
To build the gval package and install locally:
173
167
174
- - In the root directory install the gVal package:
168
+ - In the root directory install the gVal package:
175
169
176
- ` python -m build && pip install dist/*.whl --force-reinstall `
170
+ ` python -m build && pip install dist/*.whl --force-reinstall `
177
171
178
- - Or on Windows replacing version number with current version number:
172
+ - Or on Windows replacing version number with current version number:
179
173
180
- ` py -m build ` then get the name of the wheel in the dist directory,
181
- e.g.:
174
+ ` py -m build ` then get the name of the wheel in the dist directory,
175
+ e.g.:
182
176
183
- ` pip install dist/gval-0.0.1-py3-none-any.whl --force-reinstall `
177
+ ` pip install dist/gval-0.0.1-py3-none-any.whl --force-reinstall `
184
178
185
179
The packaging process using docker container would look as follows (on
186
180
linux):
187
181
188
- `sudo docker exec -v $(pwd):/home/user/ --user root python -m build &&
189
- pip install dist/* .whl --force-reinstall`
182
+ ` sudo docker exec -v $(pwd):/home/user/ --user root python -m build && pip install dist/*.whl --force-reinstall `
190
183
191
184
# Citation
192
185
0 commit comments