An example of a Python project that can be used to install into OsiriX
Project description
pyOsiriX Example Project
An example project to demonstrate a method for creating a full project for use in pyOsiriX.
It uses the following project structure. Look inside each file to see a description of what it does.
pyosirix_example_project/ # The root directory
├── .github/ # Where configuration files for GitHub are located.
│ └── workflows/ # Where you define GitHub actions to be performed when you push code. Run automatically.
│ └── release.yaml # What actions are performed on a release. For example, upload to Python Package Index (pip).
├── package_1/ # The first Python package, where main source code will be stored. Use as many as you need.
│ ├── __init__.py # You need an __init__.py file to declare a folder as a Python package. It can be empty!
│ ├── p1_module_1.py # Each source file is a Python "module".
│ └── p1_module_2.py # Use as many as you need to make the code structure logical.
├── package_2/ # You can have more than one package if needed and logical.
│ ├── __init__.py # Don't forget this!
│ ├── p2_module_1.py # As above.
├── tests/ # The location of unit tests. These could, for example be run automatically as a GitHub action.
│ ├── p1_1_tests.py # Test module 1 of package 1.
│ ├── p1_2_tests.py # Test module 2 of package 1.
│ └── p2_1_tests.py # Test module 1 of package 2.
├── .bumpversion.cfg # Tells bump2version the version increment rules.
├── .gitignore # The gitignore tells git which files not to include in version control.
├── LICENSE # Tell people what the legal implications of your code are. There are many templates (e.g. MIT).
├── pyosirix_run.py # This is flexible, but it can be good to be clear where the initial hook for pyosirix is.
├── pyproject.toml # The configuration file for the Python project. Needed to tell pip
├── README.md # This file. GitHub will render it as the first page when you visit a repository online.
├── requirements.txt # Tell the user (and pip) what the library dependencies are.
└── VERSION # It can be helpful for clarity to store a master version file.
These pages are only meant to get you started. As you learn more about code management and CI/CD, you will become familiar with other available tools and may wish to incorporate those also.
Requirements
A good way to generate the requirements file automatically is run pipreqs
as follows from the root directory:
pip install pipreqs
pipreqs . --force
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pyosirix_example_project-0.0.1.dev17.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92ed114072245415452b691f9342268ecf7c12ca5dd95d3019809c2a1e0f19d5 |
|
MD5 | 5e417898fb3b1d6fbce06024678e2f41 |
|
BLAKE2b-256 | a8ae1b15a37af20e39739f853b88fb0674b7095a23abb5313cb50048a330e8d5 |
Close
Hashes for pyosirix_example_project-0.0.1.dev17-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c6d78904dcc90d1e153e42b1f52c9f294e4e1ccfb0d56b6a76a80f78bcd0b61 |
|
MD5 | 85c04fef18749199627e76e978f435e0 |
|
BLAKE2b-256 | 78715f54016dbdbe54108c455d928de0ec2c49b975cd46a652f7e10ec1bb2937 |