Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove code headers from Script (Python) #36

Merged
merged 5 commits into from
Mar 11, 2023
Merged
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
11 changes: 9 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
Changelog
=========

2.5.0 (2023-03-10)

2.5.0 (unreleased)
------------------

- no changes yet


2.4.1 (2023-03-11)
------------------

- Unreleased
- #36 Remove code headers from Script (Python)


2.4.0 (2023-03-10)
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

version = "2.5.0"


setup(
name="senaite.storage",
version=version,
Expand Down
20 changes: 0 additions & 20 deletions src/senaite/storage/zope_scripts/guard_add_samples.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
# -*- coding: utf-8 -*-
#
# This file is part of SENAITE.STORAGE.
#
# SENAITE.STORAGE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by the Free
# Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Copyright 2019-2023 by it's authors.
# Some rights reserved, see README and LICENSE.

## Script (Python) "guard_add_samples"
##bind container=container
##bind context=context
Expand Down
20 changes: 0 additions & 20 deletions src/senaite/storage/zope_scripts/guard_move_container.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
# -*- coding: utf-8 -*-
#
# This file is part of SENAITE.STORAGE.
#
# SENAITE.STORAGE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by the Free
# Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Copyright 2019-2023 by it's authors.
# Some rights reserved, see README and LICENSE.

## Script (Python) "guard_move_container"
##bind container=container
##bind context=context
Expand Down
20 changes: 0 additions & 20 deletions src/senaite/storage/zope_scripts/guard_recover_sample.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
# -*- coding: utf-8 -*-
#
# This file is part of SENAITE.STORAGE.
#
# SENAITE.STORAGE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by the Free
# Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Copyright 2019-2023 by it's authors.
# Some rights reserved, see README and LICENSE.

## Script (Python) "guard_recover_sample"
##bind container=container
##bind context=context
Expand Down
20 changes: 0 additions & 20 deletions src/senaite/storage/zope_scripts/guard_recover_samples.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
# -*- coding: utf-8 -*-
#
# This file is part of SENAITE.STORAGE.
#
# SENAITE.STORAGE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by the Free
# Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Copyright 2019-2023 by it's authors.
# Some rights reserved, see README and LICENSE.

## Script (Python) "guard_recover_samples"
##bind container=container
##bind context=context
Expand Down
20 changes: 0 additions & 20 deletions src/senaite/storage/zope_scripts/guard_store_sample.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
# -*- coding: utf-8 -*-
#
# This file is part of SENAITE.STORAGE.
#
# SENAITE.STORAGE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by the Free
# Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Copyright 2019-2023 by it's authors.
# Some rights reserved, see README and LICENSE.

## Script (Python) "guard_store_sample"
##bind container=container
##bind context=context
Expand Down
5 changes: 5 additions & 0 deletions templates/write_code_headers.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ if __name__ == "__main__":
# make a mapping of path -> file data
for path in file_paths:
lines = open(path, "r").readlines()

# Skip Script (Python) files
if lines and lines[0].startswith("## Script (Python)"):
continue

data[path] = lines

# walk the directory
Expand Down