Where to learn to put my package in anaconda

I have developed a .py file for one calculation, then I use it to run for one set of parameters.

Then I copy the same .py to a second directory for a second set of parameters. Then
along the way I make changes to .py to improve it.

But I would very much like to have a centralized .py in say, anaconda3/bin where
it always has the latest .py file, even though it may break the run with earlier input parameters.

I think this is the serious software development thing, but how can I get started?

I don’t want to keep many different copies of .py all over the place and I do not know which is the
latest one…

1 Like

The lightest-weight way to get to a “real” python package/command line tool in the conda space is probably flit: It supports ending up with a directory (under version control, ideally :blush:) that contains just:

  • your python file (which will become the installable name)
  • a pyproject.toml

It supports scripts which will ensure you get a command line entry.

Once you’ve got that, you’d be able to run

conda install -c conda-forge flit
flit install

and it should stay up-to-date, even after you change your .py file.

1 Like