Skip to content

Commit cd7790b

Browse files
committed
ci: Add GitLab CI and PyPI deployment
1 parent 00c2dfd commit cd7790b

File tree

2 files changed

+54
-5
lines changed

2 files changed

+54
-5
lines changed

.gitlab-ci.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
image: "python:3.10"
2+
3+
stages:
4+
- test
5+
- deploy
6+
7+
variables:
8+
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.pip-cache"
9+
10+
cache:
11+
paths:
12+
- .pip-cache/
13+
14+
.before_script_template:
15+
before_script:
16+
- pip install --upgrade pip
17+
- pip install poetry
18+
- poetry install
19+
20+
test:
21+
extends: .before_script_template
22+
stage: test
23+
script:
24+
- poetry run pytest
25+
only:
26+
- merge_requests
27+
- main
28+
- tags
29+
30+
deploy_test:
31+
extends: .before_script_template
32+
stage: deploy
33+
script:
34+
- poetry config repositories.testpypi https://test.pypi.org/legacy/
35+
- poetry build
36+
- poetry publish --repository=testpypi --username=$PYPI_API_TOKEN_USERNAME --password=$PYPI_API_TOKEN_PASSWORD
37+
only:
38+
- tags
39+
when: manual
40+
41+
deploy_prod:
42+
extends: .before_script_template
43+
stage: deploy
44+
script:
45+
- poetry build
46+
- poetry publish --username=$PYPI_API_TOKEN_USERNAME --password=$PYPI_API_TOKEN_PASSWORD
47+
only:
48+
- tags

README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ A command-line tool for genomic-wide association studies (GWAS) data validation
1010

1111
## Installation
1212

13-
TODO
13+
Install from PyPI:
14+
15+
```bash
16+
pip install gwas-assoc
17+
```
1418

1519
## Usage
1620

@@ -44,11 +48,8 @@ poetry shell
4448
# Build the package (creates .whl and .tar.gz in dist/)
4549
poetry build
4650

47-
# Install your package in development mode
51+
# Install your new package in development mode
4852
poetry install
49-
50-
# Export requirements.txt (if needed)
51-
poetry export -f requirements.txt --output requirements.txt
5253
```
5354

5455
### Testing

0 commit comments

Comments
 (0)