fmi-faim / ipa-project-template Goto Github PK
View Code? Open in Web Editor NEWCopier template for image processing & analysis projects.
Home Page: https://fmi-faim.github.io/ipa-project-template/
License: MIT License
Copier template for image processing & analysis projects.
Home Page: https://fmi-faim.github.io/ipa-project-template/
License: MIT License
Our current pre-commit.ci workflow updates the .pre-commit-config.yaml
in the repository root, but doesn't check the file inside the template
subfolder.
Also, we should consider using ruff
(both check and format), remove redundant others (e.g. black
), and maybe add a ruff.toml
to the project template (if we want to deviate from defaults).
We should replace the miniforge/conda environments in the template with pixi.
It would be nice to have a guide on how to put a new IPA project under version control with git and pushing it to GitHub.
I just tried out MkDocs and it is much easier to use! We should move this and the template default documentation to MkDocs and potentially follow https://diataxis.fr/ for the content structure.
The current code to create a logger is redundant and takes quite some space:
I think we could improve this by migrating it into some utility function, so we can import create_logger
and call create_logger(name)
from any ipa
step.
In addition, I'd like to use a basic decorator to have the function arguments logged by default (along the lines of https://ankitbko.github.io/blog/2021/04/logging-in-python/):
my_logger = create_logger(name="processing")
@log(logger=my_logger)
def run_processing(input_dir: str, output_dir: str):
# do some processing
my_logger.info("Done!")
... which would log the values of input_dir
and output_dir
, without having to put extra code into the run_processing
function.
@tibuch what do you think?
If you browse to https://fmi-faim.github.io/ipa-project-template/, there's no obvious way to get to this GitHub repository if you're interested in looking at the source.
To prevent usage of the project code without initializing (i.e. running init.sh
at the beginning of your session), we could introduce a task that checks for a minimum available space in the cache_dir
folder of the pixi
configuration, and warns the user if they're running with a "wrong" cache directory.
For example, this bash snippet gives the current free space on the file system where cache_dir
is located:
pixi info --json | grep -o '"cache_dir": "[^"]*' | grep -o '[^"]*$' | tr -d '\n' | xargs -0 -I {} df -P {} | tail -1 | awk '{print $4}'
We could use this - or a (platform-independent) Python equivalent from a minimal environment in pixi - to fail early if there's not enough space available. What do you think, @tibuch?
Having a single config.yml
for all steps of a workflow would have several benefits:
Currently, I get a warning when there are untracked changes, thanks to the source_status
task, but the dependent tasks continue.
@tibuch did you intend that source_status
blocks on untracked changes, or was it meant merely as a warning?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.