https://github.com/ucyo/python-package-template
Template for reproducible python applications in science
https://github.com/ucyo/python-package-template
python pythonappdevelopemnt reproducibility reproducible-research reproducible-science
Last synced: 10 months ago
JSON representation
Template for reproducible python applications in science
- Host: GitHub
- URL: https://github.com/ucyo/python-package-template
- Owner: ucyo
- License: mit
- Created: 2021-10-08T13:10:46.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-30T20:46:09.000Z (almost 2 years ago)
- Last Synced: 2025-01-20T17:15:26.545Z (11 months ago)
- Topics: python, pythonappdevelopemnt, reproducibility, reproducible-research, reproducible-science
- Language: Makefile
- Homepage:
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Template for Python
This a template for developing Python application and libraries in an enclosed
and safe environment. We are using Docker to provide a reproducible environment
which can be used for active development, python packaging for releases and
CI/CD workflows.
## Usage
Copy the example environmental file `.env.example` to `.env` and (if necessary)
add environmental variables.
```bash
$ > cp .env.example .env
```
Start and bash into development container.
```bash
$ > make bash
```
Now your environment is setup. All changes to the codebase are reflected in the
container, since they are mounted.
## Getting Started
### Name your project
The first thing you want to do is give your project a proper name.
1. Rename the `project` in [pyproject.toml](./app/pyproject.toml) and update the `description`.
2. Rename the `app/src/app` to your project name.
```bash
$ > mv app/src/app app/src/
```
### Add dependencies
Add your dependencies to the project.
1. Enter the development container.
```bash
$ > make bash
```
2. Use `rye` to add the dependencies. You can find an introduction to `rye` [here](https://rye-up.com/guide/).
```bash
$ > rye add # like flask, numpy or pandas
```
3. Install the dependencies.
```bash
$ > rye sync
```
The next time you build the container your dependencies have been installed.
### Update the README
A fresh start. Just move [the blank README.md](./app/README.md) over here and
start with your project.
```bash
$ > mv app/README.md .
```
## Explore
This template is just the barebone to get a Python Open Source Software (OSS)
project up and running. Don't forget change the license, add a CHANGE.md and
a CODE_OF_CONDUCT.md. But that is up to your :smile: