Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version: 2
updates:
- package-ecosystem: "pip"
target-branch: "master"
target-branch: "main"
directory: "/"
schedule:
interval: "weekly"
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ jobs:
apply:
needs: [container_build, osx_build]

# Only on tags, master and production branches.
# Only on tags, main and production branches.

runs-on: macos-${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
os: [11, 12, 13]
os: [12, 13]
platform: [x86_64]
python-version: [3.9.16]

Expand All @@ -81,7 +81,7 @@ jobs:
run: |
MATCH="FALSE"
[[ "${{ github.event.ref }}" =~ /tags/v\.* ]] && MATCH="TRUE"
[[ "${{ github.event.ref }}" == "refs/heads/master" ]] && MATCH="TRUE"
[[ "${{ github.event.ref }}" == "refs/heads/main" ]] && MATCH="TRUE"
[[ "${{ github.event.ref }}" == "refs/heads/production" ]] && MATCH="TRUE"
echo "MATCH=${MATCH}" >> $GITHUB_OUTPUT

Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
os: [11, 12, 13]
os: [12, 13]
platform: [x86_64]
python-version: [3.9.16]

Expand Down Expand Up @@ -472,13 +472,13 @@ jobs:

osx_build:

# Only on tags, master and production branches.
# Only on tags, main and production branches.

runs-on: macos-${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
os: [11, 12, 13]
os: [12, 13]
platform: [x86_64]
python-version: [3.9.16]

Expand All @@ -488,7 +488,7 @@ jobs:
run: |
MATCH="FALSE"
[[ "${{ github.event.ref }}" =~ /tags/v\.* ]] && MATCH="TRUE"
[[ "${{ github.event.ref }}" == "refs/heads/master" ]] && MATCH="TRUE"
[[ "${{ github.event.ref }}" == "refs/heads/main" ]] && MATCH="TRUE"
[[ "${{ github.event.ref }}" == "refs/heads/production" ]] && MATCH="TRUE"
echo "MATCH=${MATCH}" >> $GITHUB_OUTPUT

Expand All @@ -508,6 +508,8 @@ jobs:
if: steps.branch_filter.outputs.match == 'TRUE'
run: |
./scripts/build.sh pyenv "${PYTHON_VERSION}"
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1

- name: OSX Build -- Setup Build Environment
if: steps.branch_filter.outputs.match == 'TRUE'
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ A portable single binary configuration tool for OSX machines.
- Start with a freshly installed Mac, and apply a `Mac Maker Profile` to add all the customizations and applications you want.
- Alternatively, start with an existing Mac you already use, and incrementally build a `Mac Maker Profile` putting all your existing apps and customizations under version control.

### Master Branch Builds
### Main Branch Builds
- GitHub:
- [![mac_maker Generic Push](https://github.com/osx-provisioner/mac_maker/workflows/mac_maker-push/badge.svg?branch=master)](https://github.com/osx-provisioner/mac_maker/actions)
- [![mac_maker Generic Push](https://github.com/osx-provisioner/mac_maker/actions/workflows/push.yml/badge.svg?branch=main)](https://github.com/osx-provisioner/mac_maker/actions)

### Production Branch Builds
- GitHub:
Expand Down Expand Up @@ -79,17 +79,17 @@ You can work with `Profiles` in one of two ways:

To find out more:

- Read about the `Mac Maker Profiles`, and how to build one [here](https://mac-maker.readthedocs.io/en/latest/project/3.profiles.html).
- Read about the `Mac Maker Profiles`, and how to build one [here](https://mac-maker.readthedocs.io/en/latest/project/4.profiles.html).
- Use [this template](https://github.com/osx-provisioner/profile-generator) to create your own custom profiles.
- Read about the `spec.json` file, and how to build one [here](https://mac-maker.readthedocs.io/en/latest/project/4.spec_files.html).
- Read about the `spec.json` file, and how to build one [here](https://mac-maker.readthedocs.io/en/latest/project/5.spec_files.html).

**Please Note:**
- We've had some user feedback that the `spec.json` files are a bit complicated to get started with.
- Although we'll continue to support them, we'll soon introduce the ability to simply specify the path to a `Mac Maker Profile` folder on the local filesystem.

## License

As this project effectively bundles Ansible, it must comply with the [GNU GPL](https://mac-maker.readthedocs.io/en/latest/project/6.license.html).
As this project effectively bundles Ansible, it must comply with the [GNU GPL](https://mac-maker.readthedocs.io/en/latest/project/7.license.html).
You are however free to use and modify this source, as long as the license's terms are respected.

(Pull requests are most welcome, as I sincerely hope this project can be of use to others.)
Expand Down
2 changes: 1 addition & 1 deletion assets/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
commands:
- 'bandit -r "${PROJECT_NAME}" -c .bandit.rc --ini .bandit -x tests'
- 'echo "\nPoetry is exporting the lockfile standby..."'
- 'poetry export --without-hashes -f requirements.txt | safety check -i 42923 -i 52510 -i 54229 -i 54230 --stdin'
- 'poetry export --without-hashes -f requirements.txt | safety check -i 42923 -i 54229 -i 54230 -i 54564 -i 66667 -i 70612 --stdin'
success: "Security Test Passed!"
failure: "Security Test Failed!"
- name: "test"
Expand Down
3 changes: 3 additions & 0 deletions documentation/source/_static/css/overrides.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.wy-nav-content {
max-width: 100%;
}
46 changes: 29 additions & 17 deletions documentation/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# -- Path setup --------------------------------------------------------------

import os
import pathlib
import sys

if os.path.exists('/app'):
Expand All @@ -29,14 +30,15 @@
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinx_autopackagesummary',
'sphinx_autodoc_typehints',
'sphinx_autopackagesummary',
'sphinx_click.ext',
'sphinx-jsonschema',
'sphinx.ext.intersphinx',
'sphinxcontrib.spelling',
'myst_parser',
]

# sphinx.ext.autosummary
Expand All @@ -53,21 +55,31 @@
tokenizer_lang = 'en_US'
spelling_word_list_filename = 'spelling_wordlist.txt'

# sphinx_autopackagesummary
autosummary_generate = True
autosummary_mock_imports = [
"mac_maker.tests",
"mac_maker.ansible_controller.tests",
"mac_maker.jobs.tests",
"mac_maker.utilities.tests",
"mac_maker.utilities.mixins.tests",
"mac_maker.utilities.validation.tests",
]

def detect_tests():
"""Create a list of import paths with tests."""

test_paths = []
for root, dirs, _ in os.walk('../../pi_portal'):
for name in dirs:
if name == 'tests':
directory = pathlib.Path(os.path.join(root, name).replace('../../', ''))
test_paths.append('.'.join(directory.with_suffix('').parts))
return test_paths


# Exclude tests from sphinx_autopackagesummary here
autosummary_mock_imports = detect_tests()

source_suffix = {
'.rst': 'restructuredtext',
}

typehints_fully_qualified = False
always_document_param_types = True
typehints_defaults = "comma"
typehints_document_rtype = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand All @@ -81,12 +93,12 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'haiku'
html_theme = 'sphinx_rtd_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ['_static']
html_theme_options = {
'body_max_width': '100%'
}
html_static_path = ['_static']
html_css_files = [
'css/overrides.css',
]
7 changes: 7 additions & 0 deletions documentation/source/project/0.overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Project Overview
================
```{include} ../../../README.md
:start-after: Project Documentation
:end-before: License
```

5 changes: 0 additions & 5 deletions documentation/source/project/2.cli.rst

This file was deleted.

6 changes: 6 additions & 0 deletions documentation/source/project/3.cli.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CLI Summary
===========

.. click:: mac_maker.cli:cli
:prog: mac_maker.cli
:nested: short
6 changes: 6 additions & 0 deletions documentation/source/project/3.cli_reference.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CLI Subcommand Reference
========================

.. click:: mac_maker.cli:cli
:prog: mac_maker.cli
:nested: full
4 changes: 0 additions & 4 deletions documentation/source/project/7.readme.rst

This file was deleted.

4 changes: 4 additions & 0 deletions documentation/source/spelling_wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ansible
bitrise
codebase
cmd
env
filesystem
github
Expand All @@ -9,8 +11,10 @@ localhost
mac_maker
minItems
mixin
pre
precheck
repo
subcommand
sudo
uniqueItems
url
Expand Down
2 changes: 1 addition & 1 deletion mac_maker/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

GITHUB_HTTP_REGEX = r'http[s]?://github.com/(?P<org>.+)/(?P<repo>[^.]+)(\.git)?'
GITHUB_SSH_REGEX = r'git@github.com:(?P<org>.+)/(?P<repo>[^.]+)(\.git)?'
GITHUB_DEFAULT_BRANCH = 'master'
GITHUB_DEFAULT_BRANCH = 'main'

LOGGER_NAME = 'mac_maker'
LOGGER_FORMAT = '[%(asctime)s] - [%(name)s] - [%(levelname)s] - %(message)s'
Expand Down
Loading