Comments (7)
I'm happy that you find it interesting.
To answer your question, I created a new project on my local machine using fpm (0.9.0, alpha). I included two examples from ForColormap and ForImage as tests in the 'test' folder. I added my forked version of ForColormap as a dependency, as well as ForImage. The examples work correctly in my test project, which means fpm manages them correctly.
[dependencies]
forcolormap = { git = "https://github.com/gha3mi/forcolormap" }
forimage = { git = "https://github.com/gha3mi/forimage.git" }
Removing ForImage from dependencies has no effect, which means users of ForColormap only need to add ForColormap as a dependency, and fpm knows that ForColormap depends on ForImage.
[dependencies]
forcolormap = { git = "https://github.com/gha3mi/forcolormap" }
If a user wants to use ForImage in their project as well, they can add ForImage as a dependency without any issues; fpm seems to have no problem and works correctly. If you want to check these tests, I can share my simple test project with you.
If a user accidentally adds the same dependency twice using fpm, it will result in an error:
[dependencies]
forcolormap = { git = "https://github.com/gha3mi/forcolormap" }
forimage = { git = "https://github.com/gha3mi/forimage.git" }
forimage = { git = "https://github.com/gha3mi/forimage.git" }
<ERROR> *cmd_run* Package error: error: Key 'forimage' already exists
--> fpm.toml:10:1-8
|
9 | forimage = { git = "https://github.com/gha3mi/forimage.git" }
| -------- first defined here
10 | forimage = { git = "https://github.com/gha3mi/forimage.git" }
| ^^^^^^^^ key already used
|
STOP 1
from forcolormap.
There is only one. See the build directory:
build/
├── cache.toml
├── dependencies
│ ├── forcolormap
│ │ ├── CHANGELOG.md
│ │ ├── example
│ │ │ ├── demo.f90
│ │ │ └── example1.f90
│ │ ├── fpm.toml
│ │ ├── LICENSE
│ │ ├── NO_BIJECTION.md
│ │ ├── README.md
│ │ ├── scripts
│ │ │ ├── copy-paste_code.f90
│ │ │ ├── cp_lut_files.sh
│ │ │ ├── generate_scmap.f90
│ │ │ └── scientific_colour_maps.f90
│ │ ├── src
│ │ │ ├── colormap_class.f90
│ │ │ └── scientific_colour_maps.f90
│ │ ├── test
│ │ │ └── check.f90
│ │ └── test_map_to_load.txt
│ └── forimage
│ ├── example
│ │ ├── example10.f90
│ │ ├── example11.f90
│ │ ├── example12.f90
│ │ ├── example13.f90
│ │ ├── example14.f90
│ │ ├── example1.f90
│ │ ├── example2.f90
│ │ ├── example3.f90
│ │ ├── example4.f90
│ │ ├── example5.f90
│ │ ├── example6.f90
│ │ ├── example7.f90
│ │ ├── example8.f90
│ │ └── example9.f90
│ ├── ford.yml
│ ├── fpm.rsp
│ ├── fpm.toml
│ ├── LICENSE
│ ├── media
│ │ ├── logo.png
│ │ └── logo.svg
│ ├── pnm_files
│ │ ├── example1_ascii_ex.pbm
│ │ ├── example1_ascii.pbm
│ │ ├── example2_ascii_ex.pgm
│ │ ├── example2_ascii.pgm
│ │ ├── example3_ascii_ex.ppm
│ │ ├── example3_ascii.ppm
│ │ ├── example4_binary_ex.pbm
│ │ ├── example4_binary.pbm
│ │ ├── example5_binary_ex.pgm
│ │ ├── example5_binary.pgm
│ │ ├── example6_ascii_to_binary_ex.ppm
│ │ ├── example6_binary_ex.ppm
│ │ ├── example6_binary.ppm
│ │ └── example6_binary_to_ascii_ex.ppm
│ ├── README.md
│ ├── src
│ │ └── forimage.f90
│ ├── VERSION
│ └── workspace.code-workspace
├── gfortran_50F62D7499E64B65
│ └── test
│ ├── libtest.a
│ └── libtest.a.log
└── gfortran_87E2AE0597D39913
├── test
│ ├── src_test.f90.o
│ ├── src_test.f90.o.digest
│ └── src_test.f90.o.log
└── test.mod
from forcolormap.
Well, the fpm guys did a great job...
I will consider the merge tomorrow.
from forcolormap.
Exactly!
Thanks, I will send a PR.
from forcolormap.
Can you just before put again a 4 spaces indentation in the file example/demo.f90
? (to stay coherent)
Thanks Ali @gha3mi
from forcolormap.
Thanks Ali @gha3mi for that work! That's an interesting contribution.
I was just wondering about dependencies in fpm: if forimage is a dependency of forcolormap, what happens if a user creates a project without being conscious of that fact and puts in its own fpm.toml
file the two dependencies?
[dependencies]
forimage = {git="https://github.com/gha3mi/forimage.git"}
forcolormap = {git="https://github.com/vmagnin/forcolormap.git"}
Will fpm correctly manage the fact that forimage is declared two times as a dependency?
from forcolormap.
Thanks for testing.
And in your test build/
directory, is forimage built only once? or two times? (one time for the test and one in a subdirectory for forcolormap)
from forcolormap.
Related Issues (6)
- New Colormaps HOT 15
- Suggestion: Define a New Module for Built-in Colormaps HOT 1
- Suggestion: demo HOT 1
- Ideia for the logo HOT 15
- Add Support lut File Format HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forcolormap.