Skip to main content

A simple template for python development.

Project description

Top Language Status Code Style Documentation Style Status Docs Status Tests Status


copyme

A simple template for python development. Use this repository as a template for developing a python library or package.

[!NOTE] Check out the documentation website


Templates

When copying files from this repo, remember that they are templates. So:

  1. look for [CHANGE THIS] for mandatory modifications;
  2. look for [CHECK THIS] for possible modifications;
  3. look for [EXAMPLE] for simple examples (comment or uncomment it if needed);
  4. look for [ADD MORE IF NEDDED] for possible extra features;
  5. placeholders are designated by curly braces: {replace-this}.

Configuration files

This repository relies on several configuration files that are essential for the proper functioning of the template. Each file has a specific role, and some of them work together, so they should be edited thoughtfully. Below is an overview of the main configuration files and what you should know about them.

File Purpose Key Notes
pyproject.toml Project configuration Manages dependencies, build system, and project settings. Update when adding dependencies or changing project structure.
.gitignore Git ignore rules Specifies files/folders Git should ignore (e.g., temp files, datasets, build outputs). Keeps repo clean.
.github/workflows/style.yaml Style CI configuration Runs code style checks using Black. Depends on pyproject.toml dev dependencies.
docs/conf.py Docs configuration Configures Sphinx for building documentation. Update if project structure changes.
.github/workflows/docs.yaml Docs CI configuration Automates online docs build. Relies on pyproject.toml and docs/conf.py. Requires extra steps (see file).
tests/conftest.py Testing configuration Provides shared fixtures and settings for tests. Can be customized to fit project needs.
.github/workflows/tests.yaml Testing CI configuration Runs automated unit tests on CI. Ensures code correctness after changes.

[!NOTE]
All config files are commented with recommended actions and extra steps.

[!WARNING]
Online documentation build may require additional setup — check .github/workflows/docs.yml.

[!IMPORTANT]
Continous Integration (CI) steup allows for check-ups for commits and not allowing bad code to be pushed to the main branch. So Style, Docs and Tests must always pass.


Repo layout

A standard python repo may use the following layout. This layout is known as src layout, since it stores the source code under a src/{repo} folder.

See more on flat vs src layout

copyme/
│
├── LICENSE
├── README.md                     # [CHECK THIS] this file (landing page)
├── .gitignore                    # [CHECK THIS] configuration of git vcs ignoring system
├── pyproject.toml                # [CHECK THIS] configuration of python project
├── MANIFEST.in                   # [CHECK THIS] configuration of source distribution
│
├── .venv/                        # [ignored] virtual environment (recommended for development)
│
├── .github/                      # github folder
│    └── workflows/               # folder for continuous integration services
│         ├── style.py            # [CHECK THIS] configuration file for style check workflow
│         ├── tests.py            # [CHECK THIS] configuration file for tests workflow
│         └── docs.yml            # [CHECK THIS] configuration file for docs build workflow
│
├── src/                          # source code folder
│    ├── copyme.egg-info          # [ignored] [generated] files for local development
│    └── copyme/                  # [CHANGE THIS] source code root
│         ├── __init__.py         # template init file
│         ├── module.py           # template module
│         ├── ...                 # develop your modules
│         ├── mypackage/          # template package
│         │    ├── __init__.py
│         │    └── submodule.py
│         └── data/               # run-time data
│              └── src_data.txt   # dummy data file
│
├── tests/                        # testing code folder
│    ├── conftest.py              # [CHECK THIS] configuration file of tests
│    ├──unit/                     # unit tests package     
│    │    ├── __init__.py
│    │    └── test_module.py      # template module for unit tests
│    ├── bcmk/                    # benchmarking tests package
│    │    ├── __init__.py               
│    │    └── test_bcmk.py        # template module for benchmarking tests
│    ├── data/                    # test-only data
│    │     ├── test_data.csv
│    │     ├── datasets.csv       # table of remote datasets
│    │     └── dataset1/          # [ignored] subfolders in data
│    └── outputs/                 # [ignored] tests outputs
│
├── docs/                         # documentation folder
│    ├── docs_update.rst          # updating script
│    ├── about.rst                # info about the repo
│    ├── api.rst                  # api reference using sphinx autodoc
│    ├── conf.py                  # [CHECK THIS] configuration file for sphinx
│    ├── dummy.md                 # markdown docs also works
│    ├── index.rst                # home page for documentation
│    ├── usage.rst                # instructions for using this repo
│    ├── make.bat                 # (optional) [generated] sphinx auxiliar file 
│    ├── Makefile                 # (optional) [generated] sphinx auxiliar file 
│    ├── figs/                    # figs-only files
│    │    ├── logo.png
│    │    ├── logo.svg
│    │    └── fig1.png               
│    ├── data/                    # docs-only data
│    │    └── docs.txt            # dummy data file
│    ├── generated/               # [generated] sphinx created files 
│    ├── _templates/              # [ignored] [generated] sphinx created stuff
│    ├── _static/                 # [ignored] [generated] sphinx created stuff
│    └── _build/                  # [ignored] [generated] sphinx build
│
└── examples/                     # (optional) learning resources 
     ├── examples_01.ipynb    
     └── examples_02.ipynb            

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

copyme-0.1.2.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

copyme-0.1.2-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file copyme-0.1.2.tar.gz.

File metadata

  • Download URL: copyme-0.1.2.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for copyme-0.1.2.tar.gz
Algorithm Hash digest
SHA256 384689015a892bcec5559a18c5b444ad56a01f5d780a309e339a0f0bd9f7ddf2
MD5 f59833da661a60c579696d4c5974345a
BLAKE2b-256 3348632fc61e43f168bbaaf79d3db1fe38cbd4d3ffa926eb23f9d96d91394727

See more details on using hashes here.

File details

Details for the file copyme-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: copyme-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for copyme-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8ab3c3d7342cd2c412be889f06ad3f98d9daf29b18b6c98ee163a48d9b422b55
MD5 6e9168cc3119061fdfc961f5bd38d2fe
BLAKE2b-256 85754521d3c2c111b84184c6e3d96c3208824b65e4231398436188010018a11f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page