🚧 Update skeleton to new project

This commit is contained in:
Neill Cox 2023-10-22 20:43:24 +11:00
parent b2822e4541
commit cebcde61aa
4 changed files with 34 additions and 57 deletions

View file

@ -1,48 +1,13 @@
# Python Skeleton
# GitLab2Gitea Exporter
This a skeleton for a python project
A command line tool for copying a project from GitLab to Gitea
Includes file layout, pyproject.toml, README.md, license and a hello world script.
Intended as a starting point for future personal projects
## Install
To use:
### Development
Clone this and then delete the git repo (unless you're working on the skeleton)
## Create a new git repo
`git init`
```
git config --local init.defaultbranch main
git config --local user.name "Neill Cox"
git config --local user.email "neill.cox@ingenious.com.au"
```
Configure as necessary.
## Create a virtualenv
`python -m venv venv`
## Activate
`source venv/bin/activate`
## Upgrade pip
`pip install --upgrade pip`
## Install requirements-dev.txt
`pip install -r requirements-dev.txt`
If this was an actual project this would be the time to install the actual requirements
`pip install -r requirements.txt`
That's an empty file at the moment so there's no point
`pip install --editable .[dev,test]`
## Check that tests work
@ -51,26 +16,26 @@ That's an empty file at the moment so there's no point
Should produce something like:
```
======================================================== test session starts ==========================================================
===================================================================================== test session starts =====================================================================================
platform linux -- Python 3.11.5, pytest-7.4.2, pluggy-1.3.0 -- /home/ncox/Projects/python-skeleton/venv/bin/python
cachedir: .pytest_cache
rootdir: /home/ncox/Projects/python-skeleton
rootdir: /home/ncox/Projects/gitea-gitlab-exporter
configfile: pyproject.toml
testpaths: tests
plugins: cov-4.1.0
collected 1 item
tests/test_skeleton.py::test_hello_word PASSED [100%]
tests/test_exporter.py::test_hello_word PASSED [100%]
---------- coverage: platform linux, python 3.11.5-final-0 -----------
Name Stmts Miss Cover Missing
---------------------------------------------------------------
src/python_skeleton/__init__.py 6 1 83% 18
---------------------------------------------------------------
TOTAL 6 1 83%
Name Stmts Miss Cover Missing
---------------------------------------------------------------------
src/gitea_gitlab_exporter/__init__.py 6 1 83% 18
---------------------------------------------------------------------
TOTAL 6 1 83%
========================================================== 1 passed in 0.02s ===========================================================
====================================================================================== 1 passed in 0.04s ======================================================================================
```
## Install pre-commit hooks: