Questions tagged [dependencies]

A dependency exists between two elements if changes to the definition of one element may cause changes to the other.

A dependency exists between two elements if changes to the definition of one element may cause changes to the other.

To quote from the 3rd edition of UML Distilled:

An element C (the client) depends on an element S (the supplier) if and only if changes to the definition of S may cause changes to C.

If the elements are classes, only the direct cause for change (i.e. not through a ripple effect) is called a dependency, i.e. the relation is not transitive.

For packages, C depends on S if a class in C depends on a class in S. Sometimes, the transitive closure is taken, i.e. the dependency of C on a package T can be caused by C depending on S depending on T via class dependencies.

References:

  1. Understanding Dependencies
  2. What is the difference between dependency and association?
12826 questions
5
votes
1 answer

Having a job depend on an array job in SLURM

I have two job scripts to submit to SLURM, jobA.sh and jobB.sh. jobA is a array job and I want jobB to only start once all of jobA has been completed. My script for jobA.sh is: #!/bin/bash #SBATCH -A TRIGWMS #SBATCH --mail-type=FAIL # cores per…
NH8
  • 73
  • 1
  • 4
5
votes
3 answers

How to get a list of version numbers for python packages released up until a specific date?

Consider having a python requirements.txt file with a list of (un-versioned) dependencies (python packages). After you install them (e.g. pip install -r requirements.txt) you can call pip freeze and get a (versioned) list of all installed python…
Chris
  • 3,245
  • 4
  • 29
  • 53
5
votes
0 answers

setup.py: add dependencies required for installation

For distributing Python libraries on PyPi, I usually specify the package's dependencies in setup.py à la setup( # ... install_requires=["numpy", "scipy"], # ... ) In some cases, however, I already need to import something in the…
Nico Schlömer
  • 53,797
  • 27
  • 201
  • 249
5
votes
2 answers

How to add compatibility with library structure without adding dependency on library?

I am currently writing a library that will sometimes be used alongside OpenCV. Because OpenCV defines a Point_ class that is commonly used in some of the contexts my library will be used in, I'd like to add the option to pass in Point_s as…
5
votes
1 answer

Cannot drop a role that is granted to connect database

I am using PostgreSQL 10.4 and I found a strange behavior. If we create an role and grant it to CONNECT the database: CREATE ROLE dummy; GRANT CONNECT ON DATABASE test TO dummy; Then we cannot drop this role, even if it owns no object at all, this…
jlandercy
  • 7,183
  • 1
  • 39
  • 57
5
votes
2 answers

How to handle dependencies in Service Worker?

I have Service Worker that load file from BrowserFS if the path contain __browserfs__, simplified code like this: function loadDependecies() { self.skipWaiting().then(function() { if (!self.fs) { …
jcubic
  • 61,973
  • 54
  • 229
  • 402
5
votes
0 answers

Dynamic install_requires in setup.py

I'm writing a python package with installable sub-packages as is shown below. my_project ├── subpackage1 │ ├── foo.py │ └── setup.py ├── subpackage2 │ ├── bar.py │ └── setup.py └── setup.py [main] My setup.py is like the following: from…
Chenlu
  • 449
  • 1
  • 6
  • 19
5
votes
5 answers

Parallel Tasking Concurrency with Dependencies on Python like GNU Make

I'm looking for a method or possibly a philosophical approach for how to do something like GNU Make within python. Currently, we utilize makefiles to execute processing because the makefiles are extremely good at parallel runs with changing single…
5
votes
4 answers

Friend Modules in OCaml

I currently have two "layers" of modules that represent identifier-data relationships in a database. The first layer defines identifier types, such as IdUser.t or IdPost.t while the second layer defines data types such as User.t or Post.t. I need…
Victor Nicollet
  • 24,361
  • 4
  • 58
  • 89
5
votes
3 answers

How do you make javac recompile source files when their dependencies change?

I seem to be getting run-time errors in my project when using javac for incremental builds. Is this type of workflow supported? For example, if A.java depends on B.java, and B.java is modified; will javac recompile A.java because its dependency…
cmcginty
  • 113,384
  • 42
  • 163
  • 163
5
votes
1 answer

Can I provide a relative deps path in my bazel target?

When I specify build rules in bazel, my dependencies are either full paths (from the root of the repo), or just the target name (since its in the same directory): cc_binary( name = "program", srcs = ["main.cpp"], deps =…
Trevor Hickey
  • 36,288
  • 32
  • 162
  • 271
5
votes
2 answers

Is there a way to track Functions dependencies in Postgresql?

I have a lot of functions and stored procedures in my PostgreSQL database that is dependent on each other. I want to run a script that will compile those function fist which is independent and not referring any other functions. Then I want to…
Ritu
  • 51
  • 4
5
votes
1 answer

How to fix conflicting Kotlin dependency in IntelliJ IDEA?

We're creating a multi-platform project in Kotlin and part of a certain module uses the experimental coroutines feature. We're using Gradle to build the project/library together. The common module's gradle build script looks like this: apply plugin:…
Andrew
  • 73
  • 1
  • 7
5
votes
5 answers

Error: Program type already present: com.google.common.annotations.Beta

Since my android studio updated a couple of days ago, I have been struggling to get my application running again due to this error. Program type already present: com.google.common.annotations.Beta Message{kind=ERROR, text=Program type already…
Peter Barnes
  • 51
  • 1
  • 2
5
votes
3 answers

Gradle configuration "builtBy" a task

Consider the following buildscript where addToMyConfig adds a dependency to a Configuration named myConfig useMyConfig consumes the myConfig Configuration and forces it to resolve() configurations { myConfig } task addToMyConfig { doLast…
lance-java
  • 25,497
  • 4
  • 59
  • 101