Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mrseanryan/cornsnake

Common Python utilities for working with files, git, ZIP, lists, processes, dates and times
https://github.com/mrseanryan/cornsnake

python python-library python-utilities

Last synced: 6 days ago
JSON representation

Common Python utilities for working with files, git, ZIP, lists, processes, dates and times

Awesome Lists containing this project

README

        

# cornsnake - contributing

## Dev dependencies

- pyenv - if on Windows use [pyenv-win](https://github.com/pyenv-win/pyenv-win) [needs an Adminstrator Powershell terminal]

## Install

Switch to Python 3.11.6:

```
pyenv install 3.11.6
pyenv local 3.11.6
```

Setup a virtual environment:

```
./create_env.sh
```

If you are contributing to this project, then you need to install these extra dev dependencies:

```
python -m pip install build~=1.0.3 bumpver~=2023.1129 parameterized~=0.9.0 pdoc~=14.4.0 pip-tools~=7.3.0 twine~=4.0.2 ruff~=0.3.4 mypy~=1.14.0
```

note: the '~=' means 'pick most recent compatible version'.

- bumpver for release versioning
- parameterized for unit tests
- build and twine are for publishing to pypi
- pip-tools is for compiling requirements.txt
- ruff is for linting and formatting

## Linting

```
./lint.sh
```

## Unit Tests

```
./test.sh
```

OR:

```
./test.unit.one.sh
```

## Format

```
./format.sh
```

## Publishing

1. [OPTIONAL][if dependencies have changed] update dependencies (requirements.txt)

```
pip-compile pyproject.toml --strip-extras
```

2. deploy

```
./build-and-deploy.sh
```

## e2e Tests (after publishing)

./test.e2e.sh

## Documentation

Generate docs:

```
./doc.sh
```

Currently docs are stored on S3 as a bucket exposed as static website.

To deploy docs, you need to upload the new files to S3.

Bucket: docs.mrseanryan.cornsnake [eu-west-1]

Docs website: http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/

## References

- https://realpython.com/pypi-publish-python-package/