Commit graph

59 commits

Author SHA1 Message Date
4100a7f3f5
Add __version__ identifier
- `lalib.__version__` is dynamically assigned
- the format is "x.y.z[.dev0|aN|bN|rcN|.postM]"
  where x, y, z, M, and N are non-negative integers
  + x, y, and z model the "major", "minor", and "patch"
    parts of semantic versioning
    (See: https://semver.org/#semantic-versioning-200)
  + M is a single digit and N either 1 or 2
  => This complies with (a strict subset of) PEP440
- add unit tests for the `__version__` identifier
2024-09-10 01:45:47 +02:00
b8ceee39c5
Set up a test suite
- use pytest as the test suite and
  measure test coverage with coverage.py
- add package for the test suite under tests/
- add nox session "test" to run the test suite
  for all supported Python versions
- use flake8 to lint pytest for consistent style
2024-09-10 01:38:26 +02:00
ecf1420742
Set up code linting tools
- use flake8 as the main linting tool with the following plug-ins:
  + flake8-annotations
  + flake8-bandit
  + flake8-black
  + flake8-broken-line
  + flake8-bugbear
  + flake8-commas
  + flake8-comprehensions
  + flake8-debugger
  + flake8-docstrings
  + flake8-eradicate
  + flake8-isort
  + flake8-quotes
  + flake8-string-format
  + flake8-pyproject
  + pep8-naming
  + pydoclint
- use mypy for static type checking
- use ruff for linting for future compatibility
- add nox session "lint" to run these tools
- add `ruff check --fix ...` in nox session "format"
- lint all source files => no errors found
2024-09-10 01:33:54 +02:00
fb407631d9
Set up code formatting tools
- auto-format code with:
  + autoflake => * remove unused imports and variables
                 * remove duplicate dict keys
                 * expand star imports
  + black => enforce an uncompromising code style
  + isort => enforce a consistent import style
             compliant with Google's Python style guide
- add nox session "format" to run these tools
2024-09-10 01:27:34 +02:00
ceabb00bab
Set up nox as the task runner
- base configuration for all nox sessions to come
- add infos about nox in the README file
- ignore [py]cache folders in git
2024-09-10 01:21:37 +02:00
e832333ed9
Initialize the project
- describe how a local develop environment can be set up
- we use poetry to manage the project
  => add pyproject.toml and poetry.lock files
- add a package for the source code
  => "src" layout structure to ensure that pytest runs the tests
     against a packaged version installed in a virtual environment
     and not the *.py files in the project directory
     (Source: https://hynek.me/articles/testing-packaging/)
- ignore poetry's artifacts in git
2024-09-10 01:15:36 +02:00
c7d8b7f283
Add README file
- describe the project's goals
- contributions are welcome
- mention the GitFlow branching model
2024-09-10 01:02:32 +02:00
8ebd6c9f71
Add open-source license
MIT license because the project is for everybody
2024-09-10 00:45:24 +02:00
3416deccb9
Math is the language of the universe. 2024-09-10 00:43:00 +02:00