Git Product home page Git Product logo

Comments (4)

mhvwerts avatar mhvwerts commented on June 16, 2024 1

I have pip install working properly, both for regular and development installs. See branch: https://github.com/mhvwerts/PyFVTool/tree/pipfix

PyFVTool can presently be installed from that branch of my fork:

pip install git+https://github.com/mhvwerts/PyFVTool.git@pipfix

This works also from Google Colab, where we can enter the following into the first cell of the Notebook.

!pip install git+https://github.com/mhvwerts/PyFVTool.git@pipfix

I hope to craft a pull request very soon.

P.S. I drew inpiration from

  1. https://ianhopkinson.org.uk/2022/02/understanding-setup-py-setup-cfg-and-pyproject-toml-in-python/
  2. https://packaging.python.org/en/latest/discussions/setup-py-deprecated/

Reference 1 makes a compelling case for putting the module code in a src directory, which I finally did. This poses no particular problem for development, provided that the development version be installed with pip install -e .

from pyfvtool.

mhvwerts avatar mhvwerts commented on June 16, 2024 1

I needed to fix this, since I got complaints from a colleague. Students might use this installation bug as an excuse not to do their homework!

from pyfvtool.

mhvwerts avatar mhvwerts commented on June 16, 2024

I admit never having taken the time to figure out how to properly package Python modules for installation with pip.

I still rely on simply copying the module folder(s) as (a) subfolder(s) for the specific Python calculation/processing job we are working on, importing from the copied folder. This has the advantage that we keep the version of the code that was actually used to produce the results. It is also simple to explain to co-workers and students. For simple, pure scientific Python packages, this works nicely.

For PyFVTool development, I simply work from the repository's root directory, without package installation, which also still works for me. I understood that there exists some special pip incantation that installs a 'development version' of a package, so that edits are directly integrated.

Suggestions welcome!

from pyfvtool.

simulkade avatar simulkade commented on June 16, 2024

Thanks, @mhvwerts. It looks great. And I know what you mean by not leaving any excuses for students :-).

from pyfvtool.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.