Skip to content

Commit e67e84a

Browse files
committed
better publishing
1 parent 4d165c0 commit e67e84a

5 files changed

Lines changed: 26 additions & 6 deletions

File tree

CONTRIBUTING.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,31 @@
175175

176176
# Publishing
177177
Dependencies: `gcc patchelf` and `build twine auditwheel`
178-
Ensure before publishing the working tree is public under `master`.
179178

179+
## Cleanup sources
180180
```sh
181+
./scripts/utils/run_formatter.sh pydtnn
182+
git add .
183+
git commit -m 'format codebase'
184+
git push
185+
```
186+
187+
## Publish sources
188+
```sh
189+
git checkout master
190+
git merge develop
191+
git checkout master
192+
```
193+
194+
### Build distribution
195+
```sh
196+
rm -rf ./build/
181197
python -m build --outdir ./build/ --sdist
182198
python -m build --outdir ./build/wheel/ --wheel
183199
python -m auditwheel repair --wheel-dir ./build/ ./build/wheel/*.whl
200+
```
201+
202+
### Publish distribution
203+
```sh
184204
python -m twine upload --repository pypi ./build/pydtnn-*
185205
```

pydtnn/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
"""PyDTNN environment initialization"""
22

33
import atexit
4-
from datetime import datetime
54
import logging
65
import os
76
import platform
87
import subprocess
98
from collections import Counter
9+
from datetime import datetime
1010
from types import ModuleType
1111

1212
logger = logging.getLogger(__name__)

pydtnn/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import yaml
1818

19-
from pydtnn import utils, timestamp
19+
from pydtnn import timestamp, utils
2020
from pydtnn.utils.debug import traceback_context
2121
from pydtnn.utils.serial import NumpyYaml
2222

pydtnn/utils/debug.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
from contextlib import contextmanager
21
import functools
32
import inspect
43
import logging
54
import os
6-
from pathlib import Path
75
import threading
6+
from contextlib import contextmanager
7+
from pathlib import Path
88
from traceback import TracebackException
99

1010
from pydtnn import timestamp

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pydtnn"
3-
version = "3.7.1"
3+
version = "3.7.2"
44
description = "Python Distributed Training of Neural Networks"
55
readme = "README.md"
66
license = "GPL-3.0-or-later"

0 commit comments

Comments
 (0)