Skip to content

Commit c7c6ef0

Browse files
committed
Added new OS type checks.
2 parents 61b84f8 + e02171d commit c7c6ef0

28 files changed

+3407
-188
lines changed

CONTRIBUTING.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Contributing to the Fortran Package Manager
2+
3+
Thank you for considering contributing to the Fortran Package Manager (fpm).
4+
Please review and follow these guidelines to make the contribution process
5+
simple and effective for all involved.
6+
It will help communicate that you respect the time of the community
7+
developers.
8+
In return, the community will help address your problem, evaluate changes, and
9+
guide you through your pull requests.
10+
11+
By contributing to fpm, you certify that you own or are allowed to share the
12+
content of your contribution under the
13+
[fpm license](https://github.com/fortran-lang/fpm/blob/master/LICENSE).
14+
15+
* [Style](#style)
16+
* [Reporting a bug](#reporting-a-bug)
17+
* [Suggesting a feature](#suggesting-a-feature)
18+
* [Workflow](#workflow)
19+
* [General guidelines](#general-guidelines)
20+
* [For new contributors](#for-new-contributors)
21+
22+
## Style
23+
24+
Please follow the
25+
[Fortran stdlib style guide](https://github.com/fortran-lang/stdlib/blob/master/STYLE_GUIDE.md)
26+
for any Fortran code that you contribute.
27+
This allows us to focus on substance rather than style.
28+
29+
## Reporting a bug
30+
31+
A bug is a _demonstrable problem_ caused by the code in this repository.
32+
Good bug reports are extremely valuable to us—thank you!
33+
34+
Before opening a bug report:
35+
36+
1. Check if the issue has already been reported.
37+
([issues](https://github.com/fortran-lang/fpm/issues))
38+
2. Check if it is still an issue or it has been fixed?
39+
Try to reproduce it with the latest version from the master branch.
40+
3. Isolate the problem and create a minimal test case.
41+
42+
A good bug report should include all information needed to reproduce the bug.
43+
Please be as detailed as possible:
44+
45+
1. Which version of fpm are you using? Please be specific.
46+
2. What are the steps to reproduce the issue?
47+
3. What is the expected outcome?
48+
4. What happens instead?
49+
50+
This information will help the community diagnose the issue quickly and with
51+
minimal back-and-forth.
52+
53+
## Suggesting a feature
54+
55+
Before suggesting a new feature, take a moment to find out if it fits
56+
the scope of the project, or if it has already been discussed.
57+
It is up to you to provide a strong argument to convince the community of the
58+
benefits of this feature.
59+
Please provide as much detail and context as possible.
60+
If applicable, include a mocked-up snippet of what the output or behavior would
61+
look like with this feature implemented.
62+
"Crazy", out-of-the-box ideas are especially welcome.
63+
It's quite possible that we are not considering an unusually creative solution.
64+
65+
## Workflow
66+
67+
fpm is a community project.
68+
There is no one single person making final decisions.
69+
This is the workflow that we follow:
70+
71+
1. Open a [new issue](https://github.com/fortran-lang/fpm/issues/new) to
72+
describe a bug or propose a new feature.
73+
Refer to the earlier sections on how to write a good bug report or feature
74+
request.
75+
2. Discuss with the community and reach majority consensus about what should be
76+
done about the bug or feature request.
77+
We define "majority" loosely as 80%.
78+
This means that at least 4 of 5 people engaged in the discussion should be
79+
able to agree on the next step.
80+
This allows us to have the community mostly agree while not getting stuck if
81+
one person disagrees.
82+
At this stage, the scope of the fix/feature, its behavior, and API if
83+
applicable should be defined.
84+
Only when you have community concensus on these items you should proceed
85+
to writing code and opening a PR.
86+
__When actively working on code towards a PR, please assign yourself to the issue on github.__
87+
This is good collaborative practice to avoid duplicated effort and also inform others what you
88+
are currently working on.
89+
3. Open a new Pull Request (PR) with your contribution.
90+
The body of the PR should at least include a bullet-point summary of the
91+
changes, and a detailed description is encouraged.
92+
If the PR completely addresses the issue you opened in step 1, include in
93+
the PR description the following line: `Fixes #<issue-number>`.
94+
4. Request reviewers to your PR.
95+
For small bug fixes or documentation improvements, 1 to 2 reviewers is
96+
sufficient.
97+
For implementation of bigger features, request 3 to 4 or more reviewers.
98+
Ideally, request reviewers that participated in step 2.
99+
5. If your PR implements a feature that adds or changes the behavior of fpm,
100+
your PR must also include appropriate changes to the documentation.
101+
102+
This workflow can evolve and change over time as we learn how best to work
103+
together.
104+
If you have an idea on how to improve the workflow itself, please open an issue
105+
and we'll discuss it.
106+
107+
## General guidelines
108+
109+
* A PR should implement _only one_ feature or bug fix.
110+
* Do not commit changes to files that are irrelevant to your feature or bug fix.
111+
* Smaller PRs are better than large PRs, and will lead to a shorter review and
112+
merge cycle
113+
* Add tests for your feature or bug fix to be sure that it stays functional and useful
114+
* Be open to constructive criticism and requests for improving your code.
115+
* Again, please follow the
116+
[Fortran stdlib style guide](https://github.com/fortran-lang/stdlib/blob/master/STYLE_GUIDE.md).
117+
118+
## For New Contributors
119+
120+
If you have never created a pull request before, welcome :tada:.
121+
You can learn how from
122+
[this great tutorial](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
123+
124+
Don't know where to start?
125+
You can start by looking through the list of
126+
[open issues](https://github.com/fortran-lang/fpm/issues).

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Please follow the [issues](https://github.com/fortran-lang/fpm/issues)
1212
to contribute and/or stay up to date with the development.
1313
As the prototype matures and we enter production, we will do our best to stay backwards compatible.
1414

15+
To report a bug report or suggest a feature, please read our
16+
[contributor guidelines](CONTRIBUTING.md).
17+
1518
## Getting started
1619

1720
### Install Haskell

ci/run_tests.bat

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ if errorlevel 1 exit 1
99
fpm run
1010
if errorlevel 1 exit 1
1111

12+
fpm test
13+
if errorlevel 1 exit 1
14+
1215
build\gfortran_debug\app\fpm
1316
if errorlevel 1 exit 1
1417

@@ -18,5 +21,24 @@ if errorlevel 1 exit 1
1821
..\..\..\fpm\build\gfortran_debug\app\fpm build
1922
if errorlevel 1 exit 1
2023

21-
.\hello_world
24+
.\build\gfortran_debug\app\hello_world
25+
if errorlevel 1 exit 1
26+
27+
28+
cd ..\hello_complex
29+
if errorlevel 1 exit 1
30+
31+
..\..\..\fpm\build\gfortran_debug\app\fpm build
2232
if errorlevel 1 exit 1
33+
34+
.\build\gfortran_debug\app\say_Hello
35+
if errorlevel 1 exit 1
36+
37+
.\build\gfortran_debug\app\say_goodbye
38+
if errorlevel 1 exit 1
39+
40+
.\build\gfortran_debug\test\greet_test
41+
if errorlevel 1 exit 1
42+
43+
.\build\gfortran_debug\test\farewell_test
44+
if errorlevel 1 exit 1

ci/run_tests.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@ set -ex
55
cd fpm
66
fpm build
77
fpm run
8+
fpm test
89
build/gfortran_debug/app/fpm
10+
911
cd ../test/example_packages/hello_world
1012
../../../fpm/build/gfortran_debug/app/fpm build
11-
./hello_world
13+
./build/gfortran_debug/app/hello_world
14+
15+
cd ../hello_complex
16+
../../../fpm/build/gfortran_debug/app/fpm build
17+
./build/gfortran_debug/app/say_Hello
18+
./build/gfortran_debug/app/say_goodbye
19+
./build/gfortran_debug/test/greet_test
20+
./build/gfortran_debug/test/farewell_test

fpm/app/main.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
program main
2-
use command_line, only: &
2+
use fpm_command_line, only: &
33
fpm_cmd_settings, &
44
fpm_new_settings, &
55
fpm_build_settings, &
@@ -15,11 +15,11 @@ program main
1515

1616
call get_command_line_settings(cmd_settings)
1717

18-
select type(cmd_settings)
18+
select type(settings=>cmd_settings)
1919
type is (fpm_new_settings)
2020
call cmd_new()
2121
type is (fpm_build_settings)
22-
call cmd_build()
22+
call cmd_build(settings)
2323
type is (fpm_run_settings)
2424
call cmd_run()
2525
type is (fpm_test_settings)

fpm/fpm.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,13 @@ license = "MIT"
44
author = "fpm maintainers"
55
maintainer = ""
66
copyright = "2020 fpm contributors"
7+
8+
[dependencies]
9+
[dependencies.toml-f]
10+
git = "https://github.com/toml-f/toml-f"
11+
rev = "290ba87671ab593e7bd51599e1d80ea736b3cd36"
12+
13+
[[test]]
14+
name = "fpm-test"
15+
source-dir = "test"
16+
main = "main.f90"

fpm/src/command_line.f90

Lines changed: 0 additions & 78 deletions
This file was deleted.

0 commit comments

Comments
 (0)