Add some contributing notes
- ID
0634780- date
2025-04-13 21:16:26+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
cbd03c1- message
Add some contributing notes- changed files
2 files, 60 additions
Changed files
CONTRIBUTING.md (0) → CONTRIBUTING.md (1281)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..9f37a1b
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,56 @@
+# CONTRIBUTING
+
+You can set up a local development environment by cloning the repo and installing dependencies:
+
+```shell
+git clone https://github.com/alexwlchan/javascript-data-files.git
+cd javascript-data-files
+python3 -m venv .venv
+source .venv/bin/activate
+pip install -e .
+```
+
+If you want to run tests, install the dev dependencies and run the tests:
+
+```shell
+# Activate the virtualenv and install dev dependencies
+source .venv/bin/activate
+pip install -r dev_requirements.txt
+
+# Check formatting
+ruff check .
+ruff format --check .
+
+# Check docstrings
+interrogate -vv
+
+# Check types
+mypy src tests
+
+# Run tests
+coverage run -m pytest tests
+coverage report
+```
+
+To make changes:
+
+1. Create a new branch
+2. Push your changes to GitHub
+3. Open a pull request
+4. Fix any issues flagged by GitHub Actions (including tests, code linting, and type checking)
+6. Merge it!
+
+To create a new version on PyPI:
+
+1. Update the version in `src/javascript_data_files/__init__.py`
+2. Add release notes in `CHANGELOG.md` and push a new tag to GitHub
+3. Deploy the release using twine:
+
+ ```console
+ $ python3 -m build
+ $ python3 -m twine upload dist/* --username=__token__
+ ```
+
+ You will need [a PyPI API token](https://pypi.org/help/#apitoken) to publish packages.
+
+
README.md (1641) → README.md (1766)
diff --git a/README.md b/README.md
index dd2bbeb..032a0d9 100644
--- a/README.md
+++ b/README.md
@@ -45,6 +45,10 @@ This is the only way to load data from an external file from an HTML file you've
I have a lot of HTML files and local sites I build with an HTML viewer and metadata in a JavaScript file.
The convenience of this approach outweighs the mild annoyance of having to store data in JavaScript, not JSON.
+## Development
+
+If you want to make changes to the library, there are instructions in [CONTRIBUTING.md](./CONTRIBUTING.md).
+
## License
MIT.