Skip to content

Commit a770f2d

Browse files
committed
migrate to hatch
1 parent 182a5c6 commit a770f2d

11 files changed

+118
-66
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 0.0.10 - 2024-07-04
2+
3+
- Migrate to hatch to ease development and include multiple authors.
4+
- Add @johnarevalo to the author list.
5+
16
# 0.0.9 - 2022-11-23
27

38
- Stop excluding `README.md` from the build, because setup.py depends on this

CONTRIBUTING.md

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
We use [hatch] to develop harmonypy.
2+
3+
Copy the harmonypy code to your computer:
4+
5+
```
6+
git clone https://github.com/slowkow/harmonpy
7+
```
8+
9+
Then change to the newly created directory:
10+
11+
```
12+
cd harmonypy
13+
```
14+
15+
Install hatch:
16+
17+
```
18+
pipx install hatch
19+
```
20+
21+
Create a new environment just for harmonypy:
22+
23+
```
24+
hatch env create
25+
```
26+
27+
Once we have hatch and an environment, then we can enter a new shell:
28+
29+
```
30+
hatch shell
31+
```
32+
33+
In this environment, we can run tests:
34+
35+
```
36+
hatch test
37+
```
38+
39+
And we can also build the files needed for PyPI:
40+
41+
```
42+
hatch build
43+
```
44+
45+
We should double-check that the contents of the `.tar.gz` file do not include any files we do not want to publish:
46+
47+
```
48+
tar tvf dist/harmonypy-0.0.10.tar.gz
49+
-rw-r--r-- 0 0 0 97 Feb 1 2020 harmonypy-0.0.10/harmonypy/__init__.py
50+
-rw-r--r-- 0 0 0 12783 Feb 1 2020 harmonypy-0.0.10/harmonypy/harmony.py
51+
-rw-r--r-- 0 0 0 4559 Feb 1 2020 harmonypy-0.0.10/harmonypy/lisi.py
52+
-rw-r--r-- 0 0 0 1824 Feb 1 2020 harmonypy-0.0.10/.gitignore
53+
-rw-r--r-- 0 0 0 35149 Feb 1 2020 harmonypy-0.0.10/LICENSE
54+
-rw-r--r-- 0 0 0 3126 Feb 1 2020 harmonypy-0.0.10/README.md
55+
-rw-r--r-- 0 0 0 1026 Feb 1 2020 harmonypy-0.0.10/pyproject.toml
56+
```
57+
58+
When we're ready, we can publish to PyPI:
59+
60+
```
61+
hatch publish
62+
```
63+
64+
[hatch]: https://hatch.pypa.io
65+

MANIFEST.in

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
include README.md
22
prune data*
33
prune tests*
4-
exclude publish_to_pypi.md
54
exclude MANIFEST.in
6-
exclude Makefile

Makefile

-11
This file was deleted.

harmonypy/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
from .harmony import Harmony, run_harmony
22
from .lisi import compute_lisi
3-
from .version import __version__
3+
4+
__version__ = '0.0.10'

harmonypy/version.py

-1
This file was deleted.

publish_to_pypi.md

-17
This file was deleted.

pyproject.toml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "harmonypy"
7+
dynamic = ["version"]
8+
description = "A data integration algorithm."
9+
readme = "README.md"
10+
license = ""
11+
requires-python = ">=3.6"
12+
authors = [
13+
{ name = "Kamil Slowikowski", email = "[email protected]" },
14+
{ name = "John Arevalo" }
15+
]
16+
classifiers = [
17+
"Development Status :: 3 - Alpha",
18+
"Intended Audience :: Science/Research",
19+
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
20+
"Natural Language :: English",
21+
"Operating System :: OS Independent",
22+
"Programming Language :: Python :: 3",
23+
"Topic :: Scientific/Engineering :: Bio-Informatics",
24+
]
25+
dependencies = [
26+
"numpy",
27+
"pandas",
28+
"scikit-learn",
29+
"scipy",
30+
]
31+
32+
[project.urls]
33+
Homepage = "https://github.com/slowkow/harmonypy"
34+
35+
[tool.hatch.version]
36+
path = "harmonypy/__init__.py"
37+
38+
[tool.hatch.build.targets.sdist]
39+
include = [
40+
"/harmonypy",
41+
]
42+
43+
[tool.hatch.envs.test]
44+
dependencies = [
45+
"pytest"
46+
]

requirements.txt

-4
This file was deleted.

setup.py

-30
This file was deleted.

tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)