To grab the latest version of numfoil
run the following command:
git clone -b develop https://github.com/skilkis/numfoil.git
To ensure that the installation does not affect other projects, it is wise to
create a new local virtual environment. For this we will use the venv
module,
however you are free to use conda
if you wish.
py -3 -m venv .env
Once this command executes, the new environment must be activated as follows:
".env/Scripts/activate"
Note: the quotation marks are important!
source .env/bin/activate
Next, since this project uses the src/
layout an editable version of the code
needs to be installed. This is accomplished by running the following command:
pip install -e .[dev]
Note that the [dev]
specifier here installs some additional requirements
necessary for proper development such as a syntax checker and a formatter.
To ensure that the code indentation, spacing, and line-endings are normalized
across all platforms and IDE's an .editorconfig
file is used. Make sure that
your editor supports this configuration file by checking the editorconfig
website. Depending on your editor you may need to install a plug-in/extension
which is the case currently for Visual Studio Code.
To preserve a uniform look across the entire project flake8 along with the
black code formatter are used. This is especially important when working with
multiple developers as everyone usually has their own formatting tastes.
However, as with all joint endeavors the way forward is through compromise...or
in this case an auto-formatter with a heavy hand. All of the required packages
and their respect extensions will be automatically installed if the [dev]
specifier is added when installing numfoil
.
To have a rich history to the commits that are easily understood by all devs, the following best-practices that are widely accepted/used in open-source projects are adopted.
- Separate subject from body with a blank line
- Limit the subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how
The most important rule is to have a descriptive subject line that is written
in the imperative mood such that you can read the history as This commit will...{add subject line here}
. Therefore, past tense needs to be avoided and
subject lines starting with Changed, Added, Modified
should be replaced with
Change, Add, Modify
. Thus, an example commit would be as follows:
Add main.py to easily run the bot
This commit adds a main.py module that makes it a lot easier to initialize and
run the bot. Before, the bot would need to be imported from multiple files
which made it difficult for hosting the bot on the cloud.
Therefore, this module takes care of these imports and runs the bot using the
bot.run command.
Closes: #1
More information on these best-practices can be obtained from: git-commits
At the moment two main branches exist in the GitHub repository: master
and
develop
. All development should take place on the develop
branch where
stable changes are later merged with the master
branch to form a new release.
The following steps should be followed during the creation of a new release.
- Test the correct function of the bot by running the test-suite on the develop branch (To be developed later)
- Update CHANGELOG.md with information pertaining to the new release
- Create a commit titled
Update CHANGELOG for release X.Y.Z
and tag it with a new git tag labeled withvX.Y.Z
. This is required forsetup.py
to pick up on the new release version when installing the bot. - Checkout the
master
branch and merge thedevelop
branch into it - Form a GitHub release with the commit tag created in Step 3 and copy the latest relevent changes from CHANGELOG.md into the release body.
In the future, this process can be automated with CI/CD tools, but due to the short time-frame of the initial release, automation will be dealt with later.