Giter Site home page Giter Site logo

Documentation about passa HOT 1 OPEN

uranusjr avatar uranusjr commented on June 16, 2024
Documentation

from passa.

Comments (1)

uranusjr avatar uranusjr commented on June 16, 2024 1

The current CLI design follows (loosely) Sam Boyer’s map-sync-memo proposal, but with naming tweaks (to match Pipenv).

There are conceptually four representations that need to be kept in sync. They are defined as

  • p Project intent
  • m Manifest (Pipfile)
  • l Lock file (Pipfile.lock)
  • d Dependency code (actually installed packages)

And the three sync operations are

  • M(p,m) Modify the Pipfile to add/remove/modify package declarations.
  • L(m,l) Execute the locker to generate a new Pipfile.lock.
  • D(l,d) Synchronize the environment based on Pipfile.lock, installing needed, uninstalling superfluous.

Mapping them to commands in Passa:

  • add is M∘L∘D; add --no-sync is M∘L.
  • clean is a partial D.
  • freeze is not related to this process.
  • install is L∘D with a special hash check.
  • lock is L.
  • remove is M∘L∘D (D is partial; only cleaning); remove --no-clean is M∘L.
  • sync is S.
  • upgrade is L∘D; upgrade --no-sync is M∘L.

Note that the meanings of install and sync are flipped to match Pipenv.

Compared to Boyer’s method, D(l,d) is actually split into two parts in Passa. sync can be logically separated into sync --no-clean and clean. remove only does D halfway, and both add and upgrade also have a switch to achieve this halfway state. This special feature is designed to fit a common Python app development use case, allowing the user to keep stray, untracked packages in the virtual environment.

from passa.

Related Issues (20)

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.