Skip to content

Commit a995444

Browse files
committed
[main]: update README
1 parent 00c2a42 commit a995444

6 files changed

Lines changed: 74 additions & 24 deletions

File tree

.pipyrc

Lines changed: 0 additions & 13 deletions
This file was deleted.

.vscode/dictionaries/project-words.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ projectx
6161
pycache
6262
pyenv
6363
pyflakes
64+
pypirc
6465
pypoetry
6566
pyproject
6667
pytest
@@ -85,6 +86,7 @@ stefanzweifel
8586
streamlit
8687
Succesfully
8788
sucess
89+
testpy
8890
tobytes
8991
torchvision
9092
txtl

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Fabric Generator and Search Utility
1+
# Sample-py
22

3-
A Streamlit template for Recursive Zero repository
3+
A streamlit, fast api boilerplate for python development
44

55
## Installation Guide
66

@@ -12,9 +12,9 @@ A Streamlit template for Recursive Zero repository
1212

1313
## Getting Started
1414

15-
- [Unix/macOS Setup Guide](./docs/setup-for-osx.md)
15+
- [Unix/macOS Setup Guide][unix-setup]
1616

17-
- [Windows Setup Guide](./docs/setup-for-windows.md)
17+
- [Windows Setup Guide][windows-setup]
1818

1919
## Poetry Setup
2020

@@ -177,10 +177,12 @@ poetry env remove <environment-full-name>
177177

178178
## References
179179

180+
[unix-setup]: (https://github.com/recursivezero/python/wiki/setup-for-osx)
181+
[windows-setup]: (https://github.com/recursivezero/python/wiki/setup-for-windows)
182+
180183
- [Python Downloads](https://www.python.org/downloads)
181184
- [Virtualenv Docs](https://docs.python.org/3/library/venv.html)
182-
- [Python Tips](https://www.airplane.dev/blog/12-useful-python-scripts-for-developers)
183185
- [Poetry Docs](https://python-poetry.org/docs/)
184186
- [MyPy Docs](https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports)
185-
- [Useful Poetry commands](./docs//POETRY_COMMANDS.md)nning_mypy.html#missing-imports)
186-
- [Useful Poetry commands](./docs//POETRY_COMMANDS.md)
187+
- [Useful Poetry commands](https://github.com/recursivezero/python/wiki/POETRY_COMMANDS.md)
188+
- [Useful Poetry commands](https://github.com/recursivezero/python/wiki/POETRY_COMMANDS.md)

docs/PUBLISH.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Publish the package on testpy
2+
3+
1. Register the Repository
4+
5+
Poetry needs to know the specific upload URL for TestPyPI. Use the legacy upload endpoint
6+
7+
```bash
8+
poetry config repositories.<project-name> https://test.pypi.org/legacy/
9+
```
10+
11+
1. Disable System Keyring (Optional but Recommended)
12+
If you encounter 403 Forbidden errors or the terminal hangs, disable the system keyring to force Poetry to use a local auth.toml file for your tokens
13+
14+
```bash
15+
poetry config keyring.enabled false
16+
```
17+
18+
3. Set Your API Token
19+
Add your TestPyPI API token. Ensure it includes the _pypi-_ prefix.
20+
21+
```bash
22+
poetry config pypi-token.<project-name> pypi-your-token-here
23+
```
24+
25+
1. Rename Project (If Needed)
26+
27+
If you need to change the package name to avoid conflicts on TestPyPI, update the name field in your pyproject.toml. After renaming, refresh your environment:
28+
29+
## Update the 'name' field in pyproject.toml first, then
30+
31+
```bash
32+
poetry install
33+
```
34+
35+
5. Build and Publish
36+
You can build and publish the package in a single command. The -r flag specifies the repository we configured in step 1.
37+
38+
```bash
39+
poetry publish -r <project-name> --build
40+
```
41+
42+
6. Update and republish
43+
1. change version using `poetry version major` other value is _minor_ or _patch_, use as per requirements.
44+
2. sync and rebuild
45+
46+
```bash
47+
poetry lock
48+
poetry build
49+
```
50+
51+
3. `poetry publish -r <project-name>`
52+
53+
---
54+
55+
## Quick Checklist before Publishing
56+
57+
- Unique Name: Ensure the name in pyproject.toml isn't already taken on [TestPyPI](https://test.pypi.org/).
58+
- Version Bump: If you are re-uploading, you must increment the version in pyproject.toml.
59+
- Trailing Slash: Ensure your repository URL ends with /legacy/ to avoid 405 or 400 errors.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
2-
name = "sample"
3-
version = "1.1.0"
2+
name = "rz-sample"
3+
version = "1.2.0"
44
description = "A python template for fastapi and streamlit projects."
55
authors = [{ name = "sample", email = "recursivezero@outlook.com" }]
66
license = "MIT"

sample-py.code-workspace

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
"window.autoDetectColorScheme": true,
4141
"explorer.fileNesting.enabled": true,
4242
"explorer.fileNesting.patterns": {
43-
"pyproject.toml": "poetry.lock,ruff.toml, mypy.ini",
44-
".gitignore": ".gitattributes, .pip*, .poetryignore, .editorconfig, .eslint*, .npm*, .markdown*, .flake8, .env*",
43+
"pyproject.toml": "poetry.lock,ruff.toml, mypy.ini, .pip-audit.toml",
44+
".gitignore": ".gitattributes, .pypirc, .poetryignore, .editorconfig, .eslint*, .npm*, .markdown*, .flake8, .env*",
4545
"README.md": "*.md, requirements.txt,packages.txt",
4646
"LICENSE": "LICENSE-*"
4747
},

0 commit comments

Comments
 (0)