Skip to content

Commit 4258b07

Browse files
authored
Merge pull request #219 from pbashyal-nmdp/documentation_and_cleanup_for_1.0
Documentation and cleanup for 1.0
2 parents 86d27b7 + 86460bc commit 4258b07

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+836
-173
lines changed

.github/workflows/black.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ jobs:
66
lint:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- uses: psf/black@stable

.github/workflows/post-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
name: Update changelog
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3
1212
with:
1313
ref: master
14-
- uses: rhysd/changelog-from-release/action@v2
14+
- uses: rhysd/changelog-from-release/action@v3
1515
with:
1616
file: CHANGELOG.md
1717
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/python-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1919
- name: Set up Python 3.8
20-
uses: actions/setup-python@v2
20+
uses: actions/setup-python@v3
2121
with:
2222
python-version: 3.8
2323
- name: Install dependencies

.github/workflows/pythonpublish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1717
- name: Set up Python
18-
uses: actions/setup-python@v1
18+
uses: actions/setup-python@v3
1919
with:
20-
python-version: '3.x'
20+
python-version: 3.8
2121
- name: Install dependencies
2222
run: |
2323
python -m pip install --upgrade pip

CONTRIBUTING.rst

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Types of Contributions
1515
Report Bugs
1616
~~~~~~~~~~~
1717

18-
Report bugs at https://github.com/mhalagan-nmdp/pyars/issues.
18+
Report bugs at https://github.com/nmdp-bioinformatics/py-ard/issues.
1919

2020
If you are reporting a bug, please include:
2121

@@ -38,14 +38,14 @@ and "help wanted" is open to whoever wants to implement it.
3838
Write Documentation
3939
~~~~~~~~~~~~~~~~~~~
4040

41-
pyARS could always use more documentation, whether as part of the
42-
official pyARS docs, in docstrings, or even on the web in blog posts,
41+
py-ard could always use more documentation, whether as part of the
42+
official py-ard docs, in docstrings, or even on the web in blog posts,
4343
articles, and such.
4444

4545
Submit Feedback
4646
~~~~~~~~~~~~~~~
4747

48-
The best way to send feedback is to file an issue at https://github.com/mhalagan-nmdp/pyars/issues.
48+
The best way to send feedback is to file an issue at https://github.com/nmdp-bioinformatics/py-ard/issues
4949

5050
If you are proposing a feature:
5151

@@ -57,32 +57,40 @@ If you are proposing a feature:
5757
Get Started!
5858
------------
5959

60-
Ready to contribute? Here's how to set up `pyars` for local development.
60+
Ready to contribute? Here's how to set up `py-ard` for local development.
6161

62-
1. Fork the `pyars` repo on GitHub.
62+
1. Fork the `py-ard` repo on GitHub.
6363
2. Clone your fork locally::
6464

65-
$ git clone [email protected]:your_name_here/pyars.git
65+
$ git clone [email protected]:your_name_here/py-ard.git
6666

67-
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
67+
3. Install your local copy into a venv. This is how you set up your fork for local development::
6868

69-
$ mkvirtualenv pyars
70-
$ cd pyars/
71-
$ python setup.py develop
69+
$ cd py-ard
70+
$ make venv
71+
$ source venv/bin/activate
72+
$ make install
7273

7374
4. Create a branch for local development::
7475

7576
$ git checkout -b name-of-your-bugfix-or-feature
7677

7778
Now you can make your changes locally.
7879

79-
5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::
80+
5. When you're done making changes, make sure you have a corresponding test, check that all your changes pass flake8 and the tests::
8081

81-
$ flake8 pyars tests
82-
$ python setup.py test or py.test
83-
$ tox
82+
$ make test
83+
$ make lint
8484

85-
To get flake8 and tox, just pip install them into your virtualenv.
85+
To get test runners, you would to have done `make install` earlier.
86+
87+
To run behavior-driven development (BDD) tests locally via the behave framework, run::
88+
89+
$ behave
90+
91+
Run unit-tests::
92+
93+
$ python -m unittest tests.test_pyard
8694

8795
6. Commit your changes and push your branch to GitHub::
8896

@@ -101,14 +109,5 @@ Before you submit a pull request, check that it meets these guidelines:
101109
2. If the pull request adds functionality, the docs should be updated. Put
102110
your new functionality into a function with a docstring, and add the
103111
feature to the list in README.rst.
104-
3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check
105-
https://travis-ci.org/mhalagan-nmdp/pyars/pull_requests
112+
3. The pull request should work for Python 3.8 and higher.
106113
and make sure that the tests pass for all supported Python versions.
107-
108-
Tips
109-
----
110-
111-
To run a subset of tests::
112-
113-
114-
$ python -m unittest tests.test_pyars

Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,23 @@ LABEL MAINTAINER="Pradeep Bashyal"
44

55
WORKDIR /app
66

7+
ARG PY_ARD_VERSION=1.0.0rc4
8+
79
COPY requirements.txt /app
810
RUN pip install --no-cache-dir --upgrade pip && \
911
pip install --no-cache-dir -r requirements.txt
1012

1113
COPY requirements-deploy.txt /app
1214
RUN pip install --no-cache-dir -r requirements-deploy.txt
1315

16+
RUN pip install --no-cache-dir py-ard==$PY_ARD_VERSION
17+
18+
RUN pyard-import && \
19+
pyard --version && \
20+
pyard-status
21+
1422
COPY app.py /app/
1523
COPY api.py /app/
1624
COPY api-spec.yaml /app/
17-
COPY pyard /app/pyard
1825

1926
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "--worker-tmp-dir", "/dev/shm", "--timeout", "30", "app:app"]

Dockerfile-local

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM python:3.10-slim-buster
2+
3+
LABEL MAINTAINER="Pradeep Bashyal"
4+
5+
WORKDIR /app
6+
7+
COPY requirements.txt /app
8+
RUN pip install --no-cache-dir --upgrade pip && \
9+
pip install --no-cache-dir -r requirements.txt
10+
11+
COPY requirements-deploy.txt /app
12+
RUN pip install --no-cache-dir -r requirements-deploy.txt
13+
14+
COPY app.py /app/
15+
COPY api.py /app/
16+
COPY api-spec.yaml /app/
17+
COPY pyard /app/pyard
18+
19+
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "--worker-tmp-dir", "/dev/shm", "--timeout", "30", "app:app"]

HEADER.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
2-
# pyars pyARS.
3-
# Copyright (c) 2018 Be The Match operated by National Marrow Donor Program. All Rights Reserved.
2+
# py-ard
3+
# Copyright (c) 2023 Be The Match operated by National Marrow Donor Program. All Rights Reserved.
44
#
55
# This library is free software; you can redistribute it and/or modify it
66
# under the terms of the GNU Lesser General Public License as published

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ docker-build: ## build a docker image for the service
101101
docker build -t pyard-service:latest .
102102

103103
docker: docker-build ## build a docker image and run the service
104-
docker run --name pyard-service -p 8080:8080 pyard-service:latest
104+
docker run --rm --name pyard-service -p 8080:8080 pyard-service:latest
105105

106106
install: clean ## install the package to the active Python's site-packages
107107
pip install --upgrade pip

0 commit comments

Comments
 (0)