NiklasRosenstein / flux-ci

Flux is your own private & lightweight CI server.
MIT License
26 stars 10 forks source link

Add info on howto get started with dev easiest #57

Closed gsantner closed 6 years ago

gsantner commented 6 years ago
gsantner commented 6 years ago

geany why not? it makes easy to start, and has nothing from user in it. Thats at least how I do and will keep develop fluxci. Extra did write to have project indents etc. Would be sad if not allowed

It does. But you have to deal with dependencies when you run the python file directly.This is not related to any virtual env. And thats exactly what is stated

NiklasRosenstein commented 6 years ago

Because not everybody uses Geany and the configuration file is not mandatory for the code to work.

But you have to deal with dependencies when you run the python file directly.

Sorry, I still don't get it. When you used Pipenv and then run python -m flux.main or python flux/__main__.py, what "deal with dependencies" step is left to do?

gsantner commented 6 years ago

Geany: Of course not! But this is not a reason to not share sane defaults for somebody to start with. This is not an autogenerated cache file, it took quite some time to get all the details in. This and the new commands give possible new contributor an easy way to get started without installing anything bloated like pycharm. Which isn't limited but includes myself. And I hope you value new and existing contributors.

Case 1: using env / pipenv. Case 2: directly calling python file

The dependency info is directly at the same line as case 2. Again, pipenv has nothing to do with it...

NiklasRosenstein commented 6 years ago

Ok, the way you put it has confused me a little bit. I'd prefer something like this

Development Environment

We recommend using a Python virtualenv to install Flux and its dependencies into.

virtualenvPipenv
``` virtualenv .venv source .venv/bin/activate pip install -e . ``` ``` PIPENV_VENV_IN_PROJECT=1 pipenv install -e . pipenv shell ```

To start the Flux development server, use the flux-ci command. Note that with Pipenv, you can use pipenv run flux-ci instead if you do not want to activate the virtualenv first.

flux-ci --web
gsantner commented 6 years ago

can you paste table above as file? what about geany? (see comment above)

btw, virtualenv doesn't work for me, there is no .venv/bin/activate

NiklasRosenstein commented 6 years ago

can you paste table above as file?

Find it below.

Of course not! But this is not a reason to not share sane defaults for somebody to start with. This is not an autogenerated cache file, it took quite some time to get all the details in.

Imho sane defaults does not include editor-specific configuration. Also, while Geany runs on Windows, I suppose not many Windows users actually use it. And even if they do, the xdg-open command used in the project configuration is Linux specific.

Of course I value new and existing contributors, but everyone can configure their own development environment and workflow. I for example don't use the custom commands feature that VS Code provides, I just type the command in the terminal.


## Development Environment

We recommend using a Python virtualenv to install Flux and its dependencies into.

<table><tr><th>virtualenv</th><th>Pipenv</th></tr>
<tr><td>

virtualenv .venv source .venv/bin/activate pip install -e .


</td><td>

PIPENV_VENV_IN_PROJECT=1 pipenv install -e . pipenv shell


</td></tr></table>

To start the Flux development server, use the `flux-ci` command. Note that with Pipenv, you can use `pipenv run flux-ci` instead if you do not want to activate the virtualenv first.

    flux-ci --web
NiklasRosenstein commented 6 years ago

btw, virtualenv doesn't work for me, there is no .venv/bin/activate

Sorry, missed that one. Are you sure the file does not exist? It's not executable but a script that is supposed to be sourced. Every virtualenv comes with an activate script (in the form of .venv/Scripts/activate{,.cmd,.ps} on Windows and .venv/bin/activate{,.csh,.fish} on Unix)

gsantner commented 6 years ago

What about then adding it to contrib folder? Many projects has such one, where stuff like this, systemd service files or like that get stored.

NiklasRosenstein commented 6 years ago

I would be OK with putting the file into a contrib folder.

gsantner commented 6 years ago

Dont have the .venv/bin/activiate like every 3 time. Did try multiple times now, sometimes it just copies python and pip

NiklasRosenstein commented 6 years ago

What's your virtualenv version? Maybe check if it's old

gsantner commented 6 years ago

15.1.0

NiklasRosenstein commented 6 years ago

Whatever it is, something is either wrong with the virtualenv you have installed or the way you create one.

https://virtualenv.pypa.io/en/stable/userguide/#activate

gsantner commented 6 years ago

copy paste of commands, virtualenv just bugs sometimes. anway, pipenv seems to be more recent and worked here always fine :)