Skip to content

Commit 0aa4176

Browse files
committed
more README cleanup
1 parent 366e8a4 commit 0aa4176

File tree

2 files changed

+42
-95
lines changed

2 files changed

+42
-95
lines changed

README.md

Lines changed: 41 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,25 @@ This is a [biocommons](https://biocommons.org/) project.
1515

1616
## Python Package Installation
1717

18-
Install from PyPI using one or more of the following:
18+
Install from PyPI with `pip install biocommons.example` or `uv pip install biocommons.example`, then try it:
19+
20+
$ source venv/bin/activate
21+
22+
$ python3 -m biocommons.example
23+
Marvin says:
24+
There's only one life-form as intelligent as me within thirty parsecs...
25+
26+
$ marvin-quote
27+
Marvin says:
28+
You think you've got problems? What are you supposed to do if you...
29+
30+
$ ipython
31+
>>> from biocommons.example import __version__, get_quote_from_marvin
32+
>>> __version__
33+
'0.1.dev8+gd5519a8.d20211123'
34+
>>> get_quote()
35+
"The first ten million years were the worst, ...
1936

20-
- `pip install biocommons.example`
21-
- `uv pip install biocommons.example`
22-
- Add `biocommons.example` to dependencies in `pyproject.toml` or `requirements.txt`
2337

2438
## Developer Setup
2539

@@ -53,101 +67,34 @@ Create a Python virtual environment, install dependencies, install pre-commit ho
5367
### Development
5468

5569
**N.B.** Developers are strongly encouraged to use `make` to invoke tools to
56-
ensure consistency with the CI/CD pipelines. Type `make help` to see a list of
57-
supported targets.
58-
59-
Try it:
60-
61-
$ source venv/bin/activate
62-
63-
$ python3 -m biocommons.example
64-
Marvin says:
65-
There's only one life-form as intelligent as me within thirty parsecs...
66-
67-
$ marvin-quote
68-
Marvin says:
69-
You think you've got problems? What are you supposed to do if you...
70-
71-
$ ipython
72-
>>> from biocommons.example import __version__, get_quote_from_marvin
73-
>>> __version__
74-
'0.1.dev8+gd5519a8.d20211123'
75-
>>> get_quote()
76-
"The first ten million years were the worst, ...
77-
78-
79-
80-
81-
82-
83-
84-
85-
86-
87-
88-
89-
90-
91-
92-
93-
## Getting started with your project
94-
95-
### 1. Create a New Repository
96-
97-
First, create a repository on GitHub with the same name as this project, and then run the following commands:
98-
99-
```bash
100-
git init -b main
101-
git add .
102-
git commit -m "init commit"
103-
git remote add origin [email protected]:biocommons/python-package.git
104-
git push -u origin main
105-
```
106-
107-
### 2. Set Up Your Development Environment
108-
109-
Then, install the environment and the pre-commit hooks with
110-
111-
```bash
112-
make install
113-
```
114-
115-
This will also generate your `uv.lock` file
116-
117-
### 3. Run the pre-commit hooks
118-
119-
Initially, the CI/CD pipeline might be failing due to formatting issues. To resolve those run:
120-
121-
```bash
122-
uv run pre-commit run -a
123-
```
124-
125-
### 4. Commit the changes
126-
127-
Lastly, commit the changes made by the two steps above to your repository.
70+
ensure consistency with the CI/CD pipelines. Type `make` to see a list of
71+
supported targets. A subset are listed here:
12872

129-
```bash
130-
git add .
131-
git commit -m 'Fix formatting issues'
132-
git push origin main
133-
```
73+
» make
74+
🌟🌟 biocommons conventional make targets 🌟🌟
13475

135-
You are now ready to start development on your project!
136-
The CI/CD pipeline will be triggered when you open a pull request, merge to main, or when you create a new release.
76+
Using these targets promots consistency between local development and ci/cd commands.
13777

138-
To finalize the set-up for publishing to PyPI, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/publishing/#set-up-for-pypi).
139-
For activating the automatic documentation with MkDocs, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/mkdocs/#enabling-the-documentation-on-github).
140-
To enable the code coverage reports, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/codecov/).
78+
usage: make [target ...]
14179

142-
## Releasing a new version
80+
BASIC USAGE
81+
help Display help message
14382

144-
- Create an API Token on [PyPI](https://pypi.org/).
145-
- Add the API Token to your projects secrets with the name `PYPI_TOKEN` by visiting [this page](https://github.com/biocommons/python-package/settings/secrets/actions/new).
146-
- Create a [new release](https://github.com/biocommons/python-package/releases/new) on Github.
147-
- Create a new tag in the form `*.*.*`.
83+
SETUP, INSTALLATION, PACKAGING
84+
devready Prepare local dev env: Create virtual env, install the pre-commit hooks
85+
build Build package
86+
publish publish package to PyPI
14887

149-
For more details, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/cicd/#how-to-trigger-a-release).
88+
FORMATTING, TESTING, AND CODE QUALITY
89+
cqa Run code quality assessments
90+
test Test the code with pytest
15091

151-
---
92+
DOCUMENTATION
93+
docs-serve Build and serve the documentation
94+
docs-test Test if documentation can be built without warnings or errors
15295

153-
Repository initiated with [fpgmaas/cookiecutter-uv](https://github.com/fpgmaas/cookiecutter-uv).
96+
CLEANUP
97+
clean Remove temporary and backup files
98+
cleaner Remove files and directories that are easily rebuilt
99+
cleanest Remove all files that can be rebuilt
100+
distclean Remove untracked files and other detritus

sbin/makefile-extract-documentation

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ print(f"""🌟🌟 {BOLD}{HEADER_COLOR}{UNDERLINE}biocommons conventional make t
2121
2222
Using these targets promots consistency between local development and ci/cd commands.
2323
24-
usage: make [target ...])""")
24+
usage: make [target ...]""")
2525

2626
for line in fileinput.input(): # noqa: SIM115
2727
if m := re.match(r"#= (.+)", line):

0 commit comments

Comments
 (0)